Page MenuHomePhabricator

D20492.diff
No OneTemporary

D20492.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2419,6 +2419,7 @@
'PhabricatorAuthTryFactorAction' => 'applications/auth/action/PhabricatorAuthTryFactorAction.php',
'PhabricatorAuthUnlinkController' => 'applications/auth/controller/PhabricatorAuthUnlinkController.php',
'PhabricatorAuthValidateController' => 'applications/auth/controller/PhabricatorAuthValidateController.php',
+ 'PhabricatorAuthWaitForApprovalMessageType' => 'applications/auth/message/PhabricatorAuthWaitForApprovalMessageType.php',
'PhabricatorAuthWelcomeMailMessageType' => 'applications/auth/message/PhabricatorAuthWelcomeMailMessageType.php',
'PhabricatorAuthenticationConfigOptions' => 'applications/config/option/PhabricatorAuthenticationConfigOptions.php',
'PhabricatorAutoEventListener' => 'infrastructure/events/PhabricatorAutoEventListener.php',
@@ -8357,6 +8358,7 @@
'PhabricatorAuthTryFactorAction' => 'PhabricatorSystemAction',
'PhabricatorAuthUnlinkController' => 'PhabricatorAuthController',
'PhabricatorAuthValidateController' => 'PhabricatorAuthController',
+ 'PhabricatorAuthWaitForApprovalMessageType' => 'PhabricatorAuthMessageType',
'PhabricatorAuthWelcomeMailMessageType' => 'PhabricatorAuthMessageType',
'PhabricatorAuthenticationConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorAutoEventListener' => 'PhabricatorEventListener',
diff --git a/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php b/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
--- a/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
+++ b/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
@@ -18,20 +18,51 @@
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
+ $instructions = $this->newCustomWaitForApprovalInstructions();
+
$wait_for_approval = pht(
"Your account has been created, but needs to be approved by an ".
"administrator. You'll receive an email once your account is approved.");
- $dialog = id(new AphrontDialogView())
- ->setUser($viewer)
+ $dialog = $this->newDialog()
->setTitle(pht('Wait for Approval'))
->appendChild($wait_for_approval)
->addCancelButton('/', pht('Wait Patiently'));
+ $crumbs = $this->buildApplicationCrumbs()
+ ->addTextCrumb(pht('Wait For Approval'))
+ ->setBorder(true);
+
return $this->newPage()
->setTitle(pht('Wait For Approval'))
- ->appendChild($dialog);
+ ->setCrumbs($crumbs)
+ ->appendChild(
+ array(
+ $instructions,
+ $dialog,
+ ));
+
+ }
+
+ private function newCustomWaitForApprovalInstructions() {
+ $viewer = $this->getViewer();
+
+ $text = PhabricatorAuthMessage::loadMessageText(
+ $viewer,
+ PhabricatorAuthWaitForApprovalMessageType::MESSAGEKEY);
+
+ if (!strlen($text)) {
+ return null;
+ }
+
+ $remarkup_view = new PHUIRemarkupView($viewer, $text);
+ return phutil_tag(
+ 'div',
+ array(
+ 'class' => 'auth-custom-message',
+ ),
+ $remarkup_view);
}
}
diff --git a/src/applications/auth/message/PhabricatorAuthWaitForApprovalMessageType.php b/src/applications/auth/message/PhabricatorAuthWaitForApprovalMessageType.php
new file mode 100644
--- /dev/null
+++ b/src/applications/auth/message/PhabricatorAuthWaitForApprovalMessageType.php
@@ -0,0 +1,19 @@
+<?php
+
+final class PhabricatorAuthWaitForApprovalMessageType
+ extends PhabricatorAuthMessageType {
+
+ const MESSAGEKEY = 'auth.wait-for-approval';
+
+ public function getDisplayName() {
+ return pht('Wait For Approval Instructions');
+ }
+
+ public function getShortDescription() {
+ return pht(
+ 'Instructions on the "Wait For Approval" screen, shown to users who '.
+ 'have registered an account that has not yet been approved by an '.
+ 'administrator.');
+ }
+
+}

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 25, 10:49 AM (16 h, 54 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7199447
Default Alt Text
D20492.diff (4 KB)

Event Timeline