这是我 Bootstrap Modal 的表单代码:
#myModal.modal.hide.fade{"tabindex" => "-1", role: "dialog", "aria-labellebdy" => "myModalLabel", "aria-hidden" => "true"}
.modal-header
%button{type:"button", class:"close", "data-dismiss" => "modal", "aria-hidden" => "true"} ×
%h3#myModalLabel 创建新相册!
.modal-body
= simple_form_for [@user,@album], :html => {:multipart => true} do |f|
= f.hidden_field :user_id
.form-inputs
= f.input :name
.form-actions
= f.button :submit
.modal-footer
%button{class:"btn", "data-dismiss" => "modal", "aria-hidden" => "true"} 关闭
%button{class:"btn btn-primary"} 确认
问题是怎样用最先面的那个确认代替掉原来 Simple_form_for 里的那个 submit 呢? 谢谢。