Merge branch 'master' of ssh://git.onelab.eu/git/myslice
[unfold.git] / portal / templates / registration_view.html
1 {% extends "layout-unfold1.html" %}
2
3 {% block unfold_main %}        
4
5 <div class="onelab-title well-lg">
6   <h2>OneLab Experimenter Registration</h2>
7   <h4>For First Line Support please <a href="/portal/contact" >Contact Support</a></h3>
8 </div>
9
10 {% if errors %}
11 <ul>
12   {% for error in errors %}
13   <li>{{ error }}</li>
14   {% endfor %}
15 </ul>
16 {% endif %}
17    
18 <div class="well">
19  <form class="cmxform form-horizontal" id="registrationForm" method="post" action="" enctype="multipart/form-data" role="form">
20     <fieldset>
21     {% csrf_token %}
22     <div class="form-group">
23       <label for="firstname" class="col-xs-2 control-label">First Name</label>
24       <div class="col-xs-4">
25         <input type="text" name="firstname" class="form-control" minlength="2" value="{{ firstname }}" placeholder="First Name" required />
26       </div>
27       <div class="col-xs-6"> <p class="form-hint">Enter your first name</p> </div>
28     </div>
29     <div class="form-group">
30       <label for="lastname" class="col-xs-2 control-label">Last Name</label>
31       <div class="col-xs-4">
32         <input type="text" name="lastname" size="25" class="form-control" minlength="2" value="{{ lastname }}" placeholder="Last Name" required />
33       </div>
34       <div class="col-xs-6"><p class="form-hint">Enter your last name</p></div>
35     </div>
36     <div class="form-group">
37       <label for="auth_list" class="col-xs-2 control-label">Authority</label>
38       <div class="col-xs-4">
39         <select id="auth_list" name="authority_hrn" size="1" class="form-control" required>
40           {% if authorities %}
41           {% for authority in authorities %}
42       <option value="{{ authority.authority_hrn }}"/>{{authority.authority_hrn}}</option>
43           <!-- <option value="{{ authority.authority_hrn }}">{{authority.name}} ({{authority.authority_hrn}})</option> -->
44           {% endfor %}
45           {% else %} <!-- should not happen -->
46           <option value="test">No authority found !!! </option>
47           {% endif %}
48         </select>
49       </div>
50       <div class="col-xs-6"><p class="form-hint">An authority responsible for vetting your account</p></div>
51     </div>
52
53         <!-- LOGIN
54         TODO: Login should be suggested from user email or first/last name, and
55         checked for existence. In addition, the full HRN should be shown to the
56         user.
57         -->
58     <div class="form-group">
59       <label for="login" class="col-xs-2 control-label">Login</label>
60       <div class="col-xs-4">
61           <input type="text" name="login" size="25" class="form-control" minlength="2" value="{{ login }}" placeholder="Login" required />
62       </div>
63       <div class="col-xs-6"><p class="form-hint">Enter your login</p></div>
64     </div>
65     
66     <div class="form-group">
67       <label for="email" class="col-xs-2 control-label">Email</label>
68       <div class="col-xs-4">
69         <input type="email" name="email" size="25"  class="form-control" value="{{ email }}" required/> 
70       </div>
71       <div class="col-xs-6"><p class="form-hint">Enter a valid email address</p></div>
72     </div>
73     <div class="form-group">
74       <label for="password" class="col-xs-2 control-label">Password</label>
75       <div class="col-xs-4">
76         <input type="password"  id="password" name="password"   class="form-control" minlength="4" value="{{ password }}" required/> 
77       </div>
78       <div class="col-xs-6"><p class="form-hint">Enter password</p></div>
79     </div>
80     <div class="form-group">
81       <label for="password" class="col-xs-2 control-label">Confirm Password</label>
82       <div class="col-xs-4">
83         <input type="password"  id="confirmpassword" name="confirmpassword"   minlength="4" class="form-control" 
84                value="" placeholder="Confirm Password" required/>
85       </div>
86       <div class="col-xs-6"><p class="form-hint">Retype the password</p></div>
87     </div>
88     <div class="form-group">
89       <label for="question" class="col-xs-2 control-label">My Keys</label>
90       <div class="col-xs-4">
91         <select name="question" class="form-control" id="key-policy" required>        
92           <option value="generate">Generate key pairs for me </option>
93           <option value="upload">Upload my public key </option>
94         </select>
95       </div>
96       <div class="col-xs-6"><p class="form-hint">Genkey: Account Delegation Automatic (Recommended)</p> </div>
97     </div>
98     <div class="form-group" style="display:none;" id="upload_key">
99       <label for="file" class="col-xs-2 control-label">Upload public key</label>
100       <div class="col-xs-4">
101         <input type="file" name="user_public_key" class="form-control" id="user_public_key" required/>
102         <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>
103       </div>
104       <div class="col-xs-6"><p class="form-hint">Account Delegation: Manual (Advanced Users)</p></div>
105     </div>
106     <div class="form-group" id="register">
107       <button class="submit btn btn-default col-xs-12" type="submit">Register</button>
108     </div>
109     </div>
110   </fieldset>
111   </form>  
112 </div>
113
114 {% endblock %}
115