Page MenuHomePhabricator

Special:Undelete page -> checkboxes not checked by default
Closed, InvalidPublic

Description

Author: dake.cdx

Description:
In Special:Undelete, one can select which contributions must be restored. In
Firefox (haven't tried with other browsers), the checkbox value is '1' but the
checkbox is NOT checked. HTML code reveals the problem :

<input type="checkbox" name="ts20051020110735" value="1" />

Value="1" is not enough. It should be :

<input type="checkbox" name="ts20051020110735" value="1" checked="1" />

to reflect the actual value. Quite easy to fix.

See :
http://www.w3.org/TR/REC-html40/interact/forms.html#adef-checked

checked [CI]

When the type attribute has the value "radio" or "checkbox", this boolean

attribute specifies that the button is on. User agents must ignore this
attribute for other control types.


Version: unspecified
Severity: normal

Details

Reference
bz3758

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:53 PM
bzimport set Reference to bz3758.
bzimport added a subscriber: Unknown Object (MLST).

dake.cdx wrote:

Fix is trivial in SpecialUndelete.php :

Replace :

$checkBox = "<input type=\"checkbox\" name=\"ts$ts\" value=\"1\" />";

with

$checkBox = "<input type=\"checkbox\" name=\"ts$ts\" value=\"1\" checked=\"1\" />";

tietew-mediazilla wrote:

If all checkboxes are not checked, all revisions are restored.

p.s.
in XHTML, checked="1" is invalid; must be checked="checked".

dake.cdx wrote:

If all checkboxes are not checked, all revisions are restored.

yep, that's right but it's also counter-intuitive, I always thought I had to
check all of them to make a complete restoration.

dake.cdx wrote:

Why is this bug tagged as invalid ?