Skip to content

Commit 32010f3

Browse files
author
Johannes Gijsbers
committed
Move '<input type="hidden">' elements into a block.
It is invalid HTML4 Strict to have them at the top of a form.
1 parent 75965ae commit 32010f3

File tree

8 files changed

+47
-35
lines changed

8 files changed

+47
-35
lines changed

doc/customizing.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.101 $
5+
:Version: $Revision: 1.102 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -2373,8 +2373,6 @@ So putting it all together, and closing the table and form we get::
23732373
<form method="POST" onSubmit="return submit_once()"
23742374
enctype="multipart/form-data">
23752375

2376-
<input type="hidden" name="@required" value="name">
2377-
23782376
<table class="form">
23792377
<tr><th class="header" colspan="2">Category</th></tr>
23802378

@@ -2385,7 +2383,10 @@ So putting it all together, and closing the table and form we get::
23852383
</tr>
23862384

23872385
<tr>
2388-
<td>&nbsp;</td>
2386+
<td>
2387+
&nbsp;
2388+
<input type="hidden" name="@required" value="name">
2389+
</td>
23892390
<td colspan="3" tal:content="structure context/submit">
23902391
submit button will go here
23912392
</td>

templates/classic/html/file.item.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ <h2>File display</h2>
1313
<form method="POST" onSubmit="return submit_once()"
1414
enctype="multipart/form-data" tal:condition="context/is_edit_ok">
1515

16-
<input type="hidden" name=":template" value="item">
17-
<input type="hidden" name=":required" value="name,type">
18-
19-
<input type="hidden" name=":multilink"
20-
tal:condition="python:request.form.has_key(':multilink')"
21-
tal:attributes="value request/form/:multilink/value">
22-
2316
<table class="form">
2417
<tr>
2518
<th>Name</th>
@@ -31,7 +24,14 @@ <h2>File display</h2>
3124
</tr>
3225

3326
<tr>
34-
<td>&nbsp;</td>
27+
<td>
28+
&nbsp;
29+
<input type="hidden" name=":template" value="item">
30+
<input type="hidden" name=":required" value="name,type">
31+
<input type="hidden" name=":multilink"
32+
tal:condition="python:request.form.has_key(':multilink')"
33+
tal:attributes="value request/form/:multilink/value">
34+
</td>
3535
<td tal:content="structure context/submit">submit button here</td>
3636
</tr>
3737
</table>

templates/classic/html/issue.item.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ <h2>
2323
enctype="multipart/form-data" tal:condition="context/is_edit_ok"
2424
tal:attributes="action context/designator">
2525

26-
<input type="hidden" name=":template" value="item">
27-
<input type="hidden" name=":required" value="title,priority">
28-
2926
<table class="form">
3027
<tr>
3128
<th class="required">Title</th>
@@ -81,7 +78,11 @@ <h2>
8178
</tr>
8279

8380
<tr>
84-
<td>&nbsp;</td>
81+
<td>
82+
&nbsp;
83+
<input type="hidden" name=":template" value="item">
84+
<input type="hidden" name=":required" value="title,priority">
85+
</td>
8586
<td colspan=3 tal:content="structure context/submit">
8687
submit button will go here
8788
</td>

templates/classic/html/issue.search.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ <h2>Issue searching</h2>
66
<td class="content" metal:fill-slot="content">
77

88
<form method="GET" tal:attributes="action request/classname">
9-
<input type="hidden" name=":action" value="search">
109

1110
<table class="form" tal:define="
1211
cols python:request.columns or 'id activity title status assignedto'.split();
@@ -168,7 +167,10 @@ <h2>Issue searching</h2>
168167
</tr>
169168

170169
<tr>
171-
<td>&nbsp;</td>
170+
<td>
171+
&nbsp;
172+
<input type="hidden" name=":action" value="search">
173+
</td>
172174
<td><input type="submit" value="Search"></td>
173175
</tr>
174176

templates/classic/html/keyword.item.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,18 @@ <h2>Keyword editing</h2>
3131
<form method="POST" onSubmit="return submit_once()"
3232
enctype="multipart/form-data">
3333

34-
<input type="hidden" name=":required" value="name">
35-
<input type="hidden" name=":template" value="item">
36-
3734
<table class="form">
3835
<tr>
3936
<th>Keyword</th>
4037
<td tal:content="structure context/name/field">name</td>
4138
</tr>
4239

4340
<tr>
44-
<td>&nbsp;</td>
41+
<td>
42+
&nbsp;
43+
<input type="hidden" name=":required" value="name">
44+
<input type="hidden" name=":template" value="item">
45+
</td>
4546
<td colspan=3 tal:content="structure context/submit">
4647
submit button will go here
4748
</td>

templates/classic/html/user.forgotten.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@ <h2>Password reset request</h2>
1010
know the email address you registered with, enter it below.</p>
1111

1212
<form method="POST" onSubmit="return submit_once()">
13-
<input type="hidden" name="@action" value="passrst">
14-
<input type="hidden" name="@template" value="forgotten">
15-
<table class="form">
16-
<tr><th>Email Address:</th> <td><input name="address"></td> </tr>
17-
<tr><td></td><td><input type="submit" value="Request password reset"></td></tr>
13+
<table class="form">
14+
<tr>
15+
<th>Email Address:</th>
16+
<td><input name="address"></td>
17+
</tr>
18+
<tr>
19+
<td>&nbsp;</td>
20+
<td>
21+
<input type="hidden" name="@action" value="passrst">
22+
<input type="hidden" name="@template" value="forgotten">
23+
<input type="submit" value="Request password reset">
24+
</td>
25+
</tr>
1826
</table>
1927

2028
<p>Or, if you know your username, then enter it below.</p>

templates/classic/html/user.item.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ <h2>
2121
<form method="POST" onSubmit="return submit_once()"
2222
enctype="multipart/form-data" tal:condition="context/is_edit_ok">
2323

24-
<input type="hidden" name=":template" value="item">
25-
<input type="hidden" name=":required" value="username,address">
26-
2724
<table class="form">
2825
<tr>
2926
<th>Name</th>
@@ -72,7 +69,11 @@ <h2>
7269
</tr>
7370

7471
<tr>
75-
<td>&nbsp;</td>
72+
<td>
73+
&nbsp;
74+
<input type="hidden" name=":template" value="item">
75+
<input type="hidden" name=":required" value="username,address">
76+
</td>
7677
<td tal:content="structure context/submit">submit button here</td>
7778
</tr>
7879
</table>

templates/classic/html/user.register.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ <h2 tal:content="string:Registering with ${db/config/TRACKER_NAME}"></h2>
1616

1717
<tal:block tal:condition="editok">
1818
<form method="POST" onSubmit="return submit_once()" enctype="multipart/form-data">
19-
<input type="hidden" name=":template" value="register">
20-
<input type="hidden" name=":required" value="username">
21-
<input type="hidden" name=":required" value="password">
22-
<input type="hidden" name=":required" value="address">
2319

2420
<table class="form">
2521
<tr>
@@ -66,6 +62,8 @@ <h2 tal:content="string:Registering with ${db/config/TRACKER_NAME}"></h2>
6662
<tr>
6763
<td>&nbsp;</td>
6864
<td>
65+
<input type="hidden" name=":template" value="register">
66+
<input type="hidden" name=":required" value="username,password,address">
6967
<input type="hidden" name=":action" value="register">
7068
<input type="submit" name="submit" value="Register">
7169
</td>

0 commit comments

Comments
 (0)