1 <% if @object.state == 'Final' %>
2 <script type="application/javascript">
3 function reset_form_cr_reuse() {
4 $('#use_existing').removeAttr('checked');
8 <%= link_to raw('<i class="fa fa-fw fa-play"></i> Re-run...'),
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'} %>
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">
19 <%= form_tag copy_container_request_path do |f| %>
21 <div class="modal-header">
22 <button type="button" class="close" onClick="reset_form_cr_reuse()" data-dismiss="modal" aria-hidden="true">×</button>
24 <div class="col-sm-6"> <h4 class="modal-title">Re-run container request</h4> </div>
29 <div class="modal-body">
30 <%= check_box_tag(:use_existing, "true", false) %>
31 <%= label_tag(:use_existing, "Enable container reuse") %>
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>