Edit

kmx.io/kmxgit/lib/kmxgit_web/templates/organisation/form.html.heex

Branch :

  • lib/kmxgit_web/templates/organisation/form.html.heex
  • <%= 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 %>