Provide a configuration flag to disable silliness in the UI

Summary: See comments. A few installs have remarked that their organizations
would prefer buttons labled "Submit" to buttons labeled "Clowncopterize".

Test Plan:
  - In "serious" mode, verified Differential and Maniphest have serious strings,
tasks can not be closed out of spite, and reset/welcome emails are extremely
serious.
  - In unserious mode, verified Differential and Maniphest have normal strings,
tasks can be closed out of spite, and reset/welcome emails are silly.
  - This does not disable the "fax these changes" message in Arcanist (no
reasonable way for it to read the config value) or the rainbow syntax
highlighter (already removable though configuration).

Reviewers: moskov, jungejason, nh, tuomaspelkonen, aran

Reviewed By: moskov

CC: aran, moskov

Differential Revision: 1081
This commit is contained in:
epriestley
2011-11-04 15:16:34 -07:00
parent 4cdfc6d1cb
commit fbfb263cd9
5 changed files with 43 additions and 5 deletions

View File

@@ -33,6 +33,8 @@ class PhabricatorEmailLoginController extends PhabricatorAuthController {
$e_captcha = true;
$errors = array();
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
if ($request->isFormPost()) {
$e_email = null;
$e_captcha = 'Again';
@@ -65,7 +67,15 @@ class PhabricatorEmailLoginController extends PhabricatorAuthController {
if (!$errors) {
$uri = $target_user->getEmailLoginURI();
$body = <<<EOBODY
if ($is_serious) {
$body = <<<EOBODY
You can use this link to reset your Phabricator password:
{$uri}
EOBODY;
} else {
$body = <<<EOBODY
Condolences on forgetting your password. You can use this link to reset it:
{$uri}
@@ -78,6 +88,7 @@ Best Wishes,
Phabricator
EOBODY;
}
$mail = new PhabricatorMetaMTAMail();
$mail->setSubject('[Phabricator] Password Reset');