- form_tag({:action => 'create'}, :id => 'wrap') do .backgrounds.big-header = text_field 'rule_builder', 'name', :id => 'special_offer_title', :class => 'field_name' .interact-links = Forgeos_save_buttons [forgeos_commerce, :admin, :vouchers] #content.grid_12.omega.special_offers .inner-content %label Description = text_area 'rule_builder', 'description', :rows => 2 .specialOfferFor .specialOffer_header %span.conditioner = I18n.t('special_offer.for').capitalize %div = select_tag 'rule_builder[for]', options_for_select(@for), {:onchange => "change_select_for(this)"} .clear .specialOffers_bottom_arrow .specialOfferIf .specialOffer_header %span.conditioner = I18n.t('special_offer.if').capitalize %div = select 'rule_builder', 'if', [[t(:all, :scope => [:special_offer,:_if]),'All'],[t(:any, :scope => [:special_offer,:_if]),'Any']] %span.conditioner = I18n.t('special_offer.this_condition') %div %select %option= t(:_true, :scope => [:special_offer,:_if]) .clear #rule-conditions .condition %div = select_tag 'rule[targets][]', options_for_select(@product_attributes,{:disabled => @disable_attributes}),{ :onchange => "change_rule(this,'rule-condition')" } %div = select_tag 'rule[conds][]', options_for_select(@conditions) = text_field_tag 'rule[values][]' = link_to_function '', "add_rule('rule-condition')", :class => 'small-icons green-add-icon' = link_to_function '', "remove_rule(this,'rule-condition')", :class => 'small-icons red-delete-icon', :style => 'display : none' .clear .specialOffers_bottom_arrow .specialOfferIf .specialOffer_header %span.conditioner = I18n.t('special_offer.then').capitalize .clear #action-conditions .condition %div= select_tag 'act[targets][]', options_for_select([[t(:discount,:scope=>[:special_offer,:action]),0]], 0) %div= select_tag 'act[conds][]', options_for_select(@discount_type) = text_field_tag 'act[values][]' .specialOffers_bottom_arrow /.specialOfferIf / .specialOffer_header / %span.conditioner / = check_box_tag 'end_offer' / End offer if / %span= select_tag 'end_offer_if', options_for_select(%w(Any All)) / %span.conditioner / of these conditions are true / .clear / #end-conditions / .condition / %div= select_tag 'end[targets][]', options_for_select(['Date','Total number of offer use','Customer number of offer use']) / %div= select_tag 'end[conds][]', options_for_select(@condition_is.collect{|c| [c[0], c[1]] }+ @conditions.collect{|c| [c[0], c[1]] }) / = text_field_tag 'end[values][]' / = link_to_function '', "add_rule('end-condition')", :class => 'small-icons green-add-icon' / = link_to_function '', "remove_rule(this,'end-condition')", :class => 'small-icons red-delete-icon', :style => 'display : none' / .clear / .specialOffers_bottom_arrow #right-sidebar.grid_4.omega .step.status.open %div = select :rule_builder, :active, [[t('unpublished'), 0], [t('published'), 1]], :selected => 1 .clear .step Voucher code : = text_field_tag 'voucher_code' .clear .no-customselect= render :partial => 'admin/special_offers/patterns'