tabletop-companion/app/views/character_sheet_sections/_form.html.erb

16 lines
551 B
Plaintext

<section class="inset">
<%= form_with model: @section, url: character_character_sheet_sections_path(@character) do |f| %>
<%= f.hidden_field :parent_section_id, value: @parent_section&.id %>
<%= f.label :name %>
<%= f.text_field :name %>
<%= display_form_errors(@section, :name) %>
<%= label_tag :template_id, t(".template") %>
<%= collection_select nil, :template_id, @templates, :id, :name, include_blank: " " %>
<%= display_form_errors(@section, :template) %>
<%= f.submit button_text %>
<% end %>
</section>