Opened 17 years ago

Closed 17 years ago

#6230 closed (fixed)

SelectDateWidget don't render correctly (HTML error)

Reported by: Bernd Schlapsi Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

SelectDateWidget generate an HTML-error (reference to non-existent ID "id_birthday")

This is the rendered HTML code:

<tr><th><label for="id_birthday">Birthday:</label></th><td><select name="birthday_month">
<option value="1">Januar</option>
<option value="2">Februar</option>
<option value="3">März</option>
<option value="4">April</option>
<option value="5">Mai</option>
<option value="6">Juni</option>
<option value="7">Juli</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">Oktober</option>
<option value="11">November</option>
<option value="12">Dezember</option>
</select>
<select name="birthday_day">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="birthday_year">
<option value="1950">1950</option>
.....
<option value="1991">1991</option>
</select></td></tr>

Attachments (2)

6230-1.diff (3.8 KB ) - added by Matt McClanahan 17 years ago.
Patch to assign ids to the three select widgets in the format "id_<name>_<month,day,year>".
6230-2.diff (3.8 KB ) - added by Matt McClanahan 17 years ago.

Download all attachments as: .zip

Change History (9)

by Matt McClanahan, 17 years ago

Attachment: 6230-1.diff added

Patch to assign ids to the three select widgets in the format "id_<name>_<month,day,year>".

comment:1 by Matt McClanahan, 17 years ago

Has patch: set

comment:2 by Bernd Schlapsi, 17 years ago

I installed this patch on my local machine and tested it. It looks good for me. Would be great if this patch could be committed to trunk

comment:3 by Chris Beaven, 17 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

id_ = self.attrs.pop('id') doesn't seem like it belongs in render()

by Matt McClanahan, 17 years ago

Attachment: 6230-2.diff added

comment:4 by Matt McClanahan, 17 years ago

Patch needs improvement: unset

Agreed.

comment:5 by anonymous, 17 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Chris Beaven, 17 years ago

(that was me)

comment:7 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [7291]) Fixed #6230: Fixed the addition of id values to the select widgets in
SelectDateWidget. Thanks, Matt McClanahan.

Note: See TracTickets for help on using tickets.
Back to Top