<%= render 'page/required_field' %> <%= simple_form_for(@agent) do |f| -%> <%= f.error_messages -%>
<%= f.label t('activerecord.models.agent_type') -%> <%= f.select(:agent_type_id, @agent_types.collect{|p| [p.display_name.localize, p.id]}) -%>
<%- if Setting.family_name_first == true -%> <%= render 'agents/form_family_name_first', :f => f -%> <%- else -%> <%= render 'agents/form_family_name_last', :f => f -%> <%- end -%> <%= f.label :full_name -%>
<%= f.text_field :full_name, :class => 'resource_title' -%>
<%= f.label :full_name_transcription -%>
<%= f.text_field :full_name_transcription, :class => 'resource_title' -%>
<%= link_to_function t('activerecord.attributes.agent.full_name_alternative'), "$('#full_name_alternative').toggle()" -%>
<%= f.label :date_of_birth -%>
<%= f.text_field :birth_date, :class => 'date_field' -%>
<% unless @user %>
<%= f.label :date_of_death -%>
<%= f.text_field :death_date, :class => 'date_field' -%>
<% end %>
<%= f.label t('activerecord.models.language') -%> <%= f.select(:language_id, @languages.collect{|l| [l.display_name.localize, l.id]}) -%>
<%= f.label t('activerecord.models.country') -%> <%= f.select(:country_id, @countries.collect{|c| [c.display_name.localize, c.id]}) -%>
<%= f.label :email -%>
<%= f.email_field :email, :class => 'resource_email' -%>
<%= f.label :url -%>
<%= f.url_field :url, :class => 'resource_url' -%>
<%= f.label t('role.required_role') -%> <%= f.select(:required_role_id, @roles.collect{|r| [r.display_name.localize, r.id]}) -%>
<%= f.submit %>
<%= f.label :note -%>
<%= f.text_area :note, :class => 'resource_textarea' -%>
<%= hidden_field_tag 'work_id', @work.id if @work -%> <%= hidden_field_tag 'expression_id', @expression.id if @expression -%> <%= hidden_field_tag 'manifestation_id', @manifestation.id if @manifestation -%> <%= hidden_field_tag 'item_id', @item.id if @item -%> <%= f.submit %>
<%- end -%>