<% unless @image.nil? %> <%= form_for @image do |f| %> <% if @image.errors.any? %>

<%= pluralize(@image.errors.count, "erreur") %> <%= I18n.t('prohibited_this_operation') %>:

<% end %> <%= hidden_field_tag "record_id", @record_id %> <% if @tri %> <%= hidden_field_tag "tri", @tri %> <%= hidden_field_tag "errtyp", @errtyp %> <% end %>
<%= image_tag(@image.medium_location, size: fit_square(@image.ratio,160)) %> <% im_date = @image.date_created %> <% im_date = I18n.l(im_date) unless im_date.nil? %>
<%= f.label I18n.t('date_created') %><%= text_field_tag "image[date_created]", im_date, maxlength: 50, size: 25, class: 'datepicker-img' -%>
<%= f.label I18n.t('headline') %> <%= f.text_field(:headline, :size => 100) %>
<%= f.label I18n.t('description') %> <%= f.text_area(:description, :cols => 72, :rows => 10) %>
<%= f.label I18n.t('iptc_country') %> <%= f.text_field(:country, :size => 100) %>
<%= f.label I18n.t('city') %> <%= f.text_field(:city, :size => 100) %>
<%= f.label I18n.t('source',provider_word: I18n.t(session[:provider_word], count: 1)).capitalize %> <%= f.text_field(:source, :size => 100) %>
<%= f.label I18n.t('creator_iptc',creator_word: (I18n.t(session[:creator_word]))) %> <%= f.text_field(:creator, :size => 100) %>
<%= f.label I18n.t('rights') %> <%= f.text_field(:rights, :size => 100) %>
<%= f.label I18n.t('credit') %> <%= f.text_field(:credit, :size => 100) %>
<%= f.label I18n.t('normalized_credit') %> <%= @image.normalized_credit %>
<%= f.label I18n.t('subject') %> <%= f.text_area(:subject, :cols => 72, :rows => 10) %>
<%= f.label I18n.t('instructions') %> <%= f.text_field(:instructions, :size => 100) %>
<%= f.label I18n.t('reception_date') %> <%= I18n.l(@image.reception_date) %>
<%= f.label I18n.t('original_filename') %> <%= @image.original_filename %>
<%= f.submit "Valider modifications" %> <%= button_tag(I18n.t('close')) %>
<% end %> <% end %>