<p>
  <label><%= l(:label_crm_user_format) %></label>
  <%= select_tag 'settings[name_format]', options_for_select(Contact::CONTACT_FORMATS.collect{|key, value| [key, value[:setting_order]]}.sort{|a, b| a[1] <=> b[1]}.collect{|f| [Contact.new(:first_name => 'Firstname', :last_name => 'Lastname', :middle_name => 'Middlename').name(f[0]), f[0].to_s]}, @settings["name_format"] ) %>
</p>
<p>
  <label><%= l(:label_crm_default_list_style) %></label>
  <%= select_tag 'settings[default_list_style]', options_for_select([[l(:label_crm_list_excerpt), "list_excerpt"], [l(:label_crm_list_list), "list"], [l(:label_crm_list_cards), "list_cards"]] , @settings["default_list_style"]) %>
</p>

<p>
  <%= label_tag 'settings_select_companies_to_deal', l(:label_crm_select_companies) %>
  <%= check_box_tag 'settings[select_companies_to_deal]', 1, @settings["select_companies_to_deal"] %>
</p>

<p>
  <%= label_tag 'settings_cross_project_contacts', l(:label_crm_cross_project_contacts) %>
  <%= check_box_tag 'settings[cross_project_contacts]', 1, @settings["cross_project_contacts"] %>
</p>

<p>
  <label><%= l(:label_crm_post_address_format) %></label>
  <%= text_area_tag  'settings[post_address_format]', ContactsSetting.post_address_format, :rows => 5 %>
  <em class="info"><%= l(:label_crm_post_address_format_macros, :macros => '%street1%, %street2%, %city%, %town%, %postcode%, %zip%, %region%, %state%, %country%') %></em>
</p>

<p>
  <label><%= l(:label_crm_default_country) %></label>
  <%= select_tag  'settings[default_country]', options_for_select(countries_for_select, ContactsSetting.default_country) %>
</p>

<p>
  <label><%= l(:label_crm_show_in_top_menu) %></label>
  <span id="watchers_inputs">
    <span class="floating" style="margin-left: 0px;">
    <%= check_box_tag 'settings[contacts_show_in_top_menu]', 1, @settings["contacts_show_in_top_menu"] %>
    <%= l(:label_contact_plural) %>
    </span>
    <span class="floating" style="margin-left: 0px;">
    <%= check_box_tag 'settings[deals_show_in_top_menu]', 1, @settings["deals_show_in_top_menu"] %>
    <%= l(:label_deal_plural) %>
    </span>
  </span>
</p>

<p>
  <label><%= l(:label_crm_show_in_app_menu) %></label>
  <span id="watchers_inputs">
    <span class="floating" style="margin-left: 0px;">
    <%= check_box_tag 'settings[contacts_show_in_app_menu]', 1, @settings["contacts_show_in_app_menu"] %>
    <%= l(:label_contact_plural) %>
    </span>
    <span class="floating" style="margin-left: 0px;">
    <%= check_box_tag 'settings[deals_show_in_app_menu]', 1, @settings["deals_show_in_app_menu"] %>
    <%= l(:label_deal_plural) %>
    </span>
  </span>
</p>


<p>
  <%= label_tag 'settings_note_authoring_time', l(:label_crm_contact_note_authoring_time) %>
  <%= check_box_tag 'settings[note_authoring_time]', 1, @settings["note_authoring_time"] %>
</p>


<p>
  <%= label_tag 'settings_show_closed_issues', l(:label_crm_contact_show_closed_issues) %>
  <%= check_box_tag 'settings[show_closed_issues]', 1, @settings["show_closed_issues"] %>
</p>
<p>
  <%= label_tag 'settings_auto_contacts_thumbnails', l(:label_crm_thumbnails_enabled) %>
  <%= check_box_tag 'settings[auto_contacts_thumbnails]', 1, @settings["auto_contacts_thumbnails"] %>
</p>

<% unless Redmine::Thumbnail.convert_available?  %>
<p>
  <label><%= l(:label_crm_max_thumbnail_file_size) %></label>
  <%= text_field_tag 'settings[max_contacts_thumbnail_file_size]', @settings["max_contacts_thumbnail_file_size"], :size => 6 %> <%= l(:"number.human.storage_units.units.kb") %>
</p>
<% end %>

<p>
  <%= label_tag 'settings_monochrome_tags', l(:label_crm_monochrome_tags) %>
  <%= check_box_tag 'settings[monochrome_tags]', 1, @settings["monochrome_tags"] %>
</p>
