= simple_form_for(@opportunity, :html => one_submit_only(:opportunity), :remote => true) do |f|
= link_to_close new_opportunity_path
= f.hidden_field :user_id
= hidden_field_tag "contact", "#{@contact.id if @contact}"
= hidden_field_tag "campaign", "#{@campaign.id if @campaign}"
= f.error_messages :object_name => t('opportunity')
= render "opportunities/top_section", :f => f
= render "fields/edit_custom_field_group", :f => f
= render "shared/add_comment", :f => f
= render "fields/groups", :f => f
= render "entities/permissions", :f => f, :entity => @opportunity
.buttonbar
= f.submit t(:create_opportunity), :onclick => %/$("account_assigned_to").value = $F("opportunity_assigned_to"); if ($("account_id").visible()) { $("account_id").enable(); }/
#{t :or}
= link_to_cancel new_opportunity_path