Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-05-29 04:55:47 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-05-29 04:55:47 +0400
commitbb4d352c011cec2f6b7e46f366a03ae564e92012 (patch)
tree5446534153d1f6f2e66a92fddeb7a9e8071aa85d /plugins
parent82da315ea28b6ac1b94f3bc683bc0c8f29756fce (diff)
refs #5212 do not display the default value in case we handle radio fields
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreAdminHome/templates/pluginSettings.twig2
-rw-r--r--plugins/LeftMenu/API.php2
-rw-r--r--plugins/LeftMenu/Settings.php3
3 files changed, 4 insertions, 3 deletions
diff --git a/plugins/CoreAdminHome/templates/pluginSettings.twig b/plugins/CoreAdminHome/templates/pluginSettings.twig
index 5c817d11f7..1a620957f4 100644
--- a/plugins/CoreAdminHome/templates/pluginSettings.twig
+++ b/plugins/CoreAdminHome/templates/pluginSettings.twig
@@ -130,7 +130,7 @@
{% endif %}
- {% if setting.defaultValue and setting.uiControlType != 'checkbox' %}
+ {% if setting.defaultValue and setting.uiControlType != 'checkbox' and setting.uiControlType != 'radio' %}
<br/>
<span class='form-description'>
{{ 'General_Default'|translate }}
diff --git a/plugins/LeftMenu/API.php b/plugins/LeftMenu/API.php
index c7313a37c7..0b46d57077 100644
--- a/plugins/LeftMenu/API.php
+++ b/plugins/LeftMenu/API.php
@@ -32,7 +32,7 @@ class API extends \Piwik\Plugin\API
$user = $settings->userEnabled->getValue();
- if (empty($user) || $user === 'default') {
+ if (empty($user) || $user === 'system') {
return $default;
}
diff --git a/plugins/LeftMenu/Settings.php b/plugins/LeftMenu/Settings.php
index 6d33611b92..da14c26d5c 100644
--- a/plugins/LeftMenu/Settings.php
+++ b/plugins/LeftMenu/Settings.php
@@ -48,8 +48,9 @@ class Settings extends \Piwik\Plugin\Settings
$this->userEnabled = new UserSetting('userEnabled', 'Enable left reporting menu');
$this->userEnabled->type = static::TYPE_STRING;
$this->userEnabled->uiControlType = static::CONTROL_RADIO;
- $this->userEnabled->availableValues = array('default' => 'System Default', 'yes' => 'Yes', 'no' => 'No');
+ $this->userEnabled->availableValues = array('system' => 'System Default', 'yes' => 'Yes', 'no' => 'No');
$this->userEnabled->inlineHelp = 'This will enable or disable the left menu only for you and not affect any other users. A Super User can change the default for all users.';
+ $this->userEnabled->defaultValue = 'system';
$this->addSetting($this->userEnabled);
}