1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Don't show the DarkConsole preference if is false in the config

Summary: D4549 added a preference option for DarkConsole, but we should only show it if darkconsole.enabled is true. In most installs DarkConsole is not enabled, so now we check before showing it in the display settings so it's not confusing for users.

Test Plan: tested on localhost, when we change the darkconsole.enabled value in ENV the option is not displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: irinav, aran, Korvin

Differential Revision: https://secure.phabricator.com/D5069
This commit is contained in:
Andrei Antonescu 2013-02-22 06:16:48 -08:00 committed by epriestley
parent 222b25f3a2
commit 83e4e1ce7f

View file

@ -133,8 +133,10 @@ EXAMPLE;
->setValue($pref_monospaced_textareas_value)
->addButton('enabled', 'Enabled',
'Show all textareas using the monospaced font defined above.')
->addButton('disabled', 'Disabled', null))
->appendChild(
->addButton('disabled', 'Disabled', null));
if (PhabricatorEnv::getEnvConfig('darkconsole.enabled')) {
$form->appendChild(
id(new AphrontFormRadioButtonControl())
->setLabel('Dark Console')
->setName($pref_dark_console)
@ -142,11 +144,12 @@ EXAMPLE;
$pref_dark_console_value : 0)
->addButton(1, 'Enabled',
'Enabling and using the built-in debugging console.')
->addButton(0, 'Disabled', null))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue('Save Preferences'));
->addButton(0, 'Disabled', null));
}
$form->appendChild(
id(new AphrontFormSubmitControl())
->setValue('Save Preferences'));
$panel = new AphrontPanelView();
$panel->setHeader('Display Preferences');