Ticket #2272: Block confirmation form should let enter trigger the 'yes' button

Setting focus into the form to make it easier to submit by keyboard. Enter or space will now trigger the button right off without having to mouse around to find the button after we've clicked into the conf form, and keyboarders can also get to the 'no' button more easily.
This commit is contained in:
Brion Vibber 2010-04-03 10:26:43 -07:00
parent a29c19b4de
commit f2b60b78b6
2 changed files with 14 additions and 0 deletions

View File

@ -168,4 +168,11 @@ class BlockAction extends ProfileFormAction
return;
}
}
function showScripts()
{
parent::showScripts();
$this->autofocus('form_action-yes');
}
}

View File

@ -214,5 +214,12 @@ class GroupblockAction extends Action
303);
}
}
function showScripts()
{
parent::showScripts();
$this->autofocus('form_action-yes');
}
}