]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Ticket #2272: Block confirmation form should let enter trigger the 'yes' button
authorBrion Vibber <brion@pobox.com>
Sat, 3 Apr 2010 17:26:43 +0000 (10:26 -0700)
committerBrion Vibber <brion@pobox.com>
Sat, 3 Apr 2010 17:29:24 +0000 (10:29 -0700)
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.

actions/block.php
actions/groupblock.php

index 5fae45dffcd46b0140d00e1cb79488abc707a9c1..fe4ec00881e6565a503bcaac1dc82d601789aede 100644 (file)
@@ -168,4 +168,11 @@ class BlockAction extends ProfileFormAction
             return;
         }
     }
+
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('form_action-yes');
+    }
+
 }
index ec673358e66cea107c30fbb5f8fae1b4ea4e7c63..88d7634a28d89078047032e2d3e2af24e132fe4f 100644 (file)
@@ -214,5 +214,12 @@ class GroupblockAction extends Action
                             303);
         }
     }
+
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('form_action-yes');
+    }
+
 }