1 {% extends "layout.html" %}
6 <div class="col-md-12">
7 <h1><img src="{{ STATIC_URL }}icons/user-xs.png" alt="User Registration" />User sign-up</h1>
11 <div class="col-md-12">
12 <p><strong>Questions? <a href="/contact" >Contact us.</a></strong></p>
17 <div class="col-md-12">
19 {% for error in errors %}
20 <li>{{ error | safe }}</li>
26 <form action="/register" class="cmxform form-horizontal" method="post" enctype="multipart/form-data">
28 <div class="col-md-12">
31 <label for="authority_hrn" class="control-label">Organization</label>
34 <select id="org_name" name="org_name" class="form-control" style="width:590px" value="{{ organization }}"
35 title="Choose your organization (company/university) from the list that apears when you click in the field and start to type.
36 Use the arrow keys to scroll through the list; type part of the name to narrow down the list. We will send an email to
37 the managers that we have on record for your organization, asking them to validate your sign-up request." required>
38 <option value="">select an organization</option>
40 {% for authority in authorities %}
41 {% if authority.name %}
42 <option value="{{ authority.authority_hrn }}">{{authority.name}}</option>
44 <option value="{{ authority.authority_hrn }}">{{authority.authority_hrn}}</option>
48 <option value:"">No authority found !!!</option>
52 {% include theme|add:"_authority_notListed.html" %}
58 <div class="col-md-6">
60 <label for="firstname" class="control-label">Personal information</label>
63 <input type="text" name="firstname" class="form-control" style="width:350px" minlength="2" value="{{ first_name }}" placeholder="First name" required />
66 <input type="text" name="lastname" size="25" class="form-control" style="width:350px" minlength="2" value="{{ last_name }}" placeholder="Last name" required />
69 <input type="email" name="email" size="25" class="form-control" style="width:350px" value="{{ email }}"
70 title="Your e-mail address will be your identifier for logging in. We contact you to verify your account and then, occasionally, for important issues."
71 placeholder="Email" required />
75 <div class="col-md-6">
77 <label for="password" class="control-label">Authentication</label>
80 <input type="password" id="password" name="password" class="form-control" style="width:250px" minlength="8" value="{{ password }}" title="Your password allows you to log in to this portal." placeholder="Password" required />
83 <input type="password" id="confirmpassword" name="confirmpassword" style="width:250px" minlength="8" class="form-control" value="" placeholder="Confirm password" required />
86 <select name="question" class="form-control" style="width:350px" id="key-policy"
87 title="Your public/private key pair allows you to access the testbeds." required >
88 <option value="generate">Generate my keys for me (recommended)</option>
89 <option value="upload">Upload my public key (advanced users only)</option>
92 <div style="display:none;" id="upload_key">
93 <label for="file" class="control-label">Upload public key</label>
94 <input type="file" name="user_public_key" class="form-control" style="width:200px" id="user_public_key" />
96 <div class="alert alert-danger" id="pkey_del_msg">
97 In order for the portal to contact testbeds on your behalf, so as to list and reserve resources, you will need to
98 <a href="/portal/manual_delegation" target="_blank">delegate your credentials to the portal.</a>
104 <div class="col-md-12">
106 <input type="checkbox" name="agreement" value="agreement" required /> I agree to the
107 <a href="#" data-toggle="modal" data-target="#myModal">terms and conditions.</a>
111 {% include theme|add:"_register_info.html" %}
113 <div class="col-md-12">
116 <input class="submit btn btn-onelab" type="submit" value="Sign up" />
122 <!-- Modal - columns selector -->
123 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
124 <div class="modal-dialog">
125 <div class="modal-content">
126 <div class="modal-header">
127 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
128 <h4 class="modal-title" id="myModalLabel">Terms & Conditions</h4>
130 <div class="modal-body">
133 <div class="modal-footer">
134 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
143 $(document).ready(function(){
145 var availableTags = [
147 {% for authority in authorities %}
148 {% if authority.name %}
149 {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
150 // show hrn if we don't have the name
152 {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
156 {value:"",label:"No authority found !!!"}
161 availableTags.sort(function(a,b){
162 var nameA=a.value.toLowerCase(), nameB=b.value.toLowerCase();
173 // auto-complete the form
174 jQuery("#org_name").combobox();
176 //setting the default value in the org_list
177 var temp="fed4fire.global";
178 $("#org_name").val(temp);
181 // Must be executed in Python as Admin Query - User is not logged in
183 $.post("/rest/authority/",{'filters':{'authority_hrn':'CONTAINS'+temp}}, function( data ) {
184 $.each( data, function( key, val ) {
189 $('[title!=""]').qtip();
190 $("form").validate();
191 $("form").submit(function() {
192 if ($('select option:selected').val() == 'upload') {
193 if ($('input[name=user_public_key]').val() == '') {
194 alert('Please specify the key file to upload');