]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/auth/complete.html
enabling the CSRF protection middleware and adding the {% csrf_token %} tag to the...
[osqa.git] / forum / skins / default / templates / auth / complete.html
1 {% extends "base_content.html" %}
2 <!-- complete.html -->
3 {% load i18n %}
4 {% block head %}{% endblock %}
5 {% block title %}{% spaceless %}{% trans "Connect your OpenID with this site" %}{% endspaceless %}{% endblock %}
6 {% block content %}
7     <div id="main-bar" class="headNormal">
8                 {% trans "Connect your OpenID with your account on this site" %}
9     </div>      
10         <div id="completetxt" >
11         <div class="message">
12             {# Only display the OpenID greeting if a provider is detected. #}
13             {% if provider %}
14                 <p>
15                     <b>{% trans "You are here for the first time with " %}{{ provider }}</b>
16                 </p>
17             {% endif %}
18             <p>
19                 {% trans "Please choose your screen name and confirm your email address. A valid email address is necessary to receive notifications about activity in the areas of this community you're most interested in, and will help you become an involved participant in this community." %}
20             </p>
21         </div>
22         <p style="display:none">{% trans "This account already exists, please use another." %}</p>
23         </div>
24
25         {% if form1.errors %}
26         <ul class="errorlist">
27         {% if form1.non_field_errors %}
28             {% for error in form1.non_field_errors %}
29                 <li>{{error}}</li>
30             {% endfor %}
31         {% endif %}
32         </ul>
33         {% endif %}
34
35         <div class="login">
36         <form name="fregister" action="" method="POST">
37             {% csrf_token %}
38             {{ form1.next }}
39             <div class="form-row-vertical margin-bottom">
40                 <label for="id_username">{{ form1.username.label }}</label>
41                 {% if form1.username.errors %} 
42                     <p class="error">{{ form1.username.errors|join:", " }}</p>
43                 {% endif %}
44                 {{ form1.username }}
45             </div>
46             <div class="form-row-vertical margin-bottom">
47                 <label for="id_email">{{ form1.email.label }}</label>
48                 {% if form1.email.errors %} 
49                     <p class="error">{{ form1.email.errors|join:", " }}</p>
50                 {% endif %}
51                 {{ form1.email }}
52             </div>
53             {% if form1.password1 %}
54                 <div class="form-row-vertical margin-bottom">
55                     <label for="password1_id">{{ form1.password1.label }}</label>
56                     {% if form1.password1.errors %}
57                         <p class="error">{{ form1.password1.errors|join:", " }}</p>
58                     {% endif %}
59                     {{ form1.password1 }}
60                 </div>
61                 <div class="form-row-vertical margin-bottom">
62                     <label for="password2_id">{{ form1.password2.label }}</label>
63                     {% if form1.password2.errors %} 
64                         <p class="error">{{ form1.password2.errors|join:", " }}</p>
65                     {% endif %}
66                     {{ form1.password2 }}
67                 </div>
68             {% endif %}
69             {% if form1.recaptcha %}
70                 <div class="form-row-vertical margin-bottom">
71                 <label for="recaptcha_id">{{ form1.recaptcha.label }}</label>
72                 {% if form1.recaptcha.errors %} 
73                     <p class="error">{{ form1.recaptcha.errors|join:", " }}</p>
74                 {% endif %}
75                 {{ form1.recaptcha }}
76                 </div>
77             {% endif %}
78             <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" id="bnewaccount" value="{% trans "create account" %}"/></div>
79                 </form>
80         </div>
81     {% comment %}<!-- this form associates openID with an existing password-protected account, not yet functional -->
82     {% if form2 %}
83         <div class="login" style="display:none">
84         <form name="fverify" action="{% url user_register %}" method="POST">
85             {% csrf_token %}
86             {{ form2.next }}
87                         <fieldset style="padding:10px">
88                                 <legend class="big">{% trans "Existing account" %}</legend>
89                                 <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br/>{{ form2.username }}</div>
90                                 <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br/>{{ form2.password }}</div>
91                 <p><span class='big strong'>(Optional) receive updates by email</span> - only sent when there are any.</p>
92                                 <!--todo double check translation from chinese 确认 = "Register" -->
93                                 <div class="submit-row">
94                                         <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}"/> 
95                                         <a href="{% url user_sendpw %}">{% trans "Forgot your password?" %}</a>
96                                 </div>
97                         </fieldset>
98                 </form>
99         </div>
100     {% endif %}
101     {% endcomment %}
102 {% endblock %}
103 <!-- end complete.html -->