$fields = array(
'Target' => array(
'type' => 'text',
- 'label-message' => 'ipadressorusername',
- 'tabindex' => '1',
+ 'label-message' => 'ipaddressorusername',
+ 'autofocus' => true,
'size' => '45',
'required' => true,
),
'Name' => array(
'type' => 'info',
- 'label-message' => 'ipadressorusername',
+ 'label-message' => 'ipaddressorusername',
),
'Reason' => array(
'type' => 'text',
$fields['Target']['default'] = "#{$this->target}";
break;
}
+ // target is hidden, so the reason is the first element
+ $fields['Target']['autofocus'] = false;
+ $fields['Reason']['autofocus'] = true;
}
} else {
$fields['Target']['default'] = $this->target;
* Submit callback for an HTMLForm object
* @param array $data
* @param HTMLForm $form
- * @return Array( Array(message key, parameters)
+ * @return array|bool Array(message key, parameters)
*/
public static function processUIUnblock( array $data, HTMLForm $form ) {
return self::processUnblock( $data, $form->getContext() );
/**
* Process the form
*
- * @param $data Array
- * @param $context IContextSource
+ * @param array $data
+ * @param IContextSource $context
* @throws ErrorPageError
- * @return Array( Array(message key, parameters) ) on failure, True on success
+ * @return array|bool Array(message key, parameters) on failure, True on success
*/
public static function processUnblock( array $data, IContextSource $context ) {
$performer = $context->getUser();