28 lines
1.2 KiB
Plaintext
28 lines
1.2 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.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} %></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>
|
||
|
</table>
|
||
|
|
||
|
<div>
|
||
|
<%= form.submit %>
|
||
|
</div>
|
||
|
<% end %>
|