AffComm would like to have a custom contact form to handle new user group applications. They would like to have this form available on metawiki before 2015-05-01. @Slaporte has a mockup of the desired form.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | bd808 | T95789 Configure usergroup request form using ContactPage for AffCom | |||
Resolved | Krenair | T96087 ContactPage can't handle label-raw fields during form submission |
Event Timeline
@bd808: Are you intending to assign this to yourself, or should we be handling it with the other config change requests?
Getting the wiki page that I took the mock screen shot from moved to a non-private wiki would be optimal so that the desired messages are cut-n-paste friendly rather than needing to be retyped by a developer. @Slaporte can you be responsible for doing that and then linking the wiki page here on the task?
I added the mockup here: https://www.mediawiki.org/wiki/User:Slaporte_(WMF)/Draft_form
Thanks!
So, here's the issues that I've found so far:
- "Your name", "Your address", and "Subject" are forced by the extension. (Not sure we want "Subject"? Hmm.)
- HTMLForm won't (easily) let us put that text below the logo options, it might have to go in with the label...
- The terms and conditions checkbox will probably have to be squashed over to the right.
We can probably fix or hack around all of these.
Create a new class which inherits from HTMLRadioField to override formatOptions and append the extra text to the end.
Create a new class which inherits from HTMLCheckField returning '' for getInputHTML and parent::getInputHTML( '' ) for getLabel.
Can probably turn those simple array additions into array_merges? Also not sure about the "Email me a copy of my message" box at the bottom right. @Slaporte? Would it be helpful if I showed what I already have?
Hi @Krenair, thanks for working on this!
It's OK to keep "your name" and "your address" options. I would prefer if the subject was pre-filled or not customizable at all. Ideally, the subject would be: "User group request: $name." Is that possible?
- HTMLForm won't (easily) let us put that text below the logo options, it might have to go in with the label...
Does this look good?
- The terms and conditions checkbox will probably have to be squashed over to the right.
This is OK if it looks good. The Terms and Conditions checkbox should be mandatory, too. Is that possible?
We can keep the "email me a copy" option.
Would it be helpful if I showed what I already have?
Yes, I would like to see the working version. Thanks again!
I should warn you the output format is not pretty. It's quite broken, in fact. Looks like I need to file a bug or two against ContactPage
Could probably use more hacks to hide the field and force that subject...
Ignore these parts, see the later comments I made where I had worked out how to workaround the issues. I think it's possible to make the terms and conditions checkbox required.
This is looking good!
Can we add a small consistent margin between each row of inputs and labels, on the top or bottom? I also see that the first few labels (Your name, your email address, subject) are not bold like the rest. Also, can we use the nice styled buttons? I am not sure how consistently they are used in the MW interface.
Change 204203 had a related patch set uploaded (by Alex Monk):
Add ContactPage messages for affcom user group form
Change 204205 had a related patch set uploaded (by Alex Monk):
Add AffCom user group application contact page on meta
This part is fixed in my working version now.
I've uploaded commits with most of the bits and pieces... Just missing some CSS, which is incomplete because I haven't addressed these comments yet:
@Slaporte: The first thing is probably something you can try with CSS when it goes up.
The second thing... We can probably add that in as a hack if you really want it... Might be easier with extra custom CSS.
Anyway here's the CSS I was already working with. It'll need to be put on metawiki somewhere when the config change gets deployed:
#affcom-contact-form .mw-label { text-align: left; } #affcom-contact-form table { padding: 1em; font-size: 1.15em; } #affcom-contact-form tbody > :nth-child(1) .mw-label, #affcom-contact-form tbody > :nth-child(2) .mw-label { font-weight: bold; } #affcom-contact-form tbody > :nth-child(4) { display: none; }
We could do it directly in the extension for all the forms. Should be easy enough since it's using HTMLForm.
In future it's probably a better idea to create the account while logged in... Anyway I made a tiny user page for it and updated the config change commit.
We should try to make sure https://gerrit.wikimedia.org/r/204203 gets approved before 2015-04-22 (i.e. before 1.26wmf3 branching).
After that I think we can deploy https://gerrit.wikimedia.org/r/204205 on 2015-04-28 evening (i.e. after 1.26wmf23 goes to metawiki).
Change 204203 merged by jenkins-bot:
Add ContactPage messages for affcom user group form
Although I'd usually deploy these changes, I've asked @bd808 to step in and make sure it gets done due to the need to start focusing on my exams rather than Wikimedia things.
Change 206424 had a related patch set uploaded (by BryanDavis):
beta: Import $wmfUdp2logDest global in wmfLabsSettings()
Stealing this from @Krenair after he's done all the hard work so I don't forget to do the deploy once 1.26wmf3 is live on metawiki.
Change 204205 merged by jenkins-bot:
Add AffCom user group application contact page on meta
The patch in https://gerrit.wikimedia.org/r/204205 needs the noc symlink fixed. It also needs a guard in EmailUserForm hook to make sure it is dealing with the correct form. Reverted shortly after deploy. Will investigate a fix and try again.
I got a list bounce message from the form too:
Your mail to 'Usergroups' with the subject User group request: just testing the new form (from BDavis (WMF)) Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list
Change 207332 had a related patch set uploaded (by Alex Monk):
Revert "Revert "Add AffCom user group application contact page on meta""
In addition to the issue with the email actually being sent, a user will need to set up the CSS and ensure that the links actually point to valid pages. These aren't sysadmin tasks.
Change 207804 had a related patch set uploaded (by BryanDavis):
More ContactPage messages for affcom user group form
New and improved screenshot with mediawiki.ui styling:
Requires this CSS on the target wiki (metawiki for prod):
body.page-Special_Contact_affcomusergroup .firstHeading { background-color: #2f6fab; color: #fff; padding: .5em; text-align: center; } #contactpage-affcomusergroup { width: inherit; } #contactpage-affcomusergroup .mw-ui-radio label, #contactpage-affcomusergroup > div > :nth-child(1) label, #contactpage-affcomusergroup > div > :nth-child(2) label { font-weight: bold; } #contactpage-affcomusergroup > div > :nth-child(3), #contactpage-affcomusergroup > div > :nth-child(4) { display: none; } #contactpage-affcomusergroup label > ul { list-style: none; padding: 0; margin: 0; }
I'm going to try and come up with a reasonable way to include that CSS via ResourceLoader but if that falls through we can just get the global CSS edited.
Change 207804 merged by jenkins-bot:
More ContactPage messages for affcom user group form
Change 207912 had a related patch set uploaded (by BryanDavis):
Allow loading of ResourceLoader modules
Change 207916 had a related patch set uploaded (by BryanDavis):
Add RL module for [[:meta:Special:Contact/affcomusergroup]]
The patches are now in review that will stick the CSS into the WikimediaMessages extension so that no on-wiki changes are needed to support the pretty contact form. When they are merged I will need to backport the latest ContactPage and WikimediaMessages extensions to 1.26wmf4 which will go live on metawiki on 2015-05-05. At that point we can apply the config changes to setup the form and make it live.
Change 207916 merged by jenkins-bot:
Add RL module for [[:meta:Special:Contact/affcomusergroup]]
Enabling patches are all merged now. Backports of ContactPage and WikimediaMessages extensions to 1.26wmf4 need to be prepared and scheduled for a deploy window next week. This will require a full scap, so it needs a distinct window rather than riding with SWAT.
Change 208689 had a related patch set uploaded (by BryanDavis):
More ContactPage messages for affcom user group form
Change 208690 had a related patch set uploaded (by BryanDavis):
Add RL module for [[:meta:Special:Contact/affcomusergroup]]
Change 208693 had a related patch set uploaded (by BryanDavis):
Allow loading of ResourceLoader modules
Change 208689 merged by jenkins-bot:
More ContactPage messages for affcom user group form
Change 208690 merged by jenkins-bot:
Add RL module for [[:meta:Special:Contact/affcomusergroup]]
Change 208702 had a related patch set uploaded (by BryanDavis):
Update ContactPage and WikimediaMessages for AffCom contact form
Change 208702 merged by jenkins-bot:
Update ContactPage and WikimediaMessages for AffCom contact form
The backport to 1.26wmf4 has been pushed to the WMF production cluster. Tomorrow (2015-05-05) the 1.26wmf4 branch will go live on metawiki. I've scheduled the config patch to create the form there to go out in the evening SWAT window following the version bump.
Change 207332 merged by jenkins-bot:
Add AffCom user group application contact page on meta (take 2)
Contact form is live at https://meta.wikimedia.org/wiki/Special:Contact/affcomusergroup