1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <% if @object.state == 'Final' %>
6 <script type="application/javascript">
7 function reset_form_cr_reuse() {
8 $('#use_existing').removeAttr('checked');
12 <%= link_to raw('<i class="fa fa-fw fa-play"></i> Re-run...'),
14 {class: 'btn btn-sm btn-primary', 'data-toggle' => 'modal',
15 'data-target' => '#clone-and-edit-modal-window',
16 title: 'This will make a copy and take you there. You can then make any needed changes and run it'} %>
18 <div id="clone-and-edit-modal-window" class="modal fade" role="dialog"
19 aria-labelledby="myModalLabel" aria-hidden="true">
20 <div class="modal-dialog">
21 <div class="modal-content">
23 <%= form_tag copy_container_request_path do |f| %>
25 <div class="modal-header">
26 <button type="button" class="close" onClick="reset_form_cr_reuse()" data-dismiss="modal" aria-hidden="true">×</button>
28 <div class="col-sm-6"> <h4 class="modal-title">Re-run container request</h4> </div>
33 <div class="modal-body">
34 <%= check_box_tag(:use_existing, "true", false) %>
35 <%= label_tag(:use_existing, "Enable container reuse") %>
38 <div class="modal-footer">
39 <button class="btn btn-default" onClick="reset_form_cr_reuse()" data-dismiss="modal" aria-hidden="true">Cancel</button>
40 <button type="submit" class="btn btn-primary" name="container_request[state]" value="Uncommitted">Copy and edit inputs</button>