chiark / gitweb /
Go through CSS and rationalize it. Some cosmetic improvements too.
[disorder] / templates / login.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <!--
3 This file is part of DisOrder.
4 Copyright (C) 2008 Richard Kettlewell
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 USA
20 -->
21 <html>
22  <head>
23 @include:stdhead@
24   <title>@label:login.title@</title>
25  </head>
26  <body>
27 @include{topbar}@
28    <h1>@label:login.title@</h1>
29
30    @if{@ne{@label:error@}{error}@}{
31    @#{error reporting from some earlier operation}@
32    <div class=error>
33      <p class=error>@label{error.@label:error@}@</p>
34    </div>
35    }@
36
37    @if{@ne{@label:status@}{status}@}{
38    @#{some action succeeded}@
39    <div class=loginstatus>
40      <p>@label{login.@label:status@}@</p>
41    </div>
42    }@
43
44    @if{@eq{@user@}{guest}@}{
45    @#{guest user, allow login and registration}@
46    <h2>Existing users</h2>
47
48    <p>If you have a username, use this form to log in.</p>
49
50    <form class=login action="@url@" method=POST
51          enctype="multipart/form-data" accept-charset=utf-8>
52      <table class=login>
53        <tr>
54          <td>@label:login.username@</td>
55          <td>
56            <input class=username name=username type=text size=32
57                   value="@arg:username@">
58          </td>
59        </tr>
60        <tr>
61          <td>@label:login.password@</td>
62          <td>
63            <input class=password name=password type=password value=""
64                   size=32>
65          </td>
66        </tr>
67        <tr>
68          <td colspan=2>
69            <button class=login name=button type=submit>
70              @label:login.login@
71            </button>
72          </td>
73        </tr>
74      </table>
75      <input name=action type=hidden value=login>
76      <input name=back type=hidden value="@arg:back@">
77    </form>
78
79    <p>If you've forgotten your password, use this form to request an
80    email reminder.  A reminder can only be sent if you registered with
81    your email address, and if a reminder has been sent too recently
82    then it won't be possible to send one.</p>
83
84    <form class=reminder action="@url@" method=POST
85          enctype="multipart/form-data" accept-charset=utf-8>
86      <table class=login>
87        <tr>
88          <td>@label:login.username@</td>
89          <td>
90            <input class=username name=username type=text size=32
91                   value="@arg:username@">
92          </td>
93        </tr>
94        <tr>
95          <td colspan=2>
96            <button class=login name=button type=submit>
97              @label:login.reminder@
98            </button>
99          </td>
100        </tr>
101      </table>
102      <input name=action type=hidden value=reminder>
103    </form>
104
105    @right{register}{
106    <h2>New Users</h2>
107
108    <p>If you do not have a login enter a username, a password and your
109    email address here.  You will be sent an email containing a URL,
110    which you must visit to activate your login before you can use
111    it.<p>
112
113    <form class=register action="@url@" method=POST
114          enctype="multipart/form-data" accept-charset=utf-8>
115      <table class=register>
116        <tr>
117          <td>@label:login.username@</td>
118          <td>
119            <input class=username name=username type=text size=32
120                   value="">
121          </td>
122          <td class=extra>@label:login.registerusernameextra@</td>
123        </tr>
124        <tr>
125          <td>@label:login.email@</td>
126          <td>
127            <input class=email name=email type=text size=32
128                   value="">
129          </td>
130          <td class=extra>@label:login.registeremailextra@</td>
131        </tr>
132        <tr>
133          <td>@label:login.password1@</td>
134          <td>
135            <input class=password name=password1 type=password size=32
136                   value="">
137          </td>
138          <td class=extra>@label:login.registerpassword1extra@</td>
139        </tr>
140        <tr>
141          <td>@label:login.password2@</td>
142          <td>
143            <input class=password name=password2 type=password size=32
144                   value="">
145          </td>
146          <td class=extra>@label:login.registerpassword2extra@</td>
147        </tr>
148        <tr>
149          <td colspan=3>
150            <button class=register name=button>
151              @label:login.register@
152            </button>
153          </td>
154        </tr>
155      </table>
156      <input name=action type=hidden value=register>
157    </form>}@
158    }{
159    @#{not the guest user, allow change of details and logout}@
160
161    <h2>Logged in as @user@</h2>
162
163    <form class=logout action="@url@" method=POST
164          enctype="multipart/form-data" accept-charset=utf-8>
165      <div class=logout>
166        <button class=logout name=submit type=submit>
167          @label:login.logout@
168        </button>
169      </div>
170      <input name=action type=hidden value=logout>
171    </form>
172
173    <p>Use this form to change your email address and/or password.</p>
174
175    <form class=edituser action="@url@" method=POST
176          enctype="multipart/form-data" accept-charset=utf-8>
177      <table class=edituser>
178        <tr>
179          <td>@label:login.email@</td>
180          <td>
181            <input class=email name=email type=text size=32
182                   value="@userinfo:email@">
183          </td>
184          <td class=extra>@label:login.edituseremailextra@</td>
185        </tr>
186        <tr>
187          <td>@label:login.newpassword@</td>
188          <td>
189            <input class=password name=changepassword1 type=password size=32
190                   value="">
191          </td>
192          <td class=extra>@label:login.edituserpassword1extra@</td>
193        </tr>
194        <tr>
195          <td>@label:login.newpassword@</td>
196          <td>
197            <input class=password name=changepassword2 type=password size=32
198                   value="">
199          </td>
200          <td class=extra>@label:login.edituserpassword2extra@</td>
201        </tr>
202        <tr>
203          <td colspan=3>
204            <button class=edituser name=submit type=submit>
205              @label:login.edituser@
206            </button>
207          </td>
208        </tr>
209      </table>
210      <input name=action type=hidden value=edituser>
211    </form>
212
213    }@
214
215 @include{topbarend}@
216  </body>
217 </html>
218 @@
219 <!--
220 Local variables:
221 mode:sgml
222 sgml-always-quote-attributes:nil
223 sgml-indent-step:1
224 sgml-indent-data:t
225 End:
226 -->