* Add ProfileField model * Fix schema.rb * Add service objects for base and link fields * feat: show an index of profile fields and allow them to be edited * Fix schema.rb * Add service objects for base and link fields * Add link fields to seeds * Make placeholder a keyword argument * Add work fields * Add explanation column to profile fields * Add coding fields * Switch from inheritance to mixin * Add email checkbox to base fields * Add branding fields * Add spec for ProfileFields::FieldDefinition * chore: moved the migration file * feat: add a create and destroy route * feat: render a partial form * fix: oops form instead of f * Move migration back into correct location * Rename column from explanation to description * Rename attribute in mixin * chore: update classed for buttons * chore: rename from explanation to description * chore: explanation to description * chore: new profie field * fix: only one submit button per form * fix: update the form * fix: remove files that got merged mistakenly * chore: finally, some specs... Co-authored-by: Michael Kohl <citizen428@dev.to>
18 lines
697 B
Text
18 lines
697 B
Text
<div class="crayons-card grid p-6 mb-6 gap-1">
|
|
<%= form_for [:internal, 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 [:internal, field] do |form| %>
|
|
<%= render "form", form: form %>
|
|
<%= form.submit class: "btn btn-primary" %>
|
|
<% end %>
|
|
<%= button_to "Delete", internal_profile_field_path(field), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-secondary" %>
|
|
</div>
|
|
<% end %>
|