Skip to content

Commit

Permalink
refs #5212 do not display the default value in case we handle radio f…
Browse files Browse the repository at this point in the history
…ields
  • Loading branch information
tsteur committed May 29, 2014
1 parent 82da315 commit bb4d352
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/CoreAdminHome/templates/pluginSettings.twig
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion plugins/LeftMenu/API.php
Expand Up @@ -32,7 +32,7 @@ public function isEnabled()

$user = $settings->userEnabled->getValue();

if (empty($user) || $user === 'default') {
if (empty($user) || $user === 'system') {
return $default;
}

Expand Down
3 changes: 2 additions & 1 deletion plugins/LeftMenu/Settings.php
Expand Up @@ -48,8 +48,9 @@ private function createUserEnabledSetting()
$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);
}
Expand Down

0 comments on commit bb4d352

Please sign in to comment.