saucy/app/views/members/new.html.erb

32 lines
1.8 KiB
Plaintext

<h1><%= t('members.new.title') %></h1>
<%= form_with(model: @member) do |form| %>
<% if @member.errors.any? %>
<div style="color: red">
<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 %>
<table>
<tr><td><label><%= t('members.attributes.display_name') %></label></td><td><%= form.text_field :display_name, required: true %></label></td></tr>
<tr><td><label><%= t('members.attributes.legal_name') %></label></td><td><%= form.text_field :legal_name, required: true %></label></td></tr>
<tr><td><label><%= t('members.attributes.pronouns') %></label></td><td><%= form.text_field :pronouns %></label></td></tr>
<tr><td><label><%= t('members.attributes.email') %></label></td><td><%= form.email_field :email, required: true %></label></td></tr>
<tr><td><label><%= t('members.attributes.category') %></label></td><td><%= form.select :category, %w{student retired unemployed employed}, { include_blank: true }, { required: true } %></label></td></tr>
<tr><td><label><%= t('members.attributes.identification_number') %></label></td><td><%= form.text_field :identification_number %></label></td></tr>
<tr><td><label><%= t('members.attributes.address') %></label></td><td><%= form.text_area :address %></label></td></tr>
<tr><td><label><%= t('members.attributes.wants_mailing_list') %></label></td><td><%= form.check_box :wants_mailing_list %></label></td></tr>
<tr><td><label><%= t('members.attributes.prefers_postal') %></label></td><td><%= form.check_box :prefers_postal %></label></td></tr>
</table>
<div>
<%= form.submit %>
</div>
<% end %>