添加新功能以确认框

时间:2012-04-16 18:05:33

标签: ruby-on-rails ruby haml

<%= button_to "Acknowledge", ack_something_path, :method => :put, :confirm => "Sure?" %>

我想在确认框中显示

%br
%input{:name => "option1", :type => "checkbox", :value => "Milk"}
Milk                   
%br                   
%input{:name => "option2", :type => "checkbox", :value => "Butter"}                 
Butter                  
%br                   
%input{:name => "option3", :type => "checkbox", :value => "Cheese"}                    
Cheese                      
%br

我不知道该怎么说

1 个答案:

答案 0 :(得分:0)

确认警报不能很好地显示HTML,通常仅用于快速是/否问题或通用警报。如果您想要更强大的消息传递对话框,请查看Jquery UI对话框(http://jqueryui.com/demos/dialog/)。