+ <div class="form-group">
+ <label for="email" class="col-xs-2 control-label">Email</label>
+ <div class="col-xs-4">
+ <input type="email" name="email" size="25" class="form-control" value="{{ email }}" required/>
+ </div>
+ <div class="col-xs-6"><p class="form-hint">Enter a valid email address</p></div>
+ </div>
+ <div class="form-group">
+ <label for="password" class="col-xs-2 control-label">Password</label>
+ <div class="col-xs-4">
+ <input type="password" id="password" name="password" class="form-control" minlength="4" value="{{ password }}" required/>
+ </div>
+ <div class="col-xs-6"><p class="form-hint">Enter password</p></div>
+ </div>
+ <div class="form-group">
+ <label for="password" class="col-xs-2 control-label">Confirm Password</label>
+ <div class="col-xs-4">
+ <input type="password" id="confirmpassword" name="confirmpassword" minlength="4" class="form-control"
+ value="" placeholder="Confirm Password" required/>
+ </div>
+ <div class="col-xs-6"><p class="form-hint">Retype the password</p></div>
+ </div>
+ <div class="form-group">
+ <label for="question" class="col-xs-2 control-label">My Keys</label>
+ <div class="col-xs-4">
+ <select name="question" class="form-control" id="key-policy" required>
+ <option value="generate">Generate key pairs for me </option>
+ <option value="upload">Upload my public key </option>
+ </select>
+ </div>
+ <div class="col-xs-6"><p class="form-hint">Genkey: Account Delegation Automatic (Recommended)</p> </div>
+ </div>
+ <div class="form-group" style="display:none;" id="upload_key">
+ <label for="file" class="col-xs-2 control-label">Upload public key</label>
+ <div class="col-xs-4">
+ <input type="file" name="user_public_key" class="form-control" id="user_public_key" required/>
+ <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>
+ </div>
+ <div class="col-xs-6"><p class="form-hint">Account Delegation: Manual (Advanced Users)</p></div>
+ </div>
+ <div class="form-group" id="register">
+ <button class="submit btn btn-default col-xs-12" type="submit">Register</button>
+ </div>
+ </div>
+ </fieldset>
+ </form>
+</div>
+<script>
+jQuery(document).ready(function(){
+ var availableTags = [
+ {% if authorities %}
+ {% for authority in authorities %}
+ {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
+ {% endfor %}
+ {% else %}
+ {value:"",label:"No authority found !!!"}
+ {% endif %}
+ ];
+ jQuery( "#authority_hrn" ).autocomplete({
+ source: availableTags,
+ minLength: 0,
+ change: function (event, ui) {
+ if(!ui.item){
+ //http://api.jqueryui.com/autocomplete/#event-change -
+ // The item selected from the menu, if any. Otherwise the property is null
+ //so clear the item for force selection
+ jQuery("#authority_hrn").val("");
+ }
+ }
+ //select: function( event, ui ) {console.log(jQuery(this))}
+ });
+});
+</script>