Revision 4a13d054

b/snf-astakos-app/astakos/im/auth_providers.py
258 258
    """
259 259
    Return a provider instance from the auth providers registry.
260 260
    """
261
    if not id in PROVIDERS:
262
        raise Exception('Invalid auth provider requested "%s"' % id)
263

  
261 264
    return PROVIDERS.get(id, default)(user_obj)
262 265

  
b/snf-astakos-app/astakos/im/forms.py
259 259

  
260 260
        super(ThirdPartyUserCreationForm, self).__init__(*args, **kwargs)
261 261

  
262
        if not get_latest_terms():
263
            del self.fields['has_signed_terms']
264

  
262 265
        if 'has_signed_terms' in self.fields:
263 266
            # Overriding field label since we need to apply a link
264 267
            # to the terms within the label
......
999 1002

  
1000 1003

  
1001 1004
    def _init_extra_form_fields(self):
1002
        
1005

  
1003 1006

  
1004 1007
        if self.email_change:
1005 1008
            self.fields.update(self.email_change_form.fields)
b/snf-astakos-app/astakos/im/templates/im/auth/signup_form.html
4 4
       
5 5
      <input type="hidden" name="next" value="{{ next }}">
6 6
      <input type="hidden" name="code" value="{{ code }}">
7
      <input type="hidden" name="provider" value={{ provider.module|default:"local" }}>
7
      <input type="hidden" name="provider" value={{ provider|default:"local" }}>
8 8
      {% if third_party_token %}
9 9
      <input type="hidden" name="third_party_token" value={{ third_party_token }}>
10 10
      {% endif %}
b/snf-astakos-app/astakos/im/templates/im/signup.html
23 23
<p>{% trans "Choose one of the following sign up methods." %}</p>
24 24
 
25 25
<div class="extralogin">
26
{% for provider in auth_providers %}
27
	{% if provider.is_available_for_create %}
28
		{% if provider.module == 'local' %}
29
			<a href="#" class="submit standalone" id="signup-classic">CLASSIC</a>
26
{% for provider_obj in auth_providers %}
27
	{% if provider_obj.is_available_for_create %}
28
		{% if provider_obj.module == 'local' %}
29
			<a href="#" class="submit standalone" id="signup-classic">CLASSIC SIGN UP</a>
30 30
            {% if "local" in im_modules %}
31 31
            {% include "im/auth/signup_form.html" %}
32 32
		    {% endif %}
33 33
		{% else %}
34
			{% if provider.module == 'shibboleth' %}
35
				<a href="{% provider_login_url provider %}" class="submit standalone">ACADEMIC</a>
34
			{% if provider_obj.module == 'shibboleth' %}
35
				<a href="{% provider_login_url provider_obj %}" class="submit standalone">ACADEMIC SIGN UP</a>
36 36
			{% else %}
37
			<a href="{% provider_login_url provider %}" title="{{ provider.get_title_display }}" class="icons">
38
				<img src=" {{ provider.get_icon_url_display }}" alt="{{ provider.get_title_display }}">
37
			<a href="{% provider_login_url provider_obj %}" title="{{ provider_obj.get_title_display }}" class="icons">
38
				<img src=" {{ provider_obj.get_icon_url_display }}" alt="{{ provider_obj.get_title_display }}">
39 39
			</a>
40 40
			{% endif %}
41 41
		{% endif %}

Also available in: Unified diff