Merge pull request #4106 from solgenomics/topic/wishlist
[sgn.git] / mason / user / quick_create_account.mas
blob7310d4d41cfe06a3a8188439cbd67e58d79823f4
2             
3 <& /page/page_title.mas, title=>"Quick Create Account" &>
5 <div id="quick_create_account_input_form_div">
6   <form id="quick_create_account_input_form" method="post" action="/user/quick_create_account">
7     
8     <table cellpadding="2" cellspacing="2" width="100%" align="center">
9       <tr><td colspan="2"><b>Curators may use this form to create accounts for new users.<br />&nbsp;</b></td></tr>
10       <tr><td>First Name</td><td><input type="text" name="first_name" size="20" value=""></td></tr>
11       <tr><td>Last Name</td><td><input type="text" name="last_name" size="20" value=""></td></tr>
12       <tr><td>Username (at least 7 characters)</td><td><input type="text" name="username" size="12" value=""></td></tr>
13       <tr><td>Password (at least 7 characters)</td><td><input type="password" name="password" size="12" value=""></td></tr>
14       <tr><td>Confirm Password</td><td><input type="password" name="confirm_password" size="12" value=""></td></tr>
15       <tr><td>Private Email Address</td><td><input type="text" name="confirm_email" size="40" value=""></td></tr>
16       <tr><td>User Type</td><td><input type="text" name="user_type" size="10" value=""></td></tr>
17       <tr><td>&nbsp;</td></tr>
18       <tr><td colspan="2" align="center">
19           <button class="btn btn-default" id="create_account" name="create_account" type="button">Save</button>
20       </tr>
21     </table>
22 </form>
23 </div>
25 <script>
26    jQuery(document).ready(function() { 
27       jQuery('#create_account').click( function() {
28          var form_data = jQuery('#quick_create_account_input_form').serialize();
29          jQuery.ajax( { 
30             url : '/ajax/user/quick_create_account',
31             data: form_data,
32             success: function(r) { 
33               if (r.error) { alert(r.error); }
34               else { 
35                 jQuery('#quick_create_account_input_form_div').html(r.html);
36               }
37             }
38          });
39       });
40    });
41 </script>