docbrown/app/views/admin/profile_fields/index.html.erb
Ridhwana a191fd2ca7
[deploy] Profile Admin UI Setup Screen Refactor (v1.5) (#9649)
* implement some suggestions from https://github.com/forem/forem/pull/9610

* chore: update the errors based on suggestions

* feat: make query readable on blazer
2020-08-07 17:35:18 -04:00

18 lines
682 B
Text

<div class="crayons-card grid p-6 mb-6 gap-1">
<%= form_for [:admin, ProfileField.new], html: { class: "inline-form" } do |form| %>
<div class="form-group">
<%= render "form", form: form %>
<%= form.submit class: "btn btn-primary" %>
</div>
<% end %>
</div>
<% @profile_fields.each do |field| %>
<div class="crayons-card grid p-6 mb-6 gap-1">
<%= form_for [:admin, field] do |form| %>
<%= render "form", form: form %>
<%= form.submit class: "btn btn-primary" %>
<% end %>
<%= button_to "Delete", admin_profile_field_path(field), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-secondary" %>
</div>
<% end %>