summaryrefslogtreecommitdiffstats
path: root/askbot/skins/common/templates/authopenid/authopenid_macros.html
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/skins/common/templates/authopenid/authopenid_macros.html')
-rw-r--r--askbot/skins/common/templates/authopenid/authopenid_macros.html77
1 files changed, 44 insertions, 33 deletions
diff --git a/askbot/skins/common/templates/authopenid/authopenid_macros.html b/askbot/skins/common/templates/authopenid/authopenid_macros.html
index 477d277c..9d35ac6f 100644
--- a/askbot/skins/common/templates/authopenid/authopenid_macros.html
+++ b/askbot/skins/common/templates/authopenid/authopenid_macros.html
@@ -15,44 +15,55 @@
minor_login_providers = None,
hide_local_login = False,
settings = None,
- logged_in = False
+ logged_in = False,
+ show_buttons = True
)
%}
- <div id="login-icons">
- <ul class="login-icons large">
- {% for login_provider in major_login_providers %}
- {% if login_provider.name == 'local' and hide_local_login == True %}
- {# do nothing here, left if statement this way for simplicity #}
- {% else %}
- {% if logged_in == True and login_provider.type == 'password' and login_provider.password_changeable == False %}
+ {% if show_buttons == True %}{# a hack #}
+ <div id="login-icons">
+ {% if major_login_providers %}
+ <ul class="login-icons large">
+ {% for login_provider in major_login_providers %}
+ {% if login_provider.name == 'local' and hide_local_login == True %}
+ {# do nothing here, left if statement this way for simplicity #}
+ {% else %}
+ {% if logged_in == True and login_provider.type == 'password'
+ and login_provider.password_changeable == False
+ %}
+ {% else %}
+ <li>
+ {{ login_provider_input(login_provider) }}
+ </li>
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% if minor_login_providers %}
+ <ul class="login-icons small">
+ {% for login_provider in minor_login_providers %}
+ {% if logged_in == True and login_provider.type == 'password'
+ and login_provider.password_changeable == False
+ %}
{% else %}
<li>
{{ login_provider_input(login_provider) }}
</li>
{% endif %}
- {% endif %}
- {% endfor %}
- </ul>
- <ul class="login-icons small">
- {% for login_provider in minor_login_providers %}
- {% if logged_in == True and login_provider.type == 'password' and login_provider.password_changeable == False %}
- {% else %}
- <li>
- {{ login_provider_input(login_provider) }}
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- </div>
- <fieldset
- id="openid-fs"
- {% if not login_form.openid_login_token.errors %}
- style="display:none;"
- {% endif %}
- >
- <h2 id="openid-heading">{% trans %}Please enter your <span>user name</span>, then sign in{% endtrans %}</h2>
- <p class="hint">{% trans %}(or select another login method above){% endtrans %}</p>
- <input type="text" name="openid_login_token" />
- <input class="submit-b" type="submit" name="openid_login_with_extra_token" value="{% trans %}Sign in{% endtrans %}"/>
- </fieldset>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+ <fieldset
+ id="openid-fs"
+ {% if not login_form.openid_login_token.errors %}
+ style="display:none;"
+ {% endif %}
+ >
+ <h2 id="openid-heading">{% trans %}Please enter your <span>user name</span>, then sign in{% endtrans %}</h2>
+ <p class="hint">{% trans %}(or select another login method above){% endtrans %}</p>
+ <input type="text" name="openid_login_token" />
+ <input class="submit-b" type="submit" name="openid_login_with_extra_token" value="{% trans %}Sign in{% endtrans %}"/>
+ </fieldset>
+ {% endif %}
{% endmacro %}