8784: Fix test for latest firefox.
[arvados.git] / apps / workbench / app / views / container_requests / _show_inputs.html.erb
1 <%
2 n_inputs = if @object.mounts[:"/var/lib/cwl/workflow.json"] && @object.mounts[:"/var/lib/cwl/cwl.input.json"]
3              cwl_inputs_required(@object, get_cwl_inputs(@object.mounts[:"/var/lib/cwl/workflow.json"][:content]), [:mounts, :"/var/lib/cwl/cwl.input.json", :content])
4            else
5              0
6            end
7 %>
8
9 <% content_for :pi_input_form do %>
10 <form role="form" style="width:60%">
11   <div class="form-group">
12     <% workflow = @object.mounts[:"/var/lib/cwl/workflow.json"].andand[:content] %>
13     <% if workflow %>
14       <% inputs = get_cwl_inputs(workflow) %>
15       <% inputs.each do |input| %>
16         <label for="#input-<%= cwl_shortname(input[:id]) %>">
17           <%= input[:label] || cwl_shortname(input[:id]) %>
18         </label>
19         <div>
20           <p class="form-control-static">
21             <%= render_cwl_input @object, input, [:mounts, :"/var/lib/cwl/cwl.input.json", :content] %>
22           </p>
23         </div>
24         <p class="help-block">
25           <%= input[:doc] %>
26         </p>
27       <% end %>
28     <% end %>
29   </div>
30 </form>
31 <% end %>
32
33 <% if n_inputs == 0 %>
34   <p><i>This workflow does not need any further inputs specified.  Click the "Run" button at the bottom of the page to start the workflow.</i></p>
35 <% else %>
36   <p><i>Provide <%= n_inputs > 1 ? 'values' : 'a value' %> for the following <%= n_inputs > 1 ? 'parameters' : 'parameter' %>, then click the "Run" button to start the workflow.</i></p>
37 <% end %>
38
39 <% if @object.editable? %>
40   <%= content_for :pi_input_form %>
41   <%= link_to(url_for('container_request[state]' => 'Committed'),
42         class: 'btn btn-primary run-pipeline-button',
43         method: :patch
44         ) do %>
45     Run <i class="fa fa-fw fa-play"></i>
46   <% end %>
47 <% end %>
48
49 <%= render_unreadable_inputs_present %>