2 <div class="modal fade" id="site_login_new_user_dialog" name="site_login_new_user_dialog" tabindex="-1" role="dialog" aria-labelledby="site_login_new_user_dialog_title">
3 <div class="modal-dialog modal-lg" role="document">
4 <div class="modal-content">
5 <div class="modal-header" style="text-align:center">
6 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
7 <h3 class="modal-title" id="site_login_new_user_dialog_title">Create New User</h3>
9 <div class="modal-body">
11 <div class="col-sm-10 col-sm-offset-1">
13 <form id="new_account_form">
14 <div class="container-fluid">
15 <div class="panel panel-danger">
16 <div class="panel-heading">Notice</div>
17 <div class="panel-body">
19 <li><b>Before</b> creating a new account, please check if you <b>already have an account</b> using the <a href="/search/direct_search.pl?search=directory">directory search</a>. </li>
20 <li>A link will be emailed to you. Please click on it to activate the account.</li>
21 <li><b>All fields are required.</b></li>
26 <div class="form-horizontal">
27 <div class="form-group">
28 <label class="col-sm-3 control-label">First Name: </label>
29 <div class="col-sm-9">
30 <input class="form-control" type="text" name="first_name" value="" />
33 <div class="form-group">
34 <label class="col-sm-3 control-label">Last Name: </label>
35 <div class="col-sm-9">
36 <input class="form-control" type="text" name="last_name" value="" />
39 <div class="form-group">
40 <label class="col-sm-3 control-label">Organization: </label>
41 <div class="col-sm-9">
42 <input class="form-control" type="text" name="organization" value="" />
45 <div class="form-group">
46 <label class="col-sm-3 control-label">Username: </label>
47 <div class="col-sm-9">
48 <input class="form-control" type="text" name="username" value="" />
49 <p class="help-block">Username must be at least 7 characters long.</p>
52 <div class="form-group">
53 <label class="col-sm-3 control-label">Password: </label>
54 <div class="col-sm-9">
55 <input class="form-control" type="password" name="password" value="" />
56 <p class="help-block">Password must be at least 7 characters long and different from your username.</p>
59 <div class="form-group">
60 <label class="col-sm-3 control-label">Confirm Password: </label>
61 <div class="col-sm-9">
62 <input class="form-control" type="password" name="confirm_password" value="" />
63 <p class="help-block">Password must be at least 7 characters long and different from your username.</p>
66 <div class="form-group">
67 <label class="col-sm-3 control-label">Email Address: </label>
68 <div class="col-sm-9">
69 <input class="form-control" type="text" name="email_address" value="" />
70 <p class="help-block">An email will be sent to this address requiring you to confirm its receipt to activate your account.</p>
75 <button class="btn btn-default btn-lg" type="reset" >Reset</button>
76 <button class="btn btn-primary btn-lg" type="submit" name="create_account" >Create Account</button>
85 <div class="modal-footer">
86 <button id="close_site_login_new_user_dialog_button" type="button" class="btn btn-default" data-dismiss="modal" style="float:left">Close</button>
94 jQuery('#new_user_modal_show').click(function(){
95 event.preventDefault();
96 jQuery('#site_login_new_user_dialog').modal('show');
99 jQuery('#new_account_form').submit(function(event) {
100 event.preventDefault();
101 var form_data = jQuery('#new_account_form').serialize();
102 //alert(JSON.stringify(form_data));
104 url: '/ajax/user/new',
105 beforeSend: function(){
106 jQuery('#working_modal').modal('show');
109 success: function(r) {
110 jQuery('#working_modal').modal('hide');
112 if (r.error) { alert(r.error); }
114 alert('New account added. Check your email.');