= simple_nested_form_for user, url: update_payment_details_settings_path, validate: true, turboboost: true, html: { class: 'form-horizontal', id: 'bank_accounts' } do |f| = hidden_field_tag :type, :bank_accounts .row #bank-account-fields.col-sm-12.col-xs-12.no-margin.no-padding = f.fields_for :bank_accounts do |b| .col-sm-11.col-xs-10 = b.input :name_on_account, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: b.object.persisted?}, validate: true - if b.object.new_record? or b.object.routing_number? = b.input :routing_number, as: :string, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: b.object.persisted?}, validate: true = b.input :account_number, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: b.object.persisted?}, validate: true = b.input :account_number_confirmation, label_html: {class: 'col-sm-3 fs10 lh12'}, wrapper: :horizontal_form, input_html: {disabled: b.object.persisted?, value: b.object.account_number}, validate: true - if b.object.new_record? or b.object.account_type? = b.input :account_type, collection: BankAccount::ACCOUNT_TYPES, label_html: {class: 'col-sm-3 fs10 plr15 pb5 mt-10'}, wrapper: :horizontal_form, input_html: {disabled: b.object.persisted?}, validate: true, prompt: 'Select Account Type' = b.input :base, input: false, label: false = b.link_to_remove 'Remove', class: 'pull-right' - if @redirect_url = hidden_field_tag :redirect_url, @redirect_url .col-sm-1.col-xs-1.pt5 = b.check_box :active, class: 'fontawsome-star active', id: "bank-account-active-#{b.index}" label for="bank-account-active-#{b.index}" .row .col-xs-12.col-sm-12.text-center.mtb15 = f.link_to_add 'Add Another Account', :bank_accounts, class: 'btn-green-book bt-sm fs10', :data => { :target => "#bank-account-fields" } .row .col-xs-12.col-sm-12.text-center.mtb15 = f.button :submit, 'Save Details', class: 'btn-green-book bt-sm fs10 w170 bold' .row .col-xs-12.col-sm-12.text-center.mtb15 = link_to 'Cancel', '#', data: {dismiss: :modal}, class: 'btn-green-book bt-sm fs10 w170' .clearfix.pb20