mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 19:02:41 +01:00
7fe1a6840e
Summary: Ref T4103. This tackles all the easy stuff. Not yet handled: - Translation, pronoun, timezone: these are weird and stored on the User object instead of in settings. - Conpherence default: actually just missed this one, it's normal. - 1000 dropdowns for email notification preferences (messy, technically). Test Plan: wow look at all these settings {F1670442} Reviewers: chad Reviewed By: chad Maniphest Tasks: T4103 Differential Revision: https://secure.phabricator.com/D15999
36 lines
924 B
PHP
36 lines
924 B
PHP
<?php
|
|
|
|
final class PhabricatorEmailNotificationsSetting
|
|
extends PhabricatorSelectSetting {
|
|
|
|
const SETTINGKEY = 'no-mail';
|
|
|
|
const VALUE_SEND_MAIL = '0';
|
|
const VALUE_NO_MAIL = '1';
|
|
|
|
public function getSettingName() {
|
|
return pht('Email Notifications');
|
|
}
|
|
|
|
protected function getControlInstructions() {
|
|
return pht(
|
|
'If you disable **Email Notifications**, Phabricator will never '.
|
|
'send email to notify you about events. This preference overrides '.
|
|
'all your other settings.'.
|
|
"\n\n".
|
|
"//You will still receive some administrative email, like password ".
|
|
"reset email.//");
|
|
}
|
|
|
|
public function getSettingDefaultValue() {
|
|
return self::VALUE_SEND_MAIL;
|
|
}
|
|
|
|
protected function getSelectOptions() {
|
|
return array(
|
|
self::VALUE_SEND_MAIL => pht('Enable Email Notifications'),
|
|
self::VALUE_NO_MAIL => pht('Disable Email Notifications'),
|
|
);
|
|
}
|
|
|
|
}
|