class HTMLButtonField extends HTMLFormField {
protected $buttonType = 'button';
+ /** @var array $mFlags Flags to add to OOUI Button widget */
+ protected $mFlags = array();
+
public function __construct( $info ) {
$info['nodata'] = true;
+ if ( isset( $info['flags'] ) )
+ $this->mFlags = $info['flags'];
parent::__construct( $info );
}
return new OOUI\ButtonInputWidget( array(
'name' => $this->mName,
'value' => $value,
+ 'label' => $value,
'type' => $this->buttonType,
'classes' => array( 'mw-htmlform-submit', $this->mClass ),
'id' => $this->mID,
+ 'flags' => $this->mFlags,
) + $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ) );
}
*/
class HTMLSubmitField extends HTMLButtonField {
protected $buttonType = 'submit';
+
+ protected $mFlags = array( 'primary', 'constructive' );
}
}
}
- if ( User::getCanonicalName( $this->mTarget ) === $user->getName() ) {
+ if ( $this->mTarget !== null && User::getCanonicalName( $this->mTarget ) === $user->getName() ) {
$this->isself = true;
}
if (
$request->wasPosted() &&
$request->getCheck( 'saveusergroups' ) &&
+ $this->mTarget !== null &&
$user->matchEditToken( $request->getVal( 'wpEditToken' ), $this->mTarget )
) {
// save settings
"passwordreset": "Reset password",
"passwordreset-text-one": "Complete this form to receive a temporary password via email.",
"passwordreset-text-many": "{{PLURAL:$1|Fill in one of the fields to receive a temporary password via email.}}",
- "passwordreset-legend": "Reset password",
"passwordreset-disabled": "Password resets have been disabled on this wiki.",
"passwordreset-emaildisabled": "Email features have been disabled on this wiki.",
"passwordreset-username": "Username:",
"passwordreset": "Title of [[Special:PasswordReset]].\n{{Identical|Reset password}}",
"passwordreset-text-one": "Text on [[Special:PasswordReset]] that appears when there is only one way of resetting the password.\n\n{{msg-mw|Passwordreset-text-many}} will be used, when there are multiple ways of resetting the password.",
"passwordreset-text-many": "Text on [[Special:PasswordReset]] that appears when there are multiple ways of resetting the password.\n\nParameters:\n* $1 - the number of password reset routes\n\n{{msg-mw|Passwordreset-text-one}} will be used, when there is only one way of resetting the password.",
- "passwordreset-legend": "{{Identical|Reset password}}",
"passwordreset-disabled": "Used as error message in changing password.",
"passwordreset-emaildisabled": "Used as error message in changing password when site's email feature is disabled.",
"passwordreset-username": "{{Identical|Username}}",