.remote
= form_for(@lead, :url => promote_lead_path(@lead), :html => one_submit_only(:lead), :remote => true) do |f|
= link_to_close convert_lead_path(@lead)
= fields_for(@account) do |a|
= a.hidden_field :user_id
= a.hidden_field :access
= error_messages_for :account, :opportunity, :object_name => t('lead')
.section
%small
#{t(:convert_lead_text, @lead.full_name)}
%table
%tr
%td
.label.req
#{t :account}
%span#account_create_title
(#{t :create_new} #{t :or} #{t :select_existing}):
%span#account_select_title
(#{t :create_new} #{t :or} #{t :select_existing}):
%span#account_disabled_title :
= collection_select :account, :id, @accounts, :id, :name, { :selected => (@account.id || 0), :include_blank => true }, { :style => "width:330px; display:none;" }
= a.text_field :name, :style => "width:324px; display:none;"
%td= spacer
%td
.label.req #{t :assigned_to}:
= user_select(:account, all_users, current_user)
= render "leads/opportunity"
= render "leads/convert_permissions"
.buttonbar
= f.submit t(:convert_lead)
#{t :or}
= link_to_cancel convert_lead_path(@lead)