Hash :
c5b0aca3
Author :
Thomas de Grivel
Date :
2021-12-09T11:24:45
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
<%= form_for @changeset, Routes.admin_user_path(@conn, :update, @user), fn f -> %>
<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, :email, class: "form-label" %>
<%= text_input f, :email, class: "form-control" %>
<%= error_tag f, :email %>
</div>
<%= inputs_for f, :slug, fn ff -> %>
<div class="mb-3">
<%= label ff, :slug, gettext("Login"), class: "form-label" %>
<%= text_input ff, :slug, class: "form-control" %>
<%= error_tag ff, :slug %>
</div>
<% end %>
<div class="mb-3">
<%= label f, :description, class: "form-label" %>
<%= textarea f, :description, class: "form-control" %>
<%= error_tag f, :description %>
</div>
<div class="mb-3">
<%= label f, :ssh_keys, gettext("SSH keys"), class: "form-label" %>
<%= textarea f, :ssh_keys, class: "form-control" %>
<%= error_tag f, :ssh_keys %>
</div>
<div class="mb-3 form-check">
<%= checkbox f, :is_admin, class: "form-check-input" %>
<%= label f, :is_admin, class: "form-check-label" %>
<%= error_tag f, :is_admin %>
</div>
<div class="mb-3 form-check">
<%= checkbox f, :deploy_only, class: "form-check-input" %>
<%= label f, :deploy_only, class: "form-check-label" %>
<%= error_tag f, :deploy_only %>
</div>
<div class="mb-3">
<%= if @conn.assigns[:user] do %>
<%= link gettext("Cancel"),
to: Routes.admin_user_path(@conn, :show, @user),
class: "btn btn-secondary" %>
<% else %>
<%= link gettext("Cancel"),
to: Routes.admin_user_path(@conn, :index),
class: "btn btn-secondary" %>
<% end %>
<%= submit gettext("Submit"), class: "btn btn-primary" %>
</div>
<% end %>