-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into mr/update-partners-page
- Loading branch information
Showing
9 changed files
with
38 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
<.live_component module={AtomicWeb.AnnouncementLive.FormComponent} id={@announcement.id} organization={@current_organization} title={@page_title} action={@live_action} announcement={@announcement} return_to={Routes.announcement_show_path(@socket, :show, @announcement)} /> | ||
<.page title={gettext("Edit Announcement")}> | ||
<:actions> | ||
<.button size={:md} icon={:trash} color={:white} type="delete" phx-click="delete"> | ||
<%= gettext("Delete") %> | ||
</.button> | ||
</:actions> | ||
<div class="pt-4 px-4"> | ||
<.live_component module={AtomicWeb.AnnouncementLive.FormComponent} id={@announcement.id} organization={@current_organization} title={@page_title} action={@live_action} announcement={@announcement} return_to={Routes.announcement_show_path(@socket, :show, @announcement)} /> | ||
</div> | ||
</.page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 4 additions & 10 deletions
14
lib/atomic_web/live/announcement_live/form_component.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
<div> | ||
<h2><%= @title %></h2> | ||
|
||
<.form :let={f} for={@changeset} id="announcement-form" phx-target={@myself} phx-change="validate" phx-submit="save"> | ||
<%= label(f, :title) %> | ||
<%= text_input(f, :title) %> | ||
<%= error_tag(f, :title) %> | ||
<.field field={f[:title]} help_text={gettext("The title of the announcement")} type="text" placeholder="Title" required /> | ||
|
||
<%= label(f, :description) %> | ||
<%= text_input(f, :description) %> | ||
<%= error_tag(f, :description) %> | ||
<.field field={f[:description]} help_text={gettext("Announcement description")} type="text" placeholder="Description" required /> | ||
|
||
<div> | ||
<%= submit("Save", phx_disable_with: "Saving...") %> | ||
<div class="mt-8 flex w-full justify-end"> | ||
<.button size={:md} color={:white} icon={:cube} type="submit"><%= gettext("Save Changes") %></.button> | ||
</div> | ||
</.form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
<.live_component module={AtomicWeb.AnnouncementLive.FormComponent} id={:new} organization={@current_organization} title={@page_title} action={@live_action} announcement={@announcement} return_to={Routes.announcement_index_path(@socket, :index)} /> | ||
<.page title={gettext("New Announcement")}> | ||
<div class="pt-4 px-4"> | ||
<.live_component module={AtomicWeb.AnnouncementLive.FormComponent} id={:new} organization={@current_organization} title={@page_title} action={@live_action} announcement={@announcement} return_to={Routes.announcement_index_path(@socket, :index)} /> | ||
</div> | ||
</.page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.