7 <div class="modal fade" id="add_transformants_using_list_dialog" name="add_transformants_using_list_dialog" tabindex="-1" role="dialog" aria-labelledby="addTransformantsUsingListDialog">
8 <div class="modal-dialog modal-lg" role="document">
9 <div class="modal-content ">
10 <div class="modal-header">
11 <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>
12 <center><h4 class="modal-title" id="addTransformantsUsingList">Add New Transformants Using a List</h4></center>
14 <div class="modal-body">
15 <div class="container-fluid">
16 <form class="form-horizontal" role="form" name="add_new_transformants_form" id="add_new_transformants_form">
17 <div class="form-group">
18 <label class="control-label col-sm-6">Select a List of Accessions to Add:</label>
19 <div class="col-sm-6" >
20 <div class="input-group">
21 <select class="form-control" id="new_transformants_list_select"></select>
28 <div class="modal-footer">
29 <button type="button" class="btn btn-primary" id="new_transformants_list_submit">Submit</button>
30 <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>
36 <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">
37 <div class="modal-dialog" role="document">
38 <div class="modal-content">
39 <div class="modal-header">
40 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
41 <h4 class="modal-title" id="addTransformantsUsingListSavedDialog">Success</h4>
43 <div class="modal-body">
44 <div class="container-fluid">
46 <span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span>
47 The new transformants were stored successfully.
51 <div class="modal-footer">
52 <button id="dismiss_add_transformants_using_list_saved_dialog" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
58 <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">
59 <div class="modal-dialog modal-lg" role="document">
60 <div class="modal-content">
61 <div class="modal-header">
62 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
63 <h4 class="modal-title" id="addTransformantsUsingListErrorDialog">Add Transformants Error</h4>
65 <div class="modal-body">
66 <div class="container-fluid">
72 <div class="modal-footer">
73 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
82 jQuery(document).ready(function(){
84 var lo = new CXGN.List();
86 jQuery('#new_transformants_list_select').html(lo.listSelect('new_transformants_list_select', ['accessions'], 'Select a list', undefined, undefined));
89 jQuery('#add_transformants_using_list_link').click(function(){
90 jQuery('#add_transformants_using_list_dialog').modal('show');
93 jQuery("#new_transformants_list_submit").click(function(){
94 var transformants_list_id = jQuery('#new_transformants_list_select').val();
96 if (!transformants_list_id) {
97 alert("Please select a list");
102 url : '/ajax/transformation/add_transformants_using_list',
106 'list_id' : transformants_list_id,
107 'transformation_name': "<%$transformation_name%>",
109 beforeSend: function(response){
110 jQuery('#working_modal').modal('show');
112 success: function(response) {
113 jQuery('#working_modal').modal('hide');
114 if (response.success == 1) {
115 jQuery("#add_transformants_using_list_dialog").modal("hide");
116 jQuery("#add_transformants_using_list_saved_dialog_message").modal("show");
118 if (response.error_string) {
119 jQuery("#add_transformants_using_list_error_dialog tbody").html('');
120 jQuery("#add_transformants_using_list_error_dialog tbody").append(response.error_string);
121 jQuery("#add_transformants_using_list_error_dialog").modal("show");
125 error: function(response){
126 jQuery('#working_modal').modal('hide');
127 alert('An error occurred adding new transformants');
133 jQuery("#dismiss_add_transformants_using_list_saved_dialog").click(function(){
134 jQuery("#add_transformants_using_list_saved_dialog_message").modal("hide");
135 jQuery('#new_transformants_list_select').val('');
139 jQuery("[name = 'generate_tracking_identifiers_dismiss_button']").click(function() {
140 jQuery("#add_transformants_using_list_dialog").modal("hide");
141 jQuery('#new_transformants_list_select').val('');