Page MenuHomePhabricator

Disable Special:Preferences save button unless settings have been changed
Closed, ResolvedPublic

Description

To address the issue of "knowing if it saved" I'd recommend disabling the save button if no changes have been made since last save. I don't think this is absolute needed but it's another reminder that there is nothing you need to do.

Event Timeline

Sn1per created this task.Feb 13 2015, 4:00 PM
Sn1per claimed this task.
Sn1per raised the priority of this task from to Low.
Sn1per updated the task description. (Show Details)
Sn1per added subscribers: Sn1per, Jaredzimmerman-WMF.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 13 2015, 4:00 PM
gerritbot added a subscriber: gerritbot.

Change 190569 had a related patch set uploaded (by Sn1per):
Disable Preferences save button before setting change

https://gerrit.wikimedia.org/r/190569

Patch-For-Review

Change 190569 merged by jenkins-bot:
Disable Preferences save button before setting change

https://gerrit.wikimedia.org/r/190569

Sn1per closed this task as Resolved.Jun 14 2015, 8:58 PM
Sn1per added a subscriber: TheDJ.

@TheDJ Thanks :)

I went to a foreign wiki I have never visited before and as the first step after my account was autocreated there, I went to [[Special:Preferences]] to change the UI language to something I can cope with. With the JS still loading and the page displayed as one big list instead of the tabbed interface, I changed the language; then the JS finished loading and the display switched to a nice tabbed interface… with the Save button disabled, since I modified the setting prior to the script run. So I needed to change something there and back again in order to be able to save the language setting.

Just saying.

Maybe the original form data could be saved in the PHP phase and a check (similar to the "you didn't save your preferences" check) could be performed to decide whether or not to disable the save button?

Sn1per reopened this task as Open.Aug 22 2015, 3:57 PM

See above

TheDJ reopened this task as Open.Nov 9 2015, 7:30 PM

Reverted in https://gerrit.wikimedia.org/r/#/c/252021

We should create an alternative solution, since this approach cannot work with async loading of JS. A hint:

you'd have to compare .value to .defaultValue for all inputs on the page on load

TheDJ set Security to None.

Change 255712 had a related patch set uploaded (by Sn1per):
Disable Preferences save button if settings have not changed

https://gerrit.wikimedia.org/r/255712

Change 255712 merged by jenkins-bot:
Disable Preferences save button if settings have not changed

https://gerrit.wikimedia.org/r/255712

TheDJ closed this task as Resolved.Dec 26 2015, 2:23 PM
TheDJ removed a project: Patch-For-Review.