From 11b3c6a4d55c6a046d7c19724af2e5161126f219 Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 8 Jun 2012 19:42:05 -0700 Subject: [PATCH] Display e-mail preferences even if user can't change them Test Plan: Displayed e-mail preferences with and without multiplexing. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2699 --- ...EmailPreferenceSettingsPanelController.php | 68 +++++++++++-------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/src/applications/people/controller/settings/panels/PhabricatorUserEmailPreferenceSettingsPanelController.php b/src/applications/people/controller/settings/panels/PhabricatorUserEmailPreferenceSettingsPanelController.php index 0052f39e92..f411636eb7 100644 --- a/src/applications/people/controller/settings/panels/PhabricatorUserEmailPreferenceSettingsPanelController.php +++ b/src/applications/people/controller/settings/panels/PhabricatorUserEmailPreferenceSettingsPanelController.php @@ -123,37 +123,47 @@ final class PhabricatorUserEmailPreferenceSettingsPanelController ->setValue($preferences->getPreference($pref_no_self_mail, 0))); if (PhabricatorMetaMTAMail::shouldMultiplexAllMail()) { - $form - ->appendChild( - id(new AphrontFormSelectControl()) - ->setLabel('Add "Re:" Prefix') - ->setName($pref_re_prefix) - ->setCaption( - 'Enable this option to fix threading in Mail.app on OS X Lion, '. - 'or if you like "Re:" in your email subjects.') - ->setOptions( - array( - 'default' => 'Use Server Default ('.$re_prefix_default.')', - 'true' => 'Enable "Re:" prefix', - 'false' => 'Disable "Re:" prefix', - )) - ->setValue($re_prefix_value)) - ->appendChild( - id(new AphrontFormSelectControl()) - ->setLabel('Vary Subjects') - ->setName($pref_vary) - ->setCaption( - 'This option adds more information to email subjects, but may '. - 'break threading in some clients.') - ->setOptions( - array( - 'default' => 'Use Server Default ('.$vary_default.')', - 'true' => 'Vary Subjects', - 'false' => 'Do Not Vary Subjects', - )) - ->setValue($vary_value)); + $re_control = id(new AphrontFormSelectControl()) + ->setName($pref_re_prefix) + ->setOptions( + array( + 'default' => 'Use Server Default ('.$re_prefix_default.')', + 'true' => 'Enable "Re:" prefix', + 'false' => 'Disable "Re:" prefix', + )) + ->setValue($re_prefix_value); + + $vary_control = id(new AphrontFormSelectControl()) + ->setName($pref_vary) + ->setOptions( + array( + 'default' => 'Use Server Default ('.$vary_default.')', + 'true' => 'Vary Subjects', + 'false' => 'Do Not Vary Subjects', + )) + ->setValue($vary_value); + } else { + $re_control = id(new AphrontFormStaticControl()) + ->setValue('Server Default ('.$re_prefix_default.')'); + + $vary_control = id(new AphrontFormStaticControl()) + ->setValue('Server Default ('.$vary_default.')'); } + $form + ->appendChild( + $re_control + ->setLabel('Add "Re:" Prefix') + ->setCaption( + 'Enable this option to fix threading in Mail.app on OS X Lion, '. + 'or if you like "Re:" in your email subjects.')) + ->appendChild( + $vary_control + ->setLabel('Vary Subjects') + ->setCaption( + 'This option adds more information to email subjects, but may '. + 'break threading in some clients.')); + $form ->appendChild( '
'.