Hash :
6475e63f
Author :
Thomas de Grivel
Date :
2022-08-01T17:22:20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<%= form_for @changeset, @action, fn f -> %>
<div class="mb-3">
<%= label f, :slug_, class: "form-label" %>
<%= text_input f, :slug_, class: "form-control" %>
<%= error_tag f, :slug_ %>
</div>
<div class="mb-3">
<%= label f, :name, class: "form-label" %>
<%= text_input f, :name, class: "form-control" %>
<%= error_tag f, :name %>
</div>
<div class="mb-3">
<%= label f, :description, class: "form-label" %>
<%= textarea f, :description, class: "form-control" %>
<%= render LayoutView, "markdown_enabled.html" %>
<%= error_tag f, :description %>
</div>
<div class="mb-3">
<%= if @conn.assigns[:current_organisation] do %>
<%= link gettext("Cancel"),
to: Routes.slug_path(@conn, :show, @current_organisation.slug_),
class: "btn btn-secondary" %>
<%= link gettext("Delete organisation"),
to: Routes.organisation_path(@conn, :delete, @current_organisation.slug_),
method: :delete,
class: "btn btn-danger",
data: [confirm: gettext("Are you sure you want to delete the organisation %{org} ?", org: @current_organisation.name || @current_organisation.slug_)] %>
<% else %>
<%= link gettext("Cancel"),
to: Routes.slug_path(@conn, :show, User.login(@current_user)),
class: "btn btn-secondary" %>
<% end %>
<%= submit gettext("Submit"), class: "btn btn-primary" %>
</div>
<% end %>