a b/qiita_pet/templates/select_commands.html
1
{% extends sitebase.html %}
2
{% autoescape None %}
3
4
{%block head%}
5
6
<script>
7
  function check_selection(){
8
    if($('.command:checkbox:checked').length > 0){
9
       return true;
10
   }else {
11
        $('#error').text('Please select at least one command.');
12
       return false;
13
   }
14
  }
15
16
  $(function () {
17
    $('#data-types-tabs a:first').tab('show')
18
  })
19
</script>
20
{%end%}
21
22
{%block content %}
23
24
<h1>Select Commands</h1>
25
<span id="error" style="color:red"></span>
26
<form role="form" action="{% raw qiita_config.portal_dir %}/analysis/wait/{{aid}}" method="post" onsubmit="return check_selection()">
27
28
<div>
29
<table class="table">
30
  <tr>
31
    <td style="width:100px;">
32
      Rarefaction Depth: <input type="number" min="10" id="rarefaction-depth" name="rarefaction-depth" class="form-control" style="width:10em;">
33
    </td>
34
    <td style="width:10px;">&nbsp;</td>
35
    <td style="text-align:left;vertical-align:middle;">
36
      <table>
37
        <tr>
38
          <td style="width:20px;">
39
            <input type="checkbox" id="merge-duplicated-sample-ids" name="merge-duplicated-sample-ids" class="form-control">
40
          </td>
41
          <td>
42
            <label style="font-weight:normal;" for="merge-duplicated-sample-ids">Merge same sample ids</label>
43
          </td>
44
        </tr>
45
        <tr>
46
          <td colspan="2">
47
            <small>
48
              Merging sample ids is useful for when you have the same sample in different preparations of the
49
              same data, i.e. a sample processed twice in 16S. When the samples are not merged, they are prefixed
50
              with the artifact id.
51
            </small>
52
          </td>
53
        </tr>
54
      </table>
55
    </td>
56
  </tr>
57
</table>
58
59
</div>
60
61
<ul class="nav nav-tabs" id="data-types-tabs">
62
  {% for data_type in data_types %}
63
    <li><a href="#{{ data_type }}" data-toggle="tab">{{ data_type }}</a></li>
64
  {% end %}
65
</ul>
66
67
<div class="tab-content">
68
{% for data_type in data_types %}
69
  <div class="tab-pane" id="{{ data_type }}">
70
        <table class="table">
71
          <tr>
72
            <th style="width:20px;"></th>
73
            <th>Command</th>
74
          </tr>
75
          {% for command in commands[data_type] %}
76
            <tr>
77
              <td style="width:20px;">
78
                <input id="{{data_type}}#{{command.name}}" type="checkbox" name="commands" class="command" value="{{data_type}}#{{command.name}}">
79
              </td>
80
              <td>
81
                <label style="font-weight:normal;" for="{{data_type}}#{{command.name}}">{{command.name}}</label>
82
              </td>
83
            </tr>
84
          {% end %}
85
        </table>
86
  </div>
87
{% end %}
88
</div>
89
  <button type="submit" class="btn btn-default">Start Processing</button>
90
</form>
91
{% end %}