Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorRecaptchaConfigOptions.php
| <?php | <?php | ||||
| final class PhabricatorRecaptchaConfigOptions | final class PhabricatorRecaptchaConfigOptions | ||||
| extends PhabricatorApplicationConfigOptions { | extends PhabricatorApplicationConfigOptions { | ||||
| public function getName() { | public function getName() { | ||||
| return pht("Integration with Recaptcha"); | return pht('Integration with Recaptcha'); | ||||
| } | } | ||||
| public function getDescription() { | public function getDescription() { | ||||
| return pht("Configure Recaptcha captchas."); | return pht('Configure Recaptcha captchas.'); | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| return array( | return array( | ||||
| $this->newOption('recaptcha.enabled', 'bool', false) | $this->newOption('recaptcha.enabled', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Enable Recaptcha"), | pht('Enable Recaptcha'), | ||||
| pht("Disable Recaptcha"), | pht('Disable Recaptcha'), | ||||
| )) | )) | ||||
| ->setSummary(pht('Enable captchas with Recaptcha.')) | ->setSummary(pht('Enable captchas with Recaptcha.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "Enable recaptcha to require users solve captchas after a few ". | 'Enable recaptcha to require users solve captchas after a few '. | ||||
| "failed login attempts. This hinders brute-force attacks against ". | 'failed login attempts. This hinders brute-force attacks against '. | ||||
| "user passwords. For more information, see http://recaptcha.net/")), | 'user passwords. For more information, see http://recaptcha.net/')), | ||||
| $this->newOption('recaptcha.public-key', 'string', null) | $this->newOption('recaptcha.public-key', 'string', null) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Recaptcha public key, obtained by signing up for Recaptcha.')), | pht('Recaptcha public key, obtained by signing up for Recaptcha.')), | ||||
| $this->newOption('recaptcha.private-key', 'string', null) | $this->newOption('recaptcha.private-key', 'string', null) | ||||
| ->setMasked(true) | ->setMasked(true) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Recaptcha private key, obtained by signing up for Recaptcha.')), | pht('Recaptcha private key, obtained by signing up for Recaptcha.')), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||