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