app/views/leads/_opportunity.html.haml
= fields_for(@opportunity) do |o|
= o.hidden_field :user_id
= o.hidden_field :access
= o.hidden_field :assigned_to
= o.hidden_field :campaign_id
= o.hidden_field :source
.subtitle #{t :opportunity}
.section
%small
#{t(:create_opp_for_contact, @lead.full_name)}
%table
%tr
%td
.label #{t :name}:
= o.text_field :name, style: "width:325px"
%td= spacer
%td
.label #{t :stage}:
= o.select :stage, Setting.unroll(:opportunity_stage), { selected: @opportunity.stage ? @opportunity.stage.to_sym : nil }, { style: "width:160px", class: 'select2' }
%table
%tr
%td
.label #{t :close_date}:
= o.text_field :closes_on, style: "width:110px;", autocomplete: :off, class: 'date'
%td= spacer
%td
.label #{t :probability} (%):
= o.text_field :probability, style: "width:110px; text-align:right;"
%td= spacer
%td
.label #{t :amount} #{t :currency}:
= o.text_field :amount, style: "width:110px; text-align:right;"
%td= spacer
%td
.label #{t :discount} #{t :currency}:
= o.text_field :discount, style: "width:110px; text-align:right;"