]> git.ozlabs.org Git - patchwork/blob - templates/registration/registration_form.html
templates: Add CSRF (cross-site request forgery) values to form posts
[patchwork] / templates / registration / registration_form.html
1 {% extends "base.html" %}
2
3 {% block title %}Registration{% endblock %}
4 {% block heading %}Registration{% endblock %}
5
6
7 {% block body %}
8
9 {% if request and not error %}
10  <p>Registration successful!</p>
11  <p>A confirmation email has been sent to {{ request.email }}. You'll
12  need to visit the link provided in that email to confirm your
13  registration.</p>
14  <pre>{{email}}</pre>
15 </p>
16 {% else %}
17 <p>By creating a patchwork account, you can:<p>
18 <ul>
19  <li>create "bundles" of patches</li>
20  <li>update the state of your own patches</li>
21 </ul>
22 <form method="post">
23 {% csrf_token %}
24 <table class="form registerform">
25  <tr>
26   <th colspan="2" class="headerrow">register</th>
27  </tr>
28  {% if error %}
29   <tr>
30    <td colspan="2">{{ error }}</td>
31   </tr>
32  {% endif %}
33
34   <tr>
35    <td>{{ form.first_name.label_tag }}</td>
36    <td>
37 {% if form.first_name.errors %}
38     {{ form.first_name.errors }}
39 {% endif %}
40     {{ form.first_name }}
41 {% if form.first_name.help_text %}
42     <div class="help_text"/>{{ form.first_name.help_text }}</div>
43 {% endif %}
44    </td>
45   </tr>
46    
47   <tr>
48    <td>{{ form.last_name.label_tag }}</td>
49    <td>
50 {% if form.last_name.errors %}
51     {{ form.last_name.errors }}
52 {% endif %}
53     {{ form.last_name }}
54 {% if form.last_name.help_text %}
55     <div class="help_text"/>{{ form.last_name.help_text }}</div>
56 {% endif %}
57    </td>
58   </tr>
59
60   <tr>
61    <td></td>
62    <td class="form-help">
63     Your name is used to identify you on the site
64    </td>
65   </tr>
66    
67   <tr>
68    <td>{{ form.email.label_tag }}</td>
69    <td>
70 {% if form.email.errors %}
71     {{ form.email.errors }}
72 {% endif %}
73     {{ form.email }}
74 {% if form.email.help_text %}
75     <div class="help_text"/>{{ form.email.help_text }}</div>
76 {% endif %}
77    </td>
78   </tr>
79    
80   <tr>
81    <td></td>
82    <td class="form-help">
83     Patchwork will send a confirmation email to this address
84    </td>
85   </tr>
86
87   <tr>
88    <td>{{ form.username.label_tag }}</td>
89    <td>
90 {% if form.username.errors %}
91     {{ form.username.errors }}
92 {% endif %}
93     {{ form.username }}
94 {% if form.username.help_text %}
95     <div class="help_text"/>{{ form.username.help_text }}</div>
96 {% endif %}
97    </td>
98   </tr>
99    
100   <tr>
101    <td>{{ form.password.label_tag }}</td>
102    <td>
103 {% if form.password.errors %}
104     {{ form.password.errors }}
105 {% endif %}
106     {{ form.password }}
107 {% if form.password.help_text %}
108     <div class="help_text"/>{{ form.password.help_text }}</div>
109 {% endif %}
110    </td>
111   </tr>
112
113    <tr>
114   <td colspan="2" class="submitrow">
115    <input type="submit" value="Register"/>
116   </td>
117  </tr>
118 </table>
119 </form>
120 {% endif %}
121
122 {% endblock %}