Page MenuHomePhabricator

Preferences Form Customization
Closed, ResolvedPublic

Description

class PreferencesTemplate extends QuickTemplate

As Brion said in a different bug, the PreferencesForm class needs to be written where it is more customizable by hooks, etc. I decided that the current structure of the Login and User Creation form should do good for the Preferences Form, and I wrote a basic class called "PreferencesTemplate" (extending QuickTemplate). The class makes the form customizable by creating a dynamic array with each section of the preferences form in different keys, and then passing that array to the hooks. There are admittedly a few bugs, but I figured this was a good start in place of the current situation. Hope everybody likes it.


Version: unspecified
Severity: enhancement

attachment PreferencesTemplate.php ignored as obsolete

Details

Reference
bz15235

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:18 PM
bzimport set Reference to bz15235.
bzimport added a subscriber: Unknown Object (MLST).

Comment on attachment 5194
class PreferencesTemplate extends QuickTemplate

Marked attachment obsolete. Please provice a unified diff as patch, never complete files.

Created attachment 5195
Unified Diff of class.

attachment Preferences.diff ignored as obsolete

Created attachment 5217
Improved - Contains updated extra inputs function and now has a custom set() function to improve security.

Attached:

How would this integrate with code? Does SpecialPreferences just call the template in its execute() method, or what? By itself it does nothing.

It cannot do anything alone. You can close this bug if you want. I just figured I would draft something should anybody decide to take action on this (I do not have nearly enough time). The execute() function needs to be rewritten, and that's about it.