%= back_url_hidden_field_tag %> <%= error_messages_for 'contact' %>
<%= avatar_to(@contact, :size => "64", :style => "vertical-align: middle;") %> <%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'destroy', :id => @contact.avatar}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'delete', :style => "vertical-align: middle;", :title => l(:button_delete) unless @contact.avatar.blank? %>
<%= label_tag l(:field_contact_avatar) %> <%= file_field_tag 'contact_avatar[file]', :size => 30, :id => nil -%>
<%= f.check_box(:is_company, :label => l(:field_contact_is_company), :onclick => "togglePerson(this)" ) %>
<%= f.text_field :first_name, :label => !@contact.is_company ? l(:field_contact_first_name) : l(:field_company_name), :required => true, :style => "width:90%;" %>
<%= f.text_field :job_title, :label => !@contact.is_company ? l(:field_contact_job_title) : l(:field_company_field) %>
<% @contact.build_address if @contact.address.blank? %> <%= f.fields_for(:address) do |a| %> <%= render :partial => 'common/address_form', :locals => {:f => a} %> <% end %>
<%= f.text_field :phone, :label=>l(:field_contact_phone), :style => "width:90%;" -%>
<%= l(:text_comma_separated) %>
<%= f.text_field 'email', :label=>l(:field_contact_email), :style => "width:90%;" -%>
<%= l(:text_comma_separated) %>
<%= f.text_field 'website', :label=>l(:field_contact_website) -%>
<%= f.text_field 'skype_name', :label=>l(:field_contact_skype) -%>
<% @contact.custom_field_values.each do |value| %>"> <%= custom_field_tag_with_label :contact, value %>
<% end -%><%= f.text_area :background , :cols => 80, :rows => 8, :class => 'wiki-edit', :label=>l(:field_contact_background) %>
<%= wikitoolbar_for 'contact_background' %><%= label_tag l(:label_crm_tags_plural) %> <%= render :partial => "contacts_tags/tags_form" %>
<% if @project %><%= f.select :assigned_to_id, (@project.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true, :label => l(:label_crm_assigned_to) %>
<% end %><%= f.select :visibility, collection_for_visibility_select, :include_blank => false, :label => l(:label_crm_contacts_visibility) %>