76 lines
2.4 KiB
Plaintext
76 lines
2.4 KiB
Plaintext
<h1><%= t('members.edit.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 %></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} %></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>
|
|
<tr>
|
|
<td colspan="2"><%= t('members.edit.edit_dates_warning') %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="member_joined_on"><%= t('members.attributes.joined_on') %></label></td>
|
|
<td><%= form.date_field :joined_on %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="member_expires_on"><%= t('members.attributes.expires_on') %></label></td>
|
|
<td><%= form.date_field :expires_on %></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div>
|
|
<%= form.submit %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<br>
|
|
|
|
<div>
|
|
<%= link_to t('members.edit.actions.back_to_show'), @member %>
|
|
</div>
|