graphical filtering of accession search
[sgn.git] / mason / barcode / multi_tool_input.mas
blob0cfffbb829dc1d64bc5620d7d0da8ab04044c9fa
2 <%args>
3 @locations
4 @projects
5 @available_cvterms
6 </%args>
8 <%perl>
9 use DateTime;
10 my $dt = DateTime->from_epoch( epoch=>time );
11 my $date = join "/", ($dt->year, $dt->month, $dt->day);
12 </%perl>
14 <form class="form-horizontal" role="form" method="GET" action="/barcode/multitool">
15   <div class="form-group form-group-sm">
16     <label class="col-sm-2 control-label">Operator: </label>
17     <div class="col-sm-10">
18       <input type="text" class="form-control" id="operator" name="operator" />
19     </div>
20   </div>
21   <div class="form-group form-group-sm">
22     <label class="col-sm-2 control-label">Date: </label>
23     <div class="col-sm-10">
24       <input type="text" class="form-control" id="date" name="date" value="<% $date %>" placeholder="Format: YYYY/MM/DD" />
25     </div>
26   </div>
27   <div class="form-group form-group-sm">
28     <label class="col-sm-2 control-label">Location: </label>
29     <div class="col-sm-10">
30       <& /page/html_select.mas, name=>'location', choices=>\@locations &>
31       <br/>[<a href="/breeders/locations">Add New Location</a>]
32     </div>
33   </div>
34   <div class="form-group form-group-sm">
35     <label class="col-sm-2 control-label">Project: </label>
36     <div class="col-sm-10">
37       <& /page/html_select.mas, name=>'project', choices=>\@projects &>
38       <br/>[<a href="/breeders/trials">Add New Project</a>]
39     </div>
40   </div>
41   <div class="form-group form-group-sm">
42     <label class="col-sm-2 control-label">Trait(s): </label>
43     <div class="col-sm-10">
44       <select multiple class="form-control" id="cvterms" name="cvterms">
45 <%perl>
46 foreach my $t (@available_cvterms) {
47    if ($t =~ /\#/) { next; }
48    my ($cvterm, $version, $priority, $values, $description) = split /\t/, $t;
49    if ($priority) { 
50      print qq { <option value="$cvterm">$description</option> };
51    }
53 </%perl>
54       </select>
56     </div>
57   </div>
58   <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="generate form">Generate Form</button>
59 </form>
61 <br/>
63 <!--
64 <form method="GET" action="/barcode/multitool">
65 <table>
67 <tr><td>Operator </td><td><input id="operator" name="operator" /></td></tr>
68 <tr><td>Date </td><td><input id="date" name="date" value="<% $date %>" /> (format: YYYY/MM/DD)</td></tr>
69 <tr><td>Location</td><td>
70     <& /page/html_select.mas, name=>'location', choices=>\@locations &> [<a href="/breeders/home">Add new location</a>]</td></tr> 
71 <tr><td>Project</td><td>
72     <& /page/html_select.mas, name=>'project', choices=>\@projects &> [<a href="/breeders/home">Add new project</a>]</td></tr>
73 </table>
76 <select multiple id="cvterms" name="cvterms" size="15">
77 <%perl>
78 foreach my $t (@available_cvterms) {
79    if ($t =~ /\#/) { next; }
80    my ($cvterm, $version, $priority, $values, $description) = split /\t/, $t;
81    if ($priority) { 
82      print qq { <option value="$cvterm">$description</option> };
83    }
85 </%perl>
86 </select>
88 <input type="submit" value="generate form" />
90 </form>
91 -->