mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 08:14:15 +00:00
Pass context to HTMLForm, don't use HTMLForm::setTitle
Change-Id: I5325d1b9db2db9ea6fa0006cd9c4a2e10db05d75
This commit is contained in:
parent
534beaf0f3
commit
6661dbfa18
|
@ -75,8 +75,11 @@ class SpecialOATH extends UnlistedSpecialPage {
|
|||
'default' => 'validate',
|
||||
'name' => 'action',
|
||||
);
|
||||
$form = new HTMLForm( $info, 'oathauth-verify' );
|
||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
||||
$form = new HTMLForm(
|
||||
$info,
|
||||
$this->getContext(),
|
||||
'oathauth-verify'
|
||||
);
|
||||
$form->setSubmitID( 'oathauth-validate-submit' );
|
||||
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
||||
$form->show();
|
||||
|
@ -141,8 +144,11 @@ class SpecialOATH extends UnlistedSpecialPage {
|
|||
'default' => 'validate',
|
||||
'name' => 'action',
|
||||
);
|
||||
$form = new HTMLForm( $info, 'oathauth-verify' );
|
||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
||||
$form = new HTMLForm(
|
||||
$info,
|
||||
$this->getContext(),
|
||||
'oathauth-verify'
|
||||
);
|
||||
$form->setSubmitID( 'oathauth-validate-submit' );
|
||||
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
||||
$form->show();
|
||||
|
@ -173,8 +179,11 @@ class SpecialOATH extends UnlistedSpecialPage {
|
|||
'default' => 'reset',
|
||||
'name' => 'action',
|
||||
);
|
||||
$form = new HTMLForm( $info, 'oathauth-reset' );
|
||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
||||
$form = new HTMLForm(
|
||||
$info,
|
||||
$this->getContext(),
|
||||
'oathauth-reset'
|
||||
);
|
||||
$form->setSubmitID( 'oauth-form-disablesubmit' );
|
||||
$form->setSubmitCallback( array( $this, 'tryResetSubmit' ) );
|
||||
$form->show();
|
||||
|
@ -204,8 +213,11 @@ class SpecialOATH extends UnlistedSpecialPage {
|
|||
'default' => 'disable',
|
||||
'name' => 'action',
|
||||
);
|
||||
$form = new HTMLForm( $info, 'oathauth-disable' );
|
||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
||||
$form = new HTMLForm(
|
||||
$info,
|
||||
$this->getContext(),
|
||||
'oathauth-disable'
|
||||
);
|
||||
$form->setSubmitID( 'oauth-form-disablesubmit' );
|
||||
$form->setSubmitCallback( array( $this, 'tryDisableSubmit' ) );
|
||||
$form->show();
|
||||
|
@ -342,7 +354,6 @@ class SpecialOATH extends UnlistedSpecialPage {
|
|||
$myRequest = new DerivativeRequest( $this->getRequest(), array( 'action' => 'validate', 'mode' => 'reset', 'token' => '', 'returnto' => $formData['returnto'] ), false );
|
||||
$myContext->setRequest( $myRequest );
|
||||
$form = new HTMLForm( $info, $myContext );
|
||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
||||
$form->setSubmitID( 'oathauth-validate-submit' );
|
||||
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
||||
$form->show();
|
||||
|
|
Loading…
Reference in a new issue