Skip to content

Commit 1bc1be9

Browse files
committed
fix: duplicate password id generated for user.item.html
Fix the user_confirm_input macro at the end of html/page.html to modify the id so it doesn't duplicate the one used for the regular password.
1 parent 74a3df2 commit 1bc1be9

File tree

6 files changed

+29
-4
lines changed

6 files changed

+29
-4
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ Fixed:
7171
newer. dicttoxml uses a type alias: collection.Iterator that is
7272
dropped in Python 3.10. (found by Norbert SCHLEMMER, fix John
7373
Rouillard)
74+
- fix repeated password id with user.item.html in all templates except
75+
jinja2. (John Rouillard)
7476

7577
Features:
7678

doc/upgrading.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,29 @@ values or if a value must be changed manually.
112112

113113
This will insert the bad API login rate limiting settings.
114114

115+
Fix duplicate id for confirm password in user.item.html (optional)
116+
------------------------------------------------------------------
117+
118+
The TAL macro ``user_confirm_input`` at the end of ``html/page.html``
119+
for all templates except ``jinja2`` sets the ``id`` of the ``Confirm
120+
password`` input the same as the ``Login Password`` input. This
121+
creates an HTML error. Two items must not have the same id.
122+
123+
However browsers ignore the error and things still work. If you were
124+
to use css or javascript to target the ``password`` id, it would not
125+
work as expected.
126+
127+
To fix this, change the line near the end of your tracker's
128+
``html/page.html`` from::
129+
130+
tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value="">
131+
132+
to::
133+
134+
tal:attributes="id string:confirm_$name; name string:@confirm@$name; readonly not:edit_ok" value="">
135+
136+
This will change the id to ``confirm_password``.
137+
115138
Bad Login Rate Limiting and Locking (info)
116139
------------------------------------------
117140

share/roundup/templates/classic/html/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,5 +369,5 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
369369
<input metal:define-macro="user_pw_input" type="password"
370370
tal:attributes="id name; name name; readonly not:edit_ok" value="">
371371
<input metal:define-macro="user_confirm_input" type="password"
372-
tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value="">
372+
tal:attributes="id string:confirm_$name; name string:@confirm@$name; readonly not:edit_ok" value="">
373373

share/roundup/templates/devel/html/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,6 @@ <h1 id="breadcrumb"><span metal:define-slot="body_title">body title</span></h1>
434434
<input metal:define-macro="user_pw_input" type="password"
435435
tal:attributes="id name; name name; readonly not:edit_ok" value=""/>
436436
<input metal:define-macro="user_confirm_input" type="password"
437-
tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value=""/>
437+
tal:attributes="id string:confirm_$name; name string:@confirm@$name; readonly not:edit_ok" value=""/>
438438

439439
<!-- SHA: ca32e5f43efcb7c3b4940df6f7a176f6990b15f0 -->

share/roundup/templates/minimal/html/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,5 +341,5 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
341341
<input metal:define-macro="user_pw_input" type="password"
342342
tal:attributes="id name; name name; readonly not:edit_ok" value="">
343343
<input metal:define-macro="user_confirm_input" type="password"
344-
tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value="">
344+
tal:attributes="id string:confirm_$name; name string:@confirm@$name; readonly not:edit_ok" value="">
345345

share/roundup/templates/responsive/html/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,4 @@ <h1><span metal:define-slot="body_title">body title</span></h1>
449449
<input metal:define-macro="user_pw_input" type="password"
450450
tal:attributes="id name; name name; readonly not:edit_ok" value=""/>
451451
<input metal:define-macro="user_confirm_input" type="password"
452-
tal:attributes="id name; name string:@confirm@$name; readonly not:edit_ok" value=""/>
452+
tal:attributes="id string:confirm_$name; name string:@confirm@$name; readonly not:edit_ok" value=""/>

0 commit comments

Comments
 (0)