= simple_nested_form_for user, url: update_payment_details_settings_path, validate: true, turboboost: true, html: { class: 'form-horizontal', id: 'credit_cards' } do |f| = hidden_field_tag :type, :credit_cards = f.link_to_add 'Add Another Card', :credit_cards, class: 'btn btn-default pull-right bt-sm fs10 mr10', :data => { :target => "#credit-card-fields" } .clearfix.pb10 #credit-card-fields.col-sm-12.col-xs-12.no-margin.no-padding = f.fields_for :credit_cards do |c| .col-sm-11.col-xs-10 = c.input :number, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: c.object.persisted?}, validate: true = c.input :name, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: c.object.persisted?}, validate: true = c.input :expiry_date, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: c.object.persisted?}, validate: true = c.input :cvv, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: c.object.persisted?}, validate: true .col-sm-3 .col-sm-9 = c.input :base, input: false, label: false = c.link_to_remove 'Remove', class: 'pull-right' .col-sm-1.col-xs-1.pt5 = c.check_box :active, class: 'fontawsome-star active', id: "credit-card-active-#{c.index}" label for="credit-card-active-#{c.index}" - if @redirect_url = hidden_field_tag :redirect_url, @redirect_url - if params[:payment_type].present? = hidden_field_tag :payment_type, params[:payment_type] .col-xs-12.col-sm-6.center.mt10 = f.button :submit, 'Save Details', class: 'btn btn-default fs10' .col-xs-12.col-sm-6.center.mt10 = link_to 'Cancel', '#', data: {dismiss: :modal}, class: 'btn btn-default fs10' .clearfix.pb20