mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 09:20:58 +01: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:
parent
222b25f3a2
commit
83e4e1ce7f
1 changed files with 9 additions and 6 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue