summaryrefslogtreecommitdiffstats
path: root/templates/authopenid/complete.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/authopenid/complete.html')
-rw-r--r--templates/authopenid/complete.html100
1 files changed, 74 insertions, 26 deletions
diff --git a/templates/authopenid/complete.html b/templates/authopenid/complete.html
index b9a14e16..9a94c3c4 100644
--- a/templates/authopenid/complete.html
+++ b/templates/authopenid/complete.html
@@ -1,5 +1,19 @@
{% extends "base_content.html" %}
<!-- complete.html -->
+{% comment %}
+views calling this template:
+* django_authopenid.views.register with login_type='openid'
+* django_authopenid.views.signin - with login_type='legacy'
+
+parameters:
+* provider
+* login_type openid|legacy
+* username (same as screen name or username in the models, and nickname in openid sreg)
+* form1 - OpenidRegisterForm
+* form2 - OpenidVerifyForm not clear what this form is supposed to do, not used for legacy
+* email_feeds_form forum.forms.EditUserEmailFeedsForm
+* openid_username_exists
+{% endcomment %}
{% load i18n %}
{% block head %}{% endblock %}
{% block title %}{% spaceless %}{% trans "Connect your OpenID with this site" %}{% endspaceless %}{% endblock %}
@@ -7,29 +21,38 @@
<div id="main-bar" class="headNormal">
{% trans "Connect your OpenID with your account on this site" %}
</div>
- <p id="completetxt" >
+ <div id="completetxt" >
<div class="message">
- {% blocktrans %}register new {{provider}} account info{% endblocktrans %}
+ {% ifequal login_type 'openid' %}
+ {% blocktrans %}register new {{provider}} account info, see {{gravatar_faq_url}}{% endblocktrans %}
+ {% else %}
+ {% ifequal login_type 'legacy' %}
+ {% if external_login_name_is_taken %}
+ {% blocktrans %}{{username}} already exists, choose another name for
+ {{provider}}. Email is required too, see {{gravatar_faq_url}}
+ {% endblocktrans %}
+ {% else %}
+ {% blocktrans %}register new external {{provider}} account info, see {{gravatar_faq_url}}{% endblocktrans %}
+ {% endif %}
+ {% endifequal %}
+ {% endifequal %}
</div>
<p style="display:none">{% trans "This account already exists, please use another." %}</p>
- </p>
+ </div>
{% if form1.errors %}
- <p class="errors">
- <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
- <ul class="error-list">
- {% if form1.username.errors %}
- <li><span class="error">{{ form1.username.errors|join:", " }}</span></li>
- {% endif %}
- {% if form1.email.errors %}
- <li><span class="error">{{ form1.email.errors|join:", " }}</span></li>
- {% endif %}
+ <ul class="errorlist">
+ {% if form1.non_field_errors %}
+ {% for error in form1.non_field_errors %}
+ <li>{{error}}</li>
+ {% endfor %}
+ {% endif %}
</ul>
- </p>
{% endif %}
- {% if form2.errors %}
- <p class="errors">
- <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br>
+ {% comment %}
+ {% if form2.errors %}<!--form2 is dysfunctional so commented out -->
+ <div class="errors">
+ <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br/>
<ul class="error-list">
{% if form2.username.errors %}
<li><span class="error">{{ form2.username.errors|join:", " }}</span></li>
@@ -38,31 +61,56 @@
<li><span class="error">{{ form2.password.errors|join:", " }}</span></li>
{% endif %}
</ul>
- </p>
+ </div>
{% endif %}
+ {% endcomment %}
<div class="login">
+ {% ifequal login_type 'openid' %}
<form name="fregister" action="{% url user_register %}" method="POST">
- {{ form.next }}
- <div class="form-row"><label for="id_username">{% trans "Screen name label" %}</label><br />{{ form1.username }}</div>
- <div class="form-row"><label for="id_email">{% trans "Email address label" %}</label><br />{{ form1.email }}</div>
- <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"></div>
+ {% else %}
+ <form name="fregister" action="{% url user_signin %}" method="POST">
+ {% endifequal %}
+ {{ form1.next }}
+ <div class="form-row-vertical">
+ <label for="id_username">{% trans "Screen name label" %}</label>
+ {% if form1.username.errors %}
+ <p class="error">{{ form1.username.errors|join:", " }}</p>
+ {% endif %}
+ {{ form1.username }}
+ </div>
+ <div class="form-row-vertical margin-bottom">
+ <label for="id_email">{% trans "Email address label" %}</label>
+ {% if form1.email.errors %}
+ <p class="error">{{ form1.email.errors|join:", " }}</p>
+ {% endif %}
+ {{ form1.email }}
+ </div>
+ <p class='nomargin'>{% trans "receive updates motivational blurb" %}</p>
+ {% include "edit_user_email_feeds_form.html" %}
+ <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"/></div>
</form>
</div>
+ {% comment %}<!-- this form associates openID with an existing password-protected account, not yet functional -->
+ {% if form2 %}
<div class="login" style="display:none">
<form name="fverify" action="{% url user_register %}" method="POST">
- {{ form.next }}
+ {{ form2.next }}
<fieldset style="padding:10px">
<legend class="big">{% trans "Existing account" %}</legend>
- <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br />{{ form2.username }}</div>
- <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br />{{ form2.password }}</div>
+ <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br/>{{ form2.username }}</div>
+ <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br/>{{ form2.password }}</div>
+ <p><span class='big strong'>(Optional) receive updates by email</span> - only sent when there are any.</p>
+ {% include "edit_user_email_feeds_form.html" %}
<!--todo double check translation from chinese 确认 = "Register" -->
<div class="submit-row">
- <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}">
- <a href="">{% trans "Forgot your password?" %}</a>
+ <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}"/>
+ <a href="{% url user_sendpw %}">{% trans "Forgot your password?" %}</a>
</div>
</fieldset>
</form>
</div>
+ {% endif %}
+ {% endcomment %}
{% endblock %}
<!-- end complete.html -->