Hash :
a5224218
Author :
Thomas de Grivel
Date :
2021-12-11T17:49:28
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
<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Invalid parameters</p>
</div>
<% end %>
<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 form-check">
<%= checkbox f, :public_access, class: "form-check-input" %>
<%= label f, :public_access, gettext("Public access ?"), class: "form-check-label" %>
<%= error_tag f, :public_access %>
</div>
<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, :deploy_keys, gettext("Deploy keys (read-only)"), class: "form-label" %>
<%= textarea f, :deploy_keys, class: "form-control" %>
<%= error_tag f, :deploy_keys %>
</div>
<div class="mb-3">
<%= label f, :owner_slug, gettext("Change owner ⚠"), class: "form-label" %>
<%= text_input f, :owner_slug, class: "form-control" %>
<%= error_tag f, :owner_slug %>
</div>
<div class="mb-3">
<%= if @conn.assigns[:repo] do %>
<%= link gettext("Cancel"),
to: Routes.admin_repository_path(@conn, :show, @repo),
class: "btn btn-secondary" %>
<% else %>
<%= link gettext("Cancel"),
to: Routes.admin_repository_path(@conn, :index),
class: "btn btn-secondary" %>
<% end %>
<%= submit gettext("Submit"), class: "btn btn-primary" %>
</div>
<% end %>