Mercurial > p > roundup > code
annotate share/roundup/templates/devel/html/user.item.html @ 8566:e4191aa7b402 default tip
doc: issue2551415 correct doc for change input->input_payload
in 2.5 the rest interface changed a variable name from input to
input_payload. An earlier commit changed the rest docs. This commit
adds an item for it to the upgrading 2.4.0->2.5.0 section. Also cross
reference added to the rest docs with the updated examples.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 09 Apr 2026 00:19:06 -0400 |
| parents | 4ac0bbb3e440 |
| children |
| rev | line source |
|---|---|
| 4434 | 1 <tal:doc metal:use-macro="templates/page/macros/frame" |
| 2 define="edit_ok context/is_edit_ok" | |
| 3 > | |
| 4 <title metal:fill-slot="head_title"> | |
| 5 <tal:if condition="context/id" i18n:translate="" | |
|
8365
4ac0bbb3e440
bug(security): CVE-2025-53865 - XSS bug
John Rouillard <rouilj@ieee.org>
parents:
8058
diff
changeset
|
6 >User <tal:x tal:content="context/id" i18n:name="id" |
|
4ac0bbb3e440
bug(security): CVE-2025-53865 - XSS bug
John Rouillard <rouilj@ieee.org>
parents:
8058
diff
changeset
|
7 />: <tal:x tal:content="context/username" i18n:name="title" |
| 4434 | 8 /> - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker" |
| 9 /></tal:if> | |
| 10 <tal:if condition="not:context/id" i18n:translate="" | |
| 11 >New User - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker" | |
| 12 /></tal:if> | |
| 13 </title> | |
| 14 <metal:slot fill-slot="more-javascript"> | |
| 15 <script metal:use-macro="templates/page/macros/user_utils"></script> | |
| 16 <script type="text/javascript" src="@@file/help_controls.js"></script> | |
| 17 </metal:slot> | |
| 18 <tal:block metal:fill-slot="body_title" | |
| 19 define="edit_ok context/is_edit_ok"> | |
| 20 <span tal:condition="python: not (context.id or edit_ok)" | |
| 21 tal:omit-tag="python:1" i18n:translate="">New User</span> | |
| 22 <span tal:condition="python: not context.id and edit_ok" | |
| 23 tal:omit-tag="python:1" i18n:translate="">New User Editing</span> | |
| 24 <span tal:condition="python: context.id and not edit_ok" | |
| 25 tal:omit-tag="python:1" i18n:translate="">User<tal:x | |
| 26 replace="context/id" i18n:name="id" /></span> | |
| 27 <span tal:condition="python: context.id and edit_ok" | |
| 28 tal:omit-tag="python:1" i18n:translate="">User<tal:x | |
| 29 replace="context/id" i18n:name="id" /> Editing</span> | |
| 30 </tal:block> | |
| 31 | |
| 32 <td class="content" metal:fill-slot="content"> | |
| 33 | |
| 34 <p tal:condition="python:not (context.is_view_ok() | |
| 35 or request.user.hasRole('Anonymous'))" i18n:translate=""> | |
| 36 You are not allowed to view this page.</p> | |
| 37 | |
| 38 <p tal:condition="python:not context.is_view_ok() | |
| 39 and request.user.hasRole('Anonymous')" i18n:translate=""> | |
| 40 Please login with your username and password.</p> | |
| 41 | |
| 42 <div tal:condition="context/is_view_ok"> | |
| 43 | |
| 44 <form method="POST" | |
| 45 tal:define="required python:'username address'.split()" | |
| 46 enctype="multipart/form-data" | |
| 47 tal:attributes="action context/designator; | |
| 48 onSubmit python:'return checkRequiredFields(\'%s\')'%'\', \''.join(required); | |
| 49 "> | |
| 50 <table class="form" tal:define=" | |
| 51 th_label templates/page/macros/th_label; | |
| 52 src_input templates/page/macros/user_src_input; | |
| 53 normal_input templates/page/macros/user_normal_input; | |
| 54 pw_input templates/page/macros/user_pw_input; | |
| 55 confirm_input templates/page/macros/user_confirm_input; | |
| 56 edit_ok context/is_edit_ok; | |
| 57 "> | |
| 58 <tr tal:define="name string:realname; label string:Name; value context/realname; edit_ok edit_ok"> | |
| 59 <th metal:use-macro="th_label">Name</th> | |
| 60 <td><input name="realname" metal:use-macro="src_input"></td> | |
| 61 </tr> | |
| 62 <tr tal:define="name string:username; label string:Login Name; value context/username"> | |
| 63 <th metal:use-macro="th_label">Login Name</th> | |
| 64 <td><input metal:use-macro="src_input"></td> | |
| 65 </tr> | |
| 66 <tal:if condition="edit_ok"> | |
| 67 <tr tal:define="name string:password; label string:Login Password"> | |
| 68 <th metal:use-macro="th_label">Login Password</th> | |
|
8058
0e382e97f0e3
fix: disable spellchecking for password fields
John Rouillard <rouilj@ieee.org>
parents:
4434
diff
changeset
|
69 <td><input metal:use-macro="pw_input" spellcheck="false" type="password"></td> |
| 4434 | 70 </tr> |
| 71 <tr tal:define="name string:password; label string:Confirm Password"> | |
| 72 <th metal:use-macro="th_label">Confirm Password</th> | |
|
8058
0e382e97f0e3
fix: disable spellchecking for password fields
John Rouillard <rouilj@ieee.org>
parents:
4434
diff
changeset
|
73 <td><input metal:use-macro="confirm_input" spellcheck="false" type="password"></td> |
| 4434 | 74 </tr> |
| 75 </tal:if> | |
| 76 <tal:if condition="python:request.user.hasPermission('Web Roles')"> | |
| 77 <tr tal:define="name string:roles; label string:Roles;"> | |
| 78 <th><label for="roles" i18n:translate="">Roles</label></th> | |
| 79 <td tal:define="gips context/id"> | |
| 80 <tal:subif condition=gips define="value context/roles"> | |
| 81 <input metal:use-macro="normal_input"> | |
| 82 </tal:subif> | |
| 83 <tal:subif condition="not:gips" define="value db/config/NEW_WEB_USER_ROLES"> | |
| 84 <input metal:use-macro="normal_input"> | |
| 85 </tal:subif> | |
| 86 <tal:block i18n:translate="">(to give the user more than one role, | |
| 87 enter a comma,separated,list)</tal:block> | |
| 88 </td> | |
| 89 </tr> | |
| 90 </tal:if> | |
| 91 | |
| 92 <tr tal:define="name string:phone; label string:Phone; value context/phone"> | |
| 93 <th metal:use-macro="th_label">Phone</th> | |
| 94 <td><input name="phone" metal:use-macro="normal_input"></td> | |
| 95 </tr> | |
| 96 | |
| 97 <tr tal:define="name string:organisation; label string:Organisation; value context/organisation"> | |
| 98 <th metal:use-macro="th_label">Organisation</th> | |
| 99 <td><input name="organisation" metal:use-macro="normal_input"></td> | |
| 100 </tr> | |
| 101 | |
| 102 <tr tal:condition="python:edit_ok or context.timezone" | |
| 103 tal:define="name string:timezone; label string:Timezone; value context/timezone"> | |
| 104 <th metal:use-macro="th_label">Timezone</th> | |
| 105 <td><input tal:replace="structure python: | |
| 106 utils.tzfield(context.timezone, 'timezone', db.config.DEFAULT_TIMEZONE)"/> | |
| 107 </td> | |
| 108 </tr> | |
| 109 | |
| 110 <tr tal:define="name string:address; label string:E-mail address; value context/address"> | |
| 111 <th metal:use-macro="th_label">E-mail address</th> | |
| 112 <td tal:define="mailto python:context.address.field(id='address'); | |
| 113 mklink python:mailto and not edit_ok"> | |
| 114 <a href="mailto:calvin@the-z.org" | |
| 115 tal:attributes="href string:mailto:$value" | |
| 116 tal:content="value" | |
| 117 tal:condition="python:mklink">calvin@the-z.org</a> | |
| 118 <tal:if condition=edit_ok> | |
| 119 <input metal:use-macro="src_input" value="calvin@the-z.org"> | |
| 120 </tal:if> | |
| 121 | |
| 122 </td> | |
| 123 </tr> | |
| 124 | |
| 125 <tr> | |
| 126 <th><label for="alternate_addresses" i18n:translate="">Alternate E-mail addresses<br>One address per line</label></th> | |
| 127 <td> | |
| 128 <textarea rows=5 cols=40 tal:replace="structure context/alternate_addresses/multiline">nobody@nowhere.org | |
| 129 anybody@everywhere.net | |
| 130 (alternate_addresses) | |
| 131 </textarea> | |
| 132 </td> | |
| 133 </tr> | |
| 134 | |
| 135 <tr tal:condition="edit_ok"> | |
| 136 <td> | |
| 137 | |
| 138 <input type="hidden" name="@template" value="item"> | |
| 139 <input type="hidden" name="@required" value="username,address" | |
| 140 tal:attributes="value python:','.join(required)"> | |
| 141 </td> | |
| 142 <td><input type="submit" value="save" tal:replace="structure context/submit"><!--submit button here--> | |
| 143 <input type="reset"> | |
| 144 </td> | |
| 145 </tr> | |
| 146 </table> | |
| 147 </form> | |
| 148 | |
| 149 <tal:block tal:condition="not:context/id" i18n:translate=""> | |
| 150 <table class="form"> | |
| 151 <tr> | |
| 152 <td>Note: </td> | |
| 153 <th class="required">highlighted</th> | |
| 154 <td> fields are required.</td> | |
| 155 </tr> | |
| 156 </table> | |
| 157 </tal:block> | |
| 158 | |
| 159 <tal:block tal:condition="context/id" tal:replace="structure context/history" /> | |
| 160 | |
| 161 </div> | |
| 162 | |
| 163 </td> | |
| 164 | |
| 165 </tal:doc> |
