mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-28 02:00:06 +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',
|
'default' => 'validate',
|
||||||
'name' => 'action',
|
'name' => 'action',
|
||||||
);
|
);
|
||||||
$form = new HTMLForm( $info, 'oathauth-verify' );
|
$form = new HTMLForm(
|
||||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
$info,
|
||||||
|
$this->getContext(),
|
||||||
|
'oathauth-verify'
|
||||||
|
);
|
||||||
$form->setSubmitID( 'oathauth-validate-submit' );
|
$form->setSubmitID( 'oathauth-validate-submit' );
|
||||||
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
||||||
$form->show();
|
$form->show();
|
||||||
|
@ -141,8 +144,11 @@ class SpecialOATH extends UnlistedSpecialPage {
|
||||||
'default' => 'validate',
|
'default' => 'validate',
|
||||||
'name' => 'action',
|
'name' => 'action',
|
||||||
);
|
);
|
||||||
$form = new HTMLForm( $info, 'oathauth-verify' );
|
$form = new HTMLForm(
|
||||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
$info,
|
||||||
|
$this->getContext(),
|
||||||
|
'oathauth-verify'
|
||||||
|
);
|
||||||
$form->setSubmitID( 'oathauth-validate-submit' );
|
$form->setSubmitID( 'oathauth-validate-submit' );
|
||||||
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
||||||
$form->show();
|
$form->show();
|
||||||
|
@ -173,8 +179,11 @@ class SpecialOATH extends UnlistedSpecialPage {
|
||||||
'default' => 'reset',
|
'default' => 'reset',
|
||||||
'name' => 'action',
|
'name' => 'action',
|
||||||
);
|
);
|
||||||
$form = new HTMLForm( $info, 'oathauth-reset' );
|
$form = new HTMLForm(
|
||||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
$info,
|
||||||
|
$this->getContext(),
|
||||||
|
'oathauth-reset'
|
||||||
|
);
|
||||||
$form->setSubmitID( 'oauth-form-disablesubmit' );
|
$form->setSubmitID( 'oauth-form-disablesubmit' );
|
||||||
$form->setSubmitCallback( array( $this, 'tryResetSubmit' ) );
|
$form->setSubmitCallback( array( $this, 'tryResetSubmit' ) );
|
||||||
$form->show();
|
$form->show();
|
||||||
|
@ -204,8 +213,11 @@ class SpecialOATH extends UnlistedSpecialPage {
|
||||||
'default' => 'disable',
|
'default' => 'disable',
|
||||||
'name' => 'action',
|
'name' => 'action',
|
||||||
);
|
);
|
||||||
$form = new HTMLForm( $info, 'oathauth-disable' );
|
$form = new HTMLForm(
|
||||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
$info,
|
||||||
|
$this->getContext(),
|
||||||
|
'oathauth-disable'
|
||||||
|
);
|
||||||
$form->setSubmitID( 'oauth-form-disablesubmit' );
|
$form->setSubmitID( 'oauth-form-disablesubmit' );
|
||||||
$form->setSubmitCallback( array( $this, 'tryDisableSubmit' ) );
|
$form->setSubmitCallback( array( $this, 'tryDisableSubmit' ) );
|
||||||
$form->show();
|
$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 );
|
$myRequest = new DerivativeRequest( $this->getRequest(), array( 'action' => 'validate', 'mode' => 'reset', 'token' => '', 'returnto' => $formData['returnto'] ), false );
|
||||||
$myContext->setRequest( $myRequest );
|
$myContext->setRequest( $myRequest );
|
||||||
$form = new HTMLForm( $info, $myContext );
|
$form = new HTMLForm( $info, $myContext );
|
||||||
$form->setTitle( SpecialPage::getTitleFor( 'OATH' ) );
|
|
||||||
$form->setSubmitID( 'oathauth-validate-submit' );
|
$form->setSubmitID( 'oathauth-validate-submit' );
|
||||||
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
$form->setSubmitCallback( array( $this, 'tryValidateSubmit' ) );
|
||||||
$form->show();
|
$form->show();
|
||||||
|
|
Loading…
Reference in a new issue