8 <div class="modal fade" id="add_transformants_using_list_dialog" name="add_transformants_using_list_dialog" tabindex="-1" role="dialog" aria-labelledby="addTransformantsUsingListDialog">
9 <div class="modal-dialog modal-lg" role="document">
10 <div class="modal-content ">
11 <div class="modal-header">
12 <button type="reset" class="close" id="add_transformants_using_list_dismiss_button_1" name="add_transformants_using_list_dismiss_button" aria-label="Close"><span aria-hidden="true">×</span></button>
13 <center><h4 class="modal-title" id="addTransformantsUsingList">Add New Transformants Using a List</h4></center>
15 <div class="modal-body">
16 <div class="container-fluid">
17 <form class="form-horizontal" role="form" name="add_new_transformants_form" id="add_new_transformants_form">
18 <div class="form-group">
19 <label class="control-label col-sm-6">Select a List of Accessions to Add:</label>
20 <div class="col-sm-6" >
21 <div class="input-group">
22 <select class="form-control" id="new_transformants_list_select"></select>
29 <div class="modal-footer">
30 <button type="button" class="btn btn-primary" id="new_transformants_list_submit">Submit</button>
31 <button id="add_transformants_using_list_dismiss_button_2" name="add_transformants_using_list_dismiss_button" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
37 <div class="modal fade" id="add_transformants_using_list_saved_dialog_message" name="add_transformants_using_list_saved_dialog_message" tabindex="-1" role="dialog" aria-labelledby="addTransformantsUsingListSavedDialog">
38 <div class="modal-dialog" role="document">
39 <div class="modal-content">
40 <div class="modal-header">
41 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
42 <h4 class="modal-title" id="addTransformantsUsingListSavedDialog">Success</h4>
44 <div class="modal-body">
45 <div class="container-fluid">
47 <span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span>
48 The new transformants were stored successfully.
52 <div class="modal-footer">
53 <button id="dismiss_add_transformants_using_list_saved_dialog" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
59 <div class="modal fade" id="add_transformants_using_list_error_dialog" name="add_transformants_using_list_error_dialog" tabindex="-1" role="dialog" aria-labelledby="addTransformantsUsingListErrorDialog">
60 <div class="modal-dialog modal-lg" role="document">
61 <div class="modal-content">
62 <div class="modal-header">
63 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
64 <h4 class="modal-title" id="addTransformantsUsingListErrorDialog">Add Transformants Error</h4>
66 <div class="modal-body">
67 <div class="container-fluid">
73 <div class="modal-footer">
74 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
83 jQuery(document).ready(function(){
85 var lo = new CXGN.List();
87 jQuery('#new_transformants_list_select').html(lo.listSelect('new_transformants_list_select', ['accessions'], 'Select a list', undefined, undefined));
90 jQuery('#add_transformants_using_list_link').click(function(){
91 jQuery('#add_transformants_using_list_dialog').modal('show');
94 jQuery("#new_transformants_list_submit").click(function(){
95 var transformants_list_id = jQuery('#new_transformants_list_select').val();
97 if (!transformants_list_id) {
98 alert("Please select a list");
103 url : '/ajax/transformation/add_transformants_using_list',
107 'list_id' : transformants_list_id,
108 'transformation_name': "<%$transformation_name%>",
109 'program_name': "<%$program_name%>",
111 beforeSend: function(response){
112 jQuery('#working_modal').modal('show');
114 success: function(response) {
115 jQuery('#working_modal').modal('hide');
116 if (response.success == 1) {
117 jQuery("#add_transformants_using_list_dialog").modal("hide");
118 jQuery("#add_transformants_using_list_saved_dialog_message").modal("show");
120 if (response.error_string) {
121 jQuery("#add_transformants_using_list_error_dialog tbody").html('');
122 jQuery("#add_transformants_using_list_error_dialog tbody").append(response.error_string);
123 jQuery("#add_transformants_using_list_error_dialog").modal("show");
127 error: function(response){
128 jQuery('#working_modal').modal('hide');
129 alert('An error occurred adding new transformants');
135 jQuery("#dismiss_add_transformants_using_list_saved_dialog").click(function(){
136 jQuery("#add_transformants_using_list_saved_dialog_message").modal("hide");
137 jQuery('#new_transformants_list_select').val('');
141 jQuery("[name = 'generate_tracking_identifiers_dismiss_button']").click(function() {
142 jQuery("#add_transformants_using_list_dialog").modal("hide");
143 jQuery('#new_transformants_list_select').val('');