:disable_with不使用多个按钮

时间:2013-03-29 12:57:26

标签: ruby-on-rails ruby-on-rails-3 link-to

按钮:disable_with工作正常。

<%= link_to change_status_path(post), :class => "btn btn-large btn btn-danger", :disable_with => "<i class=\"icon-eye-close\"></i> #{t('.unpublish')}",  :confirm => t('.sure_unpublish'), :method => :put do %>
  <i class="icon-eye-close"></i>
  <%= t('.unpublish') %>
<% end %>

但是如果我添加其他按钮:

<%= link_to change_status_path(post), :class => "btn btn-large btn btn-danger", :disable_with => "<i class=\"icon-eye-close\"></i> #{t('.unpublish')}",  :confirm => t('.sure_unpublish'), :method => :put do %>
  <i class="icon-eye-close"></i>
  <%= t('.unpublish') %>
<% end %>

<%= link_to change_status_path(cv), :class => "btn btn-large btn btn-success", :disable_with => "<i class=\"icon-eye-open\"></i> #{t('.publish')}", :confirm => t('.sure_publish'), :method => :put do %>
  <i class="icon-eye-open"></i>
  <%= t('.publish') %>
<% end %>

:disable_with无法使用多个按钮。

我做错了什么?

0 个答案:

没有答案