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

17 lines
560 B
Plaintext
Raw Normal View History

2024-06-14 11:59:35 +00:00
<section class="inset">
<%= form_with model: @text_field, url: character_sheet_section_text_fields_path(@section) do |f| %>
2024-06-17 13:53:09 +00:00
<% if @text_field.new_record? %>
<%= f.fields_for :character_sheet_feature do |ff| %>
<%= ff.hidden_field :featurable_id, value: @text_field.id %>
<%= ff.hidden_field :character_sheet_section_id, value: @section.id %>
<% end %>
<% end %>
2024-06-14 11:59:35 +00:00
<%= f.label :name %>
<%= f.text_field :name %>
<%= display_form_errors(@section, :name) %>
<%= f.submit button_text %>
<% end %>
</section>