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

21 lines
664 B
Plaintext
Raw Normal View History

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