comparison website/issues/html/issue.item.html @ 6307:6ad3b2d46852

more lighthouse fixes Add id's to html input elements and wrap some additional labels with label tag with for attribute.
author John Rouillard <rouilj@ieee.org>
date Thu, 24 Dec 2020 00:10:53 -0500
parents 871dc7904d7a
children 83b67f65b8ff
comparison
equal deleted inserted replaced
6306:871dc7904d7a 6307:6ad3b2d46852
41 <fieldset><legend>classification</legend> 41 <fieldset><legend>classification</legend>
42 <table class="form"> 42 <table class="form">
43 <tr> 43 <tr>
44 <th class="required"><label for="title" i18n:translate="">Title:</label></th> 44 <th class="required"><label for="title" i18n:translate="">Title:</label></th>
45 <td colspan="3" tal:condition="context/title/is_edit_ok" 45 <td colspan="3" tal:condition="context/title/is_edit_ok"
46 tal:content="structure python:context.title.field(size=60)">title</td> 46 tal:content="structure python:context.title.field(id='title', size=60)">title</td>
47 <td colspan="3" tal:condition="not:context/title/is_edit_ok"> 47 <td colspan="3" tal:condition="not:context/title/is_edit_ok">
48 <span tal:content="structure context/title/plain"/> 48 <span tal:content="structure context/title/plain"/>
49 <input type="hidden" name="title" tal:attributes="value context/title"> 49 <input type="hidden" name="title" tal:attributes="value context/title">
50 </td> 50 </td>
51 </tr> 51 </tr>
80 <th i18n:translate=""> 80 <th i18n:translate="">
81 <span tal:replace="structure python:db.status.classhelp('id,name,description',label='Status')" />: 81 <span tal:replace="structure python:db.status.classhelp('id,name,description',label='Status')" />:
82 </th> 82 </th>
83 <td tal:content="structure context/status/menu">status</td> 83 <td tal:content="structure context/status/menu">status</td>
84 <th><label for="resolution" i18n:translate="">Resolution:</label></th> 84 <th><label for="resolution" i18n:translate="">Resolution:</label></th>
85 <td tal:content="structure context/resolution/menu">resolution</td> 85 <td tal:content="structure python:context.resolution.menu(html_kwargs={'id':'resolution'})">resolution</td>
86 </tr> 86 </tr>
87 87
88 <tr tal:condition="context/id"> 88 <tr tal:condition="context/id">
89 <th> <label for="dependencies" i18n:translate="">Dependencies</label> 89 <th> <label for="dependencies" i18n:translate="">Dependencies</label>
90 <span tal:condition="context/dependencies/is_edit_ok" 90 <span tal:condition="context/dependencies/is_edit_ok"
91 tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='dependencies')" /> 91 tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='dependencies')" />
92 </th> 92 </th>
93 <td> 93 <td>
94 <span tal:replace="structure python:context.dependencies.field(showid=1,size=20)" /> 94 <span tal:replace="structure python:context.dependencies.field(id='dependencies',showid=1,size=20)" />
95 <span tal:condition="context/dependencies" tal:repeat="d python:context.dependencies.sorted('creation')"> 95 <span tal:condition="context/dependencies" tal:repeat="d python:context.dependencies.sorted('creation')">
96 <br/>View: <a tal:attributes="href string:issue${d/id}" tal:content="d/id"></a> 96 <br/>View: <a tal:attributes="href string:issue${d/id}" tal:content="d/id"></a>
97 </span> 97 </span>
98 </td> 98 </td>
99 <th> 99 <th>
100 <tal:block><label for="superseder" i18n:translate="">Superseder</label></tal:block>: 100 <tal:block><label for="superseder" i18n:translate="">Superseder</label></tal:block>:
101 <span tal:condition="context/superseder/is_edit_ok" 101 <span tal:condition="context/superseder/is_edit_ok"
102 tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='superseder')" /> 102 tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='superseder')" />
103 </th> 103 </th>
104 <td> 104 <td>
105 <span tal:replace="structure python:context.superseder.field(showid=1, size=20)" /> 105 <span tal:replace="structure python:context.superseder.field(id='superseder', showid=1, size=20)" />
106 <span tal:condition="context/superseder"> 106 <span tal:condition="context/superseder">
107 <!-- <br><span i18n:translate="">View</span>: 107 <!-- <br><span i18n:translate="">View</span>:
108 <a tal:repeat="sup context/superseder" 108 <a tal:repeat="sup context/superseder"
109 tal:content="python:sup['id'] + ', '*(not repeat['sup'].end)" 109 tal:content="python:sup['id'] + ', '*(not repeat['sup'].end)"
110 tal:attributes="href string:issue${sup/id}; title sup/title;"></a> --> 110 tal:attributes="href string:issue${sup/id}; title sup/title;"></a> -->
115 </td> 115 </td>
116 </tr> 116 </tr>
117 <tr> 117 <tr>
118 <th><label for="assignee" i18n:translate="">Assigned To</label>:</th> 118 <th><label for="assignee" i18n:translate="">Assigned To</label>:</th>
119 <td tal:condition="context/status/is_edit_ok"> 119 <td tal:condition="context/status/is_edit_ok">
120 <select name="assignee"> 120 <select id="assignee" name="assignee">
121 <option value="-1">nobody</option> 121 <option value="-1">nobody</option>
122 <tal:block tal:repeat="userdata python:db._db.user.filter_sql('select id,_username from _user where _roles like \'%Developer%\' order by _username')"> 122 <tal:block tal:repeat="userdata python:db._db.user.filter_sql('select id,_username from _user where _roles like \'%Developer%\' order by _username')">
123 <option tal:attributes="value python:userdata[0]; 123 <option tal:attributes="value python:userdata[0];
124 selected python:str(userdata[0]) == context.assignee._value" 124 selected python:str(userdata[0]) == context.assignee._value"
125 tal:content="python:userdata[1]"></option> 125 tal:content="python:userdata[1]"></option>
132 <th><label for="nosy" i18n:translate="">Nosy List</label>: 132 <th><label for="nosy" i18n:translate="">Nosy List</label>:
133 <span tal:condition="context/nosy/is_edit_ok" 133 <span tal:condition="context/nosy/is_edit_ok"
134 tal:replace="structure python:db.user.classhelp('username,realname,address', property='nosy')" /> 134 tal:replace="structure python:db.user.classhelp('username,realname,address', property='nosy')" />
135 </th> 135 </th>
136 <td> 136 <td>
137 <span tal:replace="structure context/nosy/field" /> 137 <span tal:replace="structure python:context.nosy.field(id='nosy')" />
138 </td> 138 </td>
139 </tr> 139 </tr>
140 <tr> 140 <tr>
141 <th> 141 <th>
142 <span tal:replace="structure python:db.priority.classhelp('id,name,description',label='Priority')" />: 142 <span tal:replace="structure python:db.priority.classhelp('id,name,description',label='Priority')" />:
143 </th> 143 </th>
144 <td tal:content="structure context/priority/menu">priority</td> 144 <td tal:content="structure context/priority/menu">priority</td>
145 <th i18n:translate="">Keywords:</th> 145 <th><label for="keywords" i18n:translate="">Keywords</label>:</th>
146 <td tal:content="structure python:context['keywords'].menu(height=5)">keywords</td> 146 <td tal:content="structure python:context['keywords'].menu(height=5,html_kwargs={'id': 'keywords'})">keywords</td>
147 147
148 148
149 </tr> 149 </tr>
150 <tr tal:condition="context/is_edit_ok"> 150 <tr tal:condition="context/is_edit_ok">
151 <th><label for="@note" i18n:translate="">Comment</label>:</th> 151 <th><label for="@note" i18n:translate="">Comment</label>:</th>
152 <td colspan="3"> 152 <td colspan="3">
153 <textarea tal:content="request/form/@note/value | default" 153 <textarea tal:content="request/form/@note/value | default"
154 name="@note" wrap="hard" rows="10" cols="72"></textarea> 154 id="@note" name="@note" wrap="hard" rows="10" cols="72"></textarea>
155 </td> 155 </td>
156 </tr> 156 </tr>
157 157
158 <tr tal:condition="context/is_edit_ok"> 158 <tr tal:condition="context/is_edit_ok">
159 <th><label for="file-1@content" i18n:translate="">File</label>:</th> 159 <th><label for="file-1@content" i18n:translate="">File</label>:</th>
160 <td colspan=3> 160 <td colspan=3>
161 <input type="hidden" name="@link@files" value="file-1"> 161 <input type="hidden" name="@link@files" value="file-1">
162 <input type="file" name="file-1@content" size="40"> 162 <input type="file" id="file-1@content" name="file-1@content" size="40">
163 </td> 163 </td>
164 </tr> 164 </tr>
165 <tr tal:condition="context/is_edit_ok"> 165 <tr tal:condition="context/is_edit_ok">
166 <th><label for="file-1@description" i18n:translate="">File Description</label>:</th> 166 <th><label for="file-1@description" i18n:translate="">File Description</label>:</th>
167 <td colspan=3><input type="edit" name="file-1@description" size="40"></td> 167 <td colspan=3><input type="edit" id="file-1@description" name="file-1@description" size="40"></td>
168 </tr> 168 </tr>
169 </table> 169 </table>
170 </fieldset> 170 </fieldset>
171 <table class="form"> 171 <table class="form">
172 <tr tal:condition="context/is_edit_ok"> 172 <tr tal:condition="context/is_edit_ok">

Roundup Issue Tracker: http://roundup-tracker.org/