# REGISTRY ONLY TO BE REMOVED WITH MANIFOLD-V2
authorities_query = Query.get('authority').select('name', 'authority_hrn')
authorities = execute_admin_query(wsgi_request, authorities_query)
+ print "RegistrationView authorities = ", authorities
if authorities is not None:
- authorities = sorted(authorities, key=lambda k: k['authority_hrn'])
- authorities = sorted(authorities, key=lambda k: k['name'])
+ # Remove the root authority from the list
+ matching = [s for s in authorities if "." in s['authority_hrn']]
+ authorities = sorted(matching, key=lambda k: k['authority_hrn'])
+ authorities = sorted(matching, key=lambda k: k['name'])
print "############ BREAKPOINT 1 #################"
# Page rendering
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. 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>
+ <option value="">select an organization</option>
{% if authorities %}
{% for authority in authorities %}
{% if authority.name %}
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. 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>
+ <option value="">select an organization</option>
{% if authorities %}
{% for authority in authorities %}
{% if authority.name %}
- {% if authority.authority_hrn == authority_hrn %}
- <option value="{{ authority.authority_hrn }}" selected>{{authority.name}}</option>
- {% else %}
<option value="{{ authority.authority_hrn }}">{{authority.name}}</option>
- {% endif %}
{% else %}
- {% if authority.authority_hrn == authority_hrn %}
- <option value="{{ authority.authority_hrn }}" selected>{{authority.authority_hrn}}</option>
- {% else %}
<option value="{{ authority.authority_hrn }}">{{authority.authority_hrn}}</option>
- {% endif %}
{% endif %}
{% endfor %}
{% else %}
{% if authorities %}
{% for authority in authorities %}
{% if authority.name %}
- {% if authority.authority_hrn == authority_hrn %}
- <option value="{{ authority.authority_hrn }}" selected>{{authority.name}}</option>
- {% else %}
<option value="{{ authority.authority_hrn }}">{{authority.name}}</option>
- {% endif %}
{% else %}
- {% if authority.authority_hrn == authority_hrn %}
- <option value="{{ authority.authority_hrn }}" selected>{{authority.authority_hrn}}</option>
- {% else %}
<option value="{{ authority.authority_hrn }}">{{authority.authority_hrn}}</option>
{% endif %}
{% endif %}