Add family members
This commit is contained in:
parent
e588ab3db0
commit
ab00344de0
19 changed files with 292 additions and 1 deletions
27
app/views/members/_form.html.erb
Normal file
27
app/views/members/_form.html.erb
Normal file
|
@ -0,0 +1,27 @@
|
|||
<%= form_with(model: member, class: "contents") do |form| %>
|
||||
<% if member.errors.any? %>
|
||||
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
|
||||
<h2><%= pluralize(member.errors.count, "error") %> prohibited this member from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% member.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :name %>
|
||||
<%= form.text_field :name, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :pays %>
|
||||
<%= form.check_box :pays, class: "block mt-2 h-5 w-5" %>
|
||||
</div>
|
||||
|
||||
<div class="inline">
|
||||
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
|
||||
</div>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue