Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396082 )
Change subject: Cookie must be set on server side ...................................................................... Cookie must be set on server side Setting the cookie on the client doesn't work. It needs to be stored on the server. Submitting the form without an async save also avoids the problem of having to refresh the page. Bug: T169369 Change-Id: I4028a0d37f51d8f6c6e64d49b52a76781b38676c --- M includes/specials/SpecialMobileOptions.php M resources/mobile.special.mobileoptions.scripts/mobileoptions.js 2 files changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/82/396082/1 diff --git a/includes/specials/SpecialMobileOptions.php b/includes/specials/SpecialMobileOptions.php index 62dc4fe..a91b55f 100644 --- a/includes/specials/SpecialMobileOptions.php +++ b/includes/specials/SpecialMobileOptions.php @@ -132,8 +132,6 @@ $fields[] = new OOUI\HiddenInputWidget( [ 'name' => 'token', 'value' => $user->getEditToken() ] ); } - $fields[] = new OOUI\HiddenInputWidget( [ 'name' => 'returnto', - 'value' => $this->returnToTitle->getFullText() ] ); // @codingStandardsIgnoreEnd $form->appendContent( diff --git a/resources/mobile.special.mobileoptions.scripts/mobileoptions.js b/resources/mobile.special.mobileoptions.scripts/mobileoptions.js index 228b142..e0c12f7 100644 --- a/resources/mobile.special.mobileoptions.scripts/mobileoptions.js +++ b/resources/mobile.special.mobileoptions.scripts/mobileoptions.js @@ -128,9 +128,8 @@ enableToggle = OO.ui.infuse( $( '#enable-beta-toggle' ) ), $form = $( '#mobile-options' ); - // The beta toggle will now work without clicking submit enableToggle.on( 'change', function () { - cookie( 'optin', this.isSelected() ? 'beta' : '' ); + $form.submit(); notify(); }.bind( enableToggle ) ); -- To view, visit https://gerrit.wikimedia.org/r/396082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4028a0d37f51d8f6c6e64d49b52a76781b38676c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: specialpages Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits