<%= l(:label_crm_bulk_edit_selected_contacts) %>

<%= form_tag(:action => 'bulk_update', :project_id => @project) do %> <%= @contacts.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %>
<%= l(:label_change_properties) %>

<%= text_field_tag('contact[company]', '') %> <%= javascript_tag "observeAutocompleteField('contact_company', '#{escape_javascript auto_complete_companies_path(:project_id => @project)}')" %>

<% @custom_fields.each do |custom_field| %>

<%= custom_field_tag_for_bulk_edit('contact', custom_field, @projects) %>

<% end %>

<%= select_tag('contact[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_nobody), :value => 'none') + options_from_collection_for_select(@assignables, :id, :name)) %>

<%= select_tag 'contact[visibility]', options_for_select(collection_for_visibility_select) %>

<%= text_field_tag('contact[job_title]', '') %>

<%= text_field_tag 'contact[address_attributes][city]' -%>

<%= text_field_tag 'contact[address_attributes][region]' -%>

<%= select_tag 'contact[address_attributes][country_code]', options_for_select(l(:label_crm_countries).map{|k, v| [v, k]}), :include_blank => true -%>

<%= l(:label_crm_tags_plural) %>

<%= text_field_tag 'add_tag_list', '', :size => 10 %><%= tagsedit_with_source_for("#add_tag_list", auto_complete_contact_tags_path(:project_id => @project)) %>

<%= text_field_tag 'delete_tag_list', '', :label => :field_contact_tag_names, :size => 10 %><%= tagsedit_with_source_for("#delete_tag_list", auto_complete_contact_tags_path(:project_id => @project)) %>

<% if @add_projects.any? %>
<%= l(:label_project_plural) %>

<%= select_tag 'add_projects_list[]', content_tag('option', l(:label_no_change_option), :value => '', :selected => 'selected') + project_tree_options_for_select(@add_projects), :multiple => false %>

<%= select_tag 'delete_projects_list[]', content_tag('option', l(:label_no_change_option), :value => '', :selected => 'selected') + project_tree_options_for_select(@add_projects), :multiple => false %>

<% end %>
<%= l(:field_notes) %> <%= text_area_tag 'note[content]', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %> <%= wikitoolbar_for 'note_content' %>

<%= submit_tag l(:button_submit) %>

<% end %>