Skip to content
Extraits de code Groupes Projets
Valider bb4d352c rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

refs #5212 do not display the default value in case we handle radio fields

parent 82da315e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
{% endif %} {% endif %}
{% if setting.defaultValue and setting.uiControlType != 'checkbox' %} {% if setting.defaultValue and setting.uiControlType != 'checkbox' and setting.uiControlType != 'radio' %}
<br/> <br/>
<span class='form-description'> <span class='form-description'>
{{ 'General_Default'|translate }} {{ 'General_Default'|translate }}
......
...@@ -32,7 +32,7 @@ class API extends \Piwik\Plugin\API ...@@ -32,7 +32,7 @@ class API extends \Piwik\Plugin\API
$user = $settings->userEnabled->getValue(); $user = $settings->userEnabled->getValue();
if (empty($user) || $user === 'default') { if (empty($user) || $user === 'system') {
return $default; return $default;
} }
......
...@@ -48,8 +48,9 @@ class Settings extends \Piwik\Plugin\Settings ...@@ -48,8 +48,9 @@ class Settings extends \Piwik\Plugin\Settings
$this->userEnabled = new UserSetting('userEnabled', 'Enable left reporting menu'); $this->userEnabled = new UserSetting('userEnabled', 'Enable left reporting menu');
$this->userEnabled->type = static::TYPE_STRING; $this->userEnabled->type = static::TYPE_STRING;
$this->userEnabled->uiControlType = static::CONTROL_RADIO; $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->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); $this->addSetting($this->userEnabled);
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter