8784: Fix test for latest firefox.
[arvados.git] / apps / workbench / app / views / container_requests / _extra_tab_line_buttons.html.erb
1 <% if @object.state == 'Final' %>
2 <script type="application/javascript">
3   function reset_form_cr_reuse() {
4     $('#use_existing').removeAttr('checked');
5   }
6 </script>
7
8   <%= link_to raw('<i class="fa fa-fw fa-play"></i> Re-run...'),
9       "#",
10       {class: 'btn btn-sm btn-primary', 'data-toggle' => 'modal',
11        'data-target' => '#clone-and-edit-modal-window',
12        title: 'This will make a copy and take you there. You can then make any needed changes and run it'}  %>
13
14 <div id="clone-and-edit-modal-window" class="modal fade" role="dialog"
15      aria-labelledby="myModalLabel" aria-hidden="true">
16   <div class="modal-dialog">
17     <div class="modal-content">
18
19     <%= form_tag copy_container_request_path do |f| %>
20
21       <div class="modal-header">
22         <button type="button" class="close" onClick="reset_form_cr_reuse()" data-dismiss="modal" aria-hidden="true">&times;</button>
23         <div>
24           <div class="col-sm-6"> <h4 class="modal-title">Re-run container request</h4> </div>
25         </div>
26         <br/>
27       </div>
28
29       <div class="modal-body">
30               <%= check_box_tag(:use_existing, "true", false) %>
31               <%= label_tag(:use_existing, "Enable container reuse") %>
32       </div>
33
34       <div class="modal-footer">
35         <button class="btn btn-default" onClick="reset_form_cr_reuse()" data-dismiss="modal" aria-hidden="true">Cancel</button>
36         <button type="submit" class="btn btn-primary" name="container_request[state]" value="Uncommitted">Copy and edit inputs</button>
37       </div>
38
39     </div>
40     <% end %>
41   </div>
42 </div>
43
44 <% end %>