root_authorities = sorted([a for a in authorities if '.' not in a['authority_hrn']])
page = Page(request)
- page.add_js_files ( [ "js/jquery.validate.js", "js/join.js" ] )
- page.add_css_files ( [ "css/onelab.css", "css/registration.css" ] )
+ page.add_js_files ( [ "js/jquery.validate.js", "js/join.js", "js/jquery.qtip.min.js" ] )
+ page.add_css_files ( [ "css/onelab.css", "css/registration.css", "css/jquery.qtip.min.css" ] )
page.add_css_files ( [ "https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" ] )
if method == 'POST':
except Exception, e:
print "Failed to send email, please check the mail templates and the SMTP configuration of your server"
-
- return render(request, 'user_register_complete.html')
+
+ self.template_name = 'join_complete.html'
+ return render(request, self.template, {'theme': self.theme})
+ #return render(request, 'user_register_complete.html')
template_env = {
'topmenu_items': topmenu_items_live('join', page),
current_site = Site.objects.get_current()
current_site = current_site.domain
+ authorities_query = Query.get('authority').select('name', 'authority_hrn')
+ authorities = execute_admin_query(wsgi_request, authorities_query)
+
+ for authority in authorities:
+ if authority['name'] == wsgi_request.POST.get('org_name', ''):
+ authority_hrn = authority['authority_hrn']
+
post_email = wsgi_request.POST.get('email','').lower()
salt = randint(1,100000)
email_hash = md5(str(salt)+post_email).hexdigest()
user_request = {
'first_name' : wsgi_request.POST.get('firstname', ''),
'last_name' : wsgi_request.POST.get('lastname', ''),
- 'authority_hrn' : wsgi_request.POST.get('authority_hrn', ''),
+ 'organization' : wsgi_request.POST.get('org_name', ''),
+ 'authority_hrn' : authority_hrn,
'email' : post_email,
'password' : wsgi_request.POST.get('password', ''),
'current_site' : current_site,
jQuery(document).ready(function(){
+ jQuery('[title!=""]').qtip();
+
jQuery("#joinForm").validate({
rules: {
pi_password: {
<p>We have received a user signup request for your email address at {{current_site}}</p>
<p>You have the following user details:</p>
-Organisation: {{authority_hrn}}<br>
+Organization: {{organization}}<br>
First name: {{first_name}}<br>
Last name: {{last_name}}<br>
Email: {{email}}<br>
You have the following user details:
-Organisation: {{authority_hrn}}
+Organization: {{organization}}
First name: {{first_name}}
Last name: {{last_name}}
Email: {{email}}
--- /dev/null
+{% extends "layout.html" %}
+
+{% block content %}
+
+<div class="row">
+ <h1><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="User Registration" />Request to add organization</h1>
+</div>
+<div class="row">
+ <h3>Organization information received.</h3>
+<p>
+We will contact the manager that you have listed with any questions that we might have.<br>
+Once we have added the organization to the list, we will alert the manager.<br>
+At that time users will be able to sign up to join OneLab.
+</p>
+</div>
+
+{% endblock %}
<div class="row">
<div class="col-md-12">
- <h1><img src="{{ STATIC_URL }}icons/testbed-xs.png" alt="Join Federation" /> Add organization</h1>
+ <h1><img src="{{ STATIC_URL }}icons/testbed-xs.png" alt="Join Federation" /> Request to add organization</h1>
</div>
</div>
<div class="row">
<div class="form-group">
<label for="authority_hrn" class="control-label">Organization</label>
<p></p>
- <input id="authority_hrn" name="authority_hrn" class="form-control" style="width:530px" value="{{ authority_hrn }}"
+ <input id="authority_hrn" name="org_name" class="form-control" style="width:590px" value="{{ organization }}"
title="Choose your organization (company/university) from the list that apears when you click in the field and start to type.
Use the arrow keys to scroll through the list; type part of the name to narrow down the list. If it is not in the list,
- please add it by clicking the add organization link below. We will send an email to the managers that we have on record for
+ please request its addition by clicking the link below. We will send an email to the managers that we have on record for
your organization, asking them to validate your sign-up request." required/>
<p></p>
- <p>Organization not listed? <a href="/portal/join">Add organization now.</a></p>
+ <p>Organization not listed? <a href="/portal/join">Request its addition now.</a></p>
</div>
<div class="row">
</div>
<div class="modal-body">
<p align="left">
- <a href="/portal/terms" target="_blank">TERMS AND CONDITIONS</a>
- <br/>
for OneLab Basic level service
<br/>
Version 0.6 of 20 May 2014
+ <br>
+ <a href="/portal/terms" target="_blank">[Printable format]</a>
</p>
<h1 align="left">1 Context</h1>
<h2 align="left">1.1 OneLab</h2>
{% if authorities %}
{% for authority in authorities %}
{% if authority.name %}
- {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
- {% else %}
- {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
+ {value:"{{ authority.name }}",label:"{{authority.name}}"},
+ // to show only full name
+ // {% else %}
+ // {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
{% endif %}
{% endfor %}
{% else %}
}
//select: function( event, ui ) {console.log(jQuery(this))}
});
+ // for hover texts
jQuery('[title!=""]').qtip();
});
</script>
<p>To gain full access, two steps are required:</p>
<ul>
<li>1. You confirm your signup request by clicking on the link in the email that we have sent to your email address.</li>
- <li>2. A manager from your organization validates your request. Upon confirmation of your signup request,<br>
- we will send an email to the managers at your organization with a validation request.</li>
+ <li>2. A manager from your organization validates your request. (We have sent email to your organisation's registered managers.)</li>
</ul>
</div>
<br>
<b>First name :</b> {{first_name}}<br>
<b>Last name :</b> {{last_name}}<br>
+<b>Organization :</b> {{organization}}<br>
<b>Authority hrn:</b> {{authority_hrn}}<br>
<b>Public key :</b> {{public_key}}<br>
<b>Email :</b> {{email}}<br>
<p></p>
<p>You can validate the user <a href="http://{{current_site}}/portal/validate">here</a>.<p>
<br>
-<p>Please note, the user will be available for validation only after he confirms his email address.</p>
+<p>Please note that the validation request will only become visible once the user has confirmed his/her email address.</p>
First name : {{first_name}}
Last name : {{last_name}}
+Organization :{{organization}}
Authority hrn: {{authority_hrn}}
Public key : {{public_key}}
Email : {{email}}
User hrn : {{user_hrn}}
Portal url : {{ current_site }}
+
+Please note that the validation request will only become visible once the user has confirmed his/her email address.
+
+