Change modal delete to take an "remote" option

This commit is contained in:
chris 2013-09-03 15:04:05 +08:00
parent 81a89d2d7c
commit 8045a18230
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<%= render 'node_and_children', node: node %>
</ol>
<%= render 'layouts/delete_modal' %>
<%= render 'layouts/delete_modal', delete_options: {remote: true} %>
<div id="view-page" class="nano" style="display:none">
<div class="page-info clearfix">

View File

@ -8,6 +8,6 @@
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true"><%= (delete_options[:cancel] rescue nil) || t(:close) %></button>
<%= link_to ((delete_options[:submit] rescue nil) || t(:delete_)), nil, class: "delete-item btn btn-danger", method: :delete %>
<%= link_to ((delete_options[:submit] rescue nil) || t(:delete_)), nil, class: "delete-item btn btn-danger", method: :delete, remote: (delete_options[:remote] rescue false) || false %>
</div>
</div>