enable required fields in registration view
[myslice.git] / portal / templates / registration_view.html
1 {% extends "layout-unfold1.html" %}
2
3 {% block head %}
4 <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
5 <!-- xxx ideally only onelab.css but ... xxx -->
6 <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/registration.css" />
7 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.validate.js"></script> 
8 <script type="text/javascript" src="{{STATIC_URL}}/js/my_account.register.js"></script>
9 {% endblock %}                              
10                                     
11 {% block unfold1_main %}        
12
13 <div class="onelab-title well well-lg">
14   <h2>OneLab Experimenter Registration</h2>
15   <h4>For First Line Support please <a href="/portal/contact" >Contact Support</a></h3>
16 </div>
17
18 {% if errors %}
19 <ul>
20   {% for error in errors %}
21   <li>{{ error }}</li>
22   {% endfor %}
23 </ul>
24 {% endif %}
25    
26 <div class="well">
27   <form class="cmxform form-horizontal" id="registrationForm" method="post" action="" enctype="multipart/form-data" role="form">
28     <fieldset>
29     {% csrf_token %}
30     <div class="form-group">
31       <label for="firstname" class="col-md-4 control-label">First Name</label>
32       <div class="col-md-4">
33         <input type="text" name="firstname" class="form-control" minlength="2" value="{{ firstname }}" placeholder="First Name" required />
34       </div>
35       <div class="col-md-4"> <p class="form-hint">Enter your first name</p> </div>
36     </div>
37     <div class="form-group">
38       <label for="lastname" class="col-md-4 control-label">Last Name</label>
39       <div class="col-md-4">
40         <input type="text" name="lastname" size="25" class="form-control" minlength="2" value="{{ lastname }}" placeholder="Last Name" required />
41       </div>
42       <div class="col-md-4"><p class="form-hint">Enter your last name</p></div>
43     </div>
44     <div class="form-group">
45       <label for="auth_list" class="col-md-4 control-label">Authority</label>
46       <div class="col-md-4">
47         <select id="auth_list" name="authority_hrn" size="1" class="form-control" required>
48           {% if authorities %}
49           {% for authority in authorities %}
50           <option value="{{ authority.authority_hrn }}">{{authority.name}} ({{authority.authority_hrn}})</option>
51           {% endfor %}
52           {% else %} <!-- should not happen -->
53           <option value="test">No authority found !!! </option>
54           {% endif %}
55         </select>
56       </div>
57       <div class="col-md-4"><p class="form-hint">Please select an authority responsible for vetting your account</p></div>
58     </div>
59     
60     <div class="form-group">
61       <label for="email" class="col-md-4 control-label">Email</label>
62       <div class="col-md-4">
63         <input type="email" name="email" size="25"  class="form-control" value="{{ email }}" required/> 
64       </div>
65       <div class="col-md-4"><p class="form-hint">Enter a valid email address</p></div>
66     </div>
67     <div class="form-group">
68       <label for="password" class="col-md-4 control-label">Password</label>
69       <div class="col-md-4">
70         <input type="password"  id="password" name="password"   class="form-control" minlength="4" value="{{ password }}" required/> 
71       </div>
72       <div class="col-md-4"><p class="form-hint">Enter password</p></div>
73     </div>
74     <div class="form-group">
75       <label for="password" class="col-md-4 control-label">Confirm Password</label>
76       <div class="col-md-4">
77         <input type="password"  id="confirmpassword" name="confirmpassword"   minlength="4" class="form-control" 
78                value="" placeholder="Confirm Password" required/>
79       </div>
80       <div class="col-md-4"><p class="form-hint">Retype the password</p></div>
81     </div>
82     <div class="form-group">
83       <label for="question" class="col-md-4 control-label">My Keys</label>
84       <div class="col-md-4">
85         <select name="question" class="form-control" id="key-policy" required>        
86           <option value="generate">Generate key pairs for me </option>
87           <option value="upload">Upload my public key </option>
88         </select>
89       </div>
90       <div class="col-md-4"><p class="form-hint">Genkey: Account Delegation Automatic (Recommended)</p> </div>
91     </div>
92     <div class="form-group" style="display:none;" id="upload_key">
93       <label for="file" class="col-md-4 control-label">Upload public key</label>
94       <div class="col-md-4">
95         <input type="file" name="user_public_key" class="form-control" id="user_public_key" required/>
96         <p class="warning" id="pkey_del_msg">Once your account is validated, you will have to delegate your credentials manually using SFA [Advanced users only]</p>
97       </div>
98       <div class="col-md-4"><p class="form-hint">Account Delegation: Manual (Advanced Users)</p></div>
99     </div>
100     <div class="form-group" id="register">
101       <div class="col-md-offset-4 col-md-4">
102         <button class="submit btn btn-default" type="submit">Register</button>
103       </div>
104     </div>
105   </fieldset>
106   </form>  
107 </div>
108
109 {% endblock %}
110