Merge pull request #5248 from solgenomics/topic/batch_update_trials
[sgn.git] / mason / tracking_activities / edit_tracking_activity_project_details.mas
blob24aa7649a27284b07ba2a85a002a07c4d251c7bd
1 <%args>
2 $trial_name
3 $breeding_program_id
4 $location_id
5 $year
6 $trial_description
7 $harvest_date
8 $planting_date
9 </%args>
11 <div class="modal fade" id="tracking_activity_project_details_edit_dialog" tabindex="-1" role="dialog" aria-labelledby="trackingActivityProjectDetailsEditDialog">
12     <div class="modal-dialog modal-xl" role="document">
13         <div class="modal-content ui-front">
14             <div class="modal-header text-center">
15                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
16                 <h4 class="modal-title" id="trackingActivityDetailsEditDialog">Edit Tracking Activity Project Details</h4>
17             </div>
18             <div class="modal-body" id="trial_details_edit_body">
19                 <div class="container-fluid">
20                     <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" encoding="multipart/form-data">
21                         <div class="form-group">
22                             <label class="col-sm-3 control-label" for="edit_trial_name">Projec Name: </label>
23                                 <div class="col-sm-8">
24                                     <div class="input-group">
25                                         <input class="form-control col-sm-8" id="edit_trial_name" title="name" type="text" value="<%$trial_name%>" aria-describedby="edit_trial_name_status"/>
26                                     </div>
27                                 </div>
28                         </div>
29                         <div class="form-group">
30                             <label class="col-sm-3 control-label" for="edit_trial_breeding_program">Breeding Program: </label>
31                                 <div class="col-sm-8">
32                                     <div class="input-group">
33                                         <select class="form-control" id="edit_trial_breeding_program" title="breeding_program" value="<%$breeding_program_id%>"></select>
34                                     </div>
35                                 </div>
36                         </div>
37                         <div class="form-group">
38                             <label class="col-sm-3 control-label" for="edit_trial_location">Location: </label>
39                                 <div class="col-sm-8">
40                                     <div class="input-group">
41                                         <select class="form-control" id="edit_trial_location" title="location" value="<%$location_id%>"></select>
42                                     </div>
43                                 </div>
44                         </div>
45                         <div class="form-group">
46                             <label class="col-sm-3 control-label" for="edit_trial_year">Year: </label>
47                                 <div class="col-sm-8">
48                                     <div class="input-group">
49                                         <select class="form-control" id="edit_trial_year" title="year" value="<%$year%>"></select>
50                                     </div>
51                                 </div>
52                         </div>
53                         <div class="form-group" style="display:none;>
54                             <label class="col-sm-3 control-label" for="edit_trial_planting_date">Planting Date: </label>
55                                 <div class="col-sm-8">
56                                     <div class="input-group">
57                                         <span class="input-group-btn"><button class="btn btn-default" id="clear_planting_date" type="button">Clear</button></span>
58                                         <input class="form-control" id="edit_trial_planting_date" title="planting_date" type="text" value="<%$planting_date%>"/>
59                                     </div>
60                                 </div>
61                         </div>
62                         <div class="form-group" style="display:none;>
63                             <label class="col-sm-3 control-label" for="edit_trial_harvest_date">Harvest Date: </label>
64                                 <div class="col-sm-8">
65                                     <div class="input-group">
66                                         <span class="input-group-btn"><button class="btn btn-default" id="clear_harvest_date" type="button">Clear</button></span>
67                                         <input class="form-control" id="edit_trial_harvest_date" title="harvest_date" type="text" value="<%$harvest_date%>"/>
68                                     </div>
69                                 </div>
70                         </div>
71                         <div class="form-group">
72                             <label class="col-sm-3 control-label" for="edit_trial_description">Description: </label>
73                                 <div class="col-sm-8">
74                                     <div class="input-group">
75                                         <textarea class="form-control" id="edit_trial_description" title="description" rows="5" maxlength="250"><% $trial_description %></textarea>
76                                     </div>
77                                 </div>
78                         </div>
79                         <div id="edit_trial_type" style="display:none;">
80                         </div>
81                         <div id="edit_trial_field_size" style="display:none;">
82                         </div>
83                         <div id="edit_trial_plot_width" style="display:none;">
84                         </div>
85                         <div id="edit_trial_plot_length" style="display:none;">
86                         </div>
87                         <div id="edit_trial_plan_to_genotype" style="display:none;">
88                         </div>
89                         <div id="edit_trial_plan_to_cross" style="display:none;">
90                         </div>
91                     </form>
92                 </div>
93             </div>
94             <div class="modal-footer">
95                 <p class="text-success vertical-align pull-left"><span class="glyphicon glyphicon-pencil"></span> Indicates pending change</p>
96                 <button type="button" class="btn btn-default" data-dismiss="modal" id="edit_trial_details_cancel_button">Cancel</button>
97                 <button type="button" class="btn btn-primary" id="save_trial_details">Save Changes</button>
98             </div>
99         </div>
100     </div>
101 </div>
103 <div class="modal fade" id="trial_details_saved_dialog" tabindex="-1" role="dialog" aria-labelledby="trialDetailsSavedDialog">
104     <div class="modal-dialog" role="document">
105         <div class="modal-content ui-front">
106             <div class="modal-header text-center">
107                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
108                 <h4 class="modal-title" id="trialDetailsSavedDialog">Details Saved</h4>
109             </div>
110             <div class="modal-body" id="trial_details_saved_body">
111                 <ul class="list-group" id="trial_details_saved_message"></ul>
112             </div>
113             <div class="modal-footer">
114                 <button id="trial_details_saved_close_button" type="button" class="btn btn-default" data-dismiss="modal">Close & Reload</button>
115             </div>
116         </div>
117     </div>
118 </div>
120 <div class="modal fade" id="trial_details_error_dialog" tabindex="-1" role="dialog" aria-labelledby="trialDetailsErrorDialog">
121     <div class="modal-dialog" role="document">
122         <div class="modal-content ui-front">
123             <div class="modal-header text-center">
124                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
125                 <h4 class="modal-title" id="trialDetailsErrorDialog">Error Saving Tracking Activity Project Details</h4>
126             </div>
127             <div class="modal-body" id="trial_details_error_body">
128                 <ul class="list-group" id="trial_details_error_message"></ul>
129             </div>
130             <div class="modal-footer">
131                 <button id="trial_details_error_close_button" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
132             </div>
133         </div>
134     </div>
135 </div>
137 <script>
139 jQuery(document).ready(function(){
141     jQuery('#edit_tracking_activity_project_details').click(function(){
142         jQuery('#tracking_activity_project_details_edit_dialog').modal("show");
143         edit_trial_details();
144     });
148 </script>