_confirm_deletion_modal.html.erb 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div id="confirm-scenario-deletion-<%= scenario.id %>" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
  2. <div class="modal-dialog">
  3. <div class="modal-content">
  4. <%= form_for(scenario, url: scenario_path(scenario), method: :delete) do |f| %>
  5. <div class="modal-header">
  6. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  7. <h4 class="modal-title">
  8. <% if @scenario && @scenario == scenario %>
  9. How do you want to delete this Scenario?
  10. <% else %>
  11. How do you want to delete the Scenario '<%= scenario.name %>'?
  12. <% end %>
  13. </h4>
  14. </div>
  15. <div class="modal-body">
  16. <div class="radio">
  17. <%= label_tag do %>
  18. <%= radio_button_tag :mode, '', true %>
  19. <h4><span class="label label-success">Scenario only</span></h4>
  20. Only delete the Scenerio, keep the Agents.
  21. <% end %>
  22. </div>
  23. <div class="radio">
  24. <%= label_tag do %>
  25. <%= radio_button_tag :mode, :unique_agents %>
  26. <h4><span class="label label-warning">Scenario and unique Agents</span></h4>
  27. Also deletes Agents that are used in this Scenario only.
  28. <% end %>
  29. </div>
  30. <div class="radio">
  31. <%= label_tag do %>
  32. <%= radio_button_tag :mode, :all_agents %>
  33. <h4><span class="label label-danger">Scenario and all included Agents</span></h4>
  34. Deletes Scenario and all included Agents, even if they are used in different Scenarios.
  35. <% end %>
  36. </div>
  37. </div>
  38. <div class="modal-footer">
  39. <%= f.button 'Cancel', class: 'btn btn-default', 'data-dismiss' => 'modal' %>
  40. <%= f.submit 'Delete', class: 'btn btn-danger' %>
  41. </div>
  42. <% end %>
  43. </div>
  44. </div>
  45. </div>