moved crossing trial addition to modal
[sgn.git] / mason / breeders_toolbox / add_crossing_trial_dialogs.mas
blobf6d5f4b0d4782ff91d47f191443c41c18c17accf
1 <%args>
2 @programs => ()
3 @locations => ()
4 </%args>
6 <& /util/import_javascript.mas, classes => ['CXGN.BreedersToolbox.Crosses', 'CXGN.TrialTreeFolders'] &>
8 <div class="modal fade" id="create_crossingtrial_dialog" name="create_crossingtrial_dialog" tabindex="-1" role="dialog" aria-labelledby="createCrossingTrialDialog">
9     <div class="modal-dialog" role="document">
10         <div class="modal-content ui-front">
11             <div class="modal-header">
12                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
13                 <center><h4 class="modal-title" id="creatCrossingTrial">Add New Crossing Trial</h4></center>
14             </div>
15             <div class="modal-body">
16                 <div class="container-fluid">
18                     <&| /util/workflow.mas, id=> "add_crossing_trial_workflow" &>
19                         <&| /util/workflow.mas:step, title=> "Intro" &>
20                             <& /page/page_title.mas, title=>"What are crossing trials?" &>
22                             <p>Crossing trials are for grouping crosses together. The grouping is most often done for geographic reasons, such as a group of crosses done in the same field trial. This grouping can be used to encapsulate all the crosses done in a crossing block field trial that you have saved in the database (e.g. in Manage Trials your crossing block will appear as a field trial with plots)</p>
23                             <hr>
25                             <center>
26                                 <button class="btn btn-primary" onclick="Workflow.complete(this);">Go to Next Step</button>
27                             </center>
28                         </&>
29                         <&| /util/workflow.mas:step, title=> "Add a crossing trial" &>
30                             <& /page/page_title.mas, title=>"Enter basic information about the crossing trial" &>
32                             <form class="form-horizontal" role="form" name="create_crossingtrial_form" id="create_crossingtrial_form">
33                                 <div class="form-group">
34                                     <label class="col-sm-2 control-lable">Crossing Trial Name: </label>
35                                     <div class="col-sm-10">
36                                         <input class="form-control" id="crossingtrial_name" name="crossingtrial_name" type="text" />
37                                     </div>
38                                 </div>
39                                 <div class="form-group">
40                                     <label class="col-sm-2 control-label">Breeding Program: </label>
41                                     <div class="col-sm-10">
42                                         <select class="form-control" id="crossingtrial_program" name="crossingtrial_program">
43                                             <option value="">Select Breeding Program</option>
44 <%perl>
45     foreach my $program (@programs) {
46         print "<option value=".'"'.@$program[0].'"'.">".@$program[1]."</option>";
47         }
48 </%perl>
49                                         </select>
50                                     </div>
51                                 </div>
52                                 <div class="form-group">
53                                     <label class="col-sm-2 control-label">Location: </label>
54                                     <div class="col-sm-10">
55                                         <select class="form-control" id="crossingtrial_location" name="crossingtrial_location">
56                                             <option value="">Select Location</option>
57 <%perl>
58     foreach my $location (@locations) {
59         print "<option value=".'"'.@$location[1].'"'.">".@$location[1]."</option>";
60     }
61 </%perl>
62                                         </select>
63                                     </div>
64                                 </div>
65                                 <div class="form-group">
66                                     <label class="col-sm-2 control-lable">Year:</label>
67                                     <div class="col-sm-10">
68                                         <select class="form-control" id="add_project_year" name="add_project_year" type="text"></select>
69                                     </div>
70                                 </div>
71                                 <div class="form-group">
72                                     <label class="col-sm-2 control-label">Description:</label>
73                                     <div class="col-sm-10">
74                                         <textarea class="form-control" id="add_project_description" name="add_project_description"  name="add_project_description"></textarea>
75                                     </div>
76                                 </div>
77                             </form>
78                             <br/>
79                             <center>
80                                 <button type="button" class="btn btn-primary" onclick="Workflow.complete(this, false);" name="create_crossingtrial_submit" id="create_crossingtrial_submit">Submit</button>
81                             </center>
82                         </&>
83                         <&| /util/workflow.mas:complete, title=> "Complete" &>
84                             <& /page/page_title.mas, title=>"Finished! Your crossing trial is now in the database" &>
85                             <p>
86                                 <span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span>
87                                 Crossing trial was added successfully
88                             </p>
89                             
90                             <ul>
91                                 <li>You may want to proceed to the crossing trial detail page you just created.</li>
92                                 <li>You can add or upload crosses into your crossing trial as they become available.</li>
93                                 <li>You can add crossing information as it becomes available (e.g. number of seeds, progeny, etc).</li>
94                             </ul>
95                             <br/>
96                         </&>
97                     </&><!-- End of workflow -->
98                 </div>
99             </div>
100             <div class="modal-footer">
101                 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
102             </div>
103         </div>
104     </div>
105 </div>