Page MenuHomePhabricator

Install new version of FormWizard on enwiki
Closed, ResolvedPublic

Description

On en:MediaWiki:Gadgets-definition, replace the following line...

* formWizard[ResourceLoader|dependencies=mediawiki.api,mediawiki.cookie,mediawiki.ui,mediawiki.user,jquery.chosen,jquery.ui.dialog]|formWizard.js|formWizard.css

...with the following TWO lines...

* formWizard[ResourceLoader]|formWizard.js
* formWizard-core[ResourceLoader|dependencies=mediawiki.api,mediawiki.cookie,mediawiki.ui,mediawiki.user,jquery.chosen,jquery.ui.dialog]|formWizard-core.js|formWizard.css

Make sure there are no spaces before the asterisks.

Make sure you have the co-op gadget turned on in your prefs. Use this link to refresh the Co-op page: https://en.wikipedia.org/wiki/Wikipedia:Co-op?action=purge Then click the button and try to create a new test profile. Did it work?

Event Timeline

Capt_Swing assigned this task to I_JethroBT.
Capt_Swing raised the priority of this task from to High.
Capt_Swing updated the task description. (Show Details)
Capt_Swing added a project: Co-op.

I've made the appropriate changes to the .js pages and the Gadgets-definition pages. I also had to restore the "Find a mentor" button to The Co-op front page, as it was commented out ebfore. The gadget is enabled in my preferences.

Unfortunately, the button does not appear to be functional and does not produce a FormWizard prompt. Does anything with the code for the button need to change? Here it is currently:

<div style="margin:20px auto; width:240px; background: #A0D468;padding: 10px 20px;color: #fff;display: block;font-family: 'glober', 'Open sans', sans-serif;font-size: 15px;width: 200px;text-align: center;text-decoration:none;" class='wp-formsGadget mw-ui-button' data-mode='create' data-type='Learner'>Find a mentor</div>

I'm looking into this issue this morning, @I_JethroBT. Will follow up soon. - J

Good news--it works! I think your browser may have needed a little time to refresh the page.

Two more changes are necessary before we turn it on by default (which Edokter and Kaldari have now signed off on).

First copy this code on testwiki to --> https://en.wikipedia.org/wiki/MediaWiki:Gadget-formWizard.js (Jeph made a small change this morning so that the Wizard will load anywhere in the Wikipedia namespace, not just in the Co-op)

Then en:MediaWiki:Gadgets-definition, replace the following two lines...

* formWizard[ResourceLoader]|formWizard.js
* formWizard-core[ResourceLoader|dependencies=mediawiki.api,mediawiki.cookie,mediawiki.ui,mediawiki.user,jquery.chosen,jquery.ui.dialog]|formWizard-core.js|formWizard.css

with these:

* formWizard[ResourceLoader|default|rights=minoredit]|formWizard.js
* formWizard-core[ResourceLoader|hidden|rights=hidden|dependencies=mediawiki.api,mediawiki.cookie,mediawiki.ui,mediawiki.user,jquery.chosen,jquery.ui.dialog]|formWizard-core.js|formWizard.css

This should set the gadget up by default for logged in editors, AND hide the second bullet point for viewers of MediaWiki:Gadgets-definition, which is what people seem to do when their gadget involves two different .js scripts.

@Capt_Swing Yeah, I think a browser issue was the case. The two MediaWiki pages have been updated.

I'm still seeing the second bullet point as checkbox for a gadget under Preferences:

<gadget-formWizard-core>

@I_JethroBT yeah I'm still seeing it too. But the gadget works, huzzah! I posted to the proposal thread to let Edokter and Kaldari know about the change. I also asked them if they knew how to correctly hide the secondary checkbox. Let's keep an eye on it.

Capt_Swing updated the task description. (Show Details)
Capt_Swing set Security to None.