1 {% extends "layout-unfold1.html" %}
3 {% block unfold_main %}
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>
12 {% for error in errors %}
19 <form class="cmxform form-horizontal" id="registrationForm" method="post" action="" enctype="multipart/form-data" role="form">
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 />
27 <div class="col-xs-6"> <p class="form-hint">Enter your first name</p> </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 />
34 <div class="col-xs-6"><p class="form-hint">Enter your last name</p></div>
36 <div class="form-group">
37 <label for="authority_hrn" class="col-xs-2 control-label">Authority</label>
38 <div class="col-xs-4">
39 <div class="ui-widget">
40 <input id="authority_hrn" name="authority_hrn" class="form-control" value="{{ authority_hrn }}" required>
43 <div class="col-xs-6"><p class="form-hint">An authority responsible for vetting your account</p></div>
47 TODO: Login should be suggested from user email or first/last name, and
48 checked for existence. In addition, the full HRN should be shown to the
50 <div class="form-group">
51 <label for="login" class="col-xs-2 control-label">Login</label>
52 <div class="col-xs-4">
53 <input type="text" name="login" size="25" class="form-control" minlength="2" value="{{ login }}" placeholder="Login" required />
55 <div class="col-xs-6"><p class="form-hint">Enter your login</p></div>
59 <div class="form-group">
60 <label for="email" class="col-xs-2 control-label">Email</label>
61 <div class="col-xs-4">
62 <input type="email" name="email" size="25" class="form-control" value="{{ email }}" required/>
64 <div class="col-xs-6"><p class="form-hint">Enter a valid email address</p></div>
66 <div class="form-group">
67 <label for="password" class="col-xs-2 control-label">Password</label>
68 <div class="col-xs-4">
69 <input type="password" id="password" name="password" class="form-control" minlength="4" value="{{ password }}" required/>
71 <div class="col-xs-6"><p class="form-hint">Enter password</p></div>
73 <div class="form-group">
74 <label for="password" class="col-xs-2 control-label">Confirm Password</label>
75 <div class="col-xs-4">
76 <input type="password" id="confirmpassword" name="confirmpassword" minlength="4" class="form-control"
77 value="" placeholder="Confirm Password" required/>
79 <div class="col-xs-6"><p class="form-hint">Retype the password</p></div>
81 <div class="form-group">
82 <label for="question" class="col-xs-2 control-label">My Keys</label>
83 <div class="col-xs-4">
84 <select name="question" class="form-control" id="key-policy" required>
85 <option value="generate">Generate key pairs for me </option>
86 <option value="upload">Upload my public key </option>
89 <div class="col-xs-6"><p class="form-hint">Genkey: Account Delegation Automatic (Recommended)</p> </div>
91 <div class="form-group" style="display:none;" id="upload_key">
92 <label for="file" class="col-xs-2 control-label">Upload public key</label>
93 <div class="col-xs-4">
94 <input type="file" name="user_public_key" class="form-control" id="user_public_key" required/>
95 <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 class="col-xs-6"><p class="form-hint">Account Delegation: Manual (Advanced Users)</p></div>
99 <div class="form-group" id="register">
100 <button class="submit btn btn-default col-xs-12" type="submit">Register</button>
107 jQuery(document).ready(function(){
108 var availableTags = [
110 {% for authority in authorities %}
111 {% if authority.name %}
112 {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
114 {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
118 {value:"",label:"No authority found !!!"}
121 jQuery( "#authority_hrn" ).autocomplete({
122 source: availableTags,
124 change: function (event, ui) {
126 //http://api.jqueryui.com/autocomplete/#event-change -
127 // The item selected from the menu, if any. Otherwise the property is null
128 //so clear the item for force selection
129 jQuery("#authority_hrn").val("");
132 //select: function( event, ui ) {console.log(jQuery(this))}