Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom form types for user, system and measurable settings #10992

Merged
merged 3 commits into from Dec 12, 2016

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Dec 11, 2016

This PR allows us to show custom field types in User-, System- and Measurable-Settings. No longer limited to text, textarea, select, ...

Defining a new field is as easy as eg https://github.com/piwik/piwik/blob/3.x-dev/plugins/CorePluginsAdmin/angularjs/form-field/field-text.html

This is really useful since we were often not able to define settings eg as System Settings because one setting was a bit more complicated and could not be visualized with our default UI settings control but now we can wrap pretty much anything with it.

By default the values for it will be stored along a site, measurable, plugin settings but with just a very few lines and by implementing it is super easy to store settings for a field in a different backend see this interface:
https://github.com/piwik/piwik/blob/3.x-dev/core/Settings/Storage/Backend/BackendInterface.php

Say you have a custom setting for trusted hosts or something else and want to keep the existing place for storing that information then you just wrap the calls to save that method in such an interface.

Needs to be documented eventually.

@tsteur tsteur added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review labels Dec 11, 2016
@tsteur tsteur added this to the 3.0.0-rc milestone Dec 11, 2016
@tsteur tsteur merged commit 5e83fd4 into 3.x-dev Dec 12, 2016
@tsteur tsteur deleted the customsettingtemplates branch December 12, 2016 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant