Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthStartController.php
| Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | foreach ($handlers as $handler) { | ||||
| $header[] = $handler->getAuthLoginHeaderContent(); | $header[] = $handler->getAuthLoginHeaderContent(); | ||||
| } | } | ||||
| $invite_message = null; | $invite_message = null; | ||||
| if ($invite) { | if ($invite) { | ||||
| $invite_message = $this->renderInviteHeader($invite); | $invite_message = $this->renderInviteHeader($invite); | ||||
| } | } | ||||
| $custom_message = $this->newCustomStartMessage(); | |||||
| $crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
| $crumbs->addTextCrumb(pht('Login')); | $crumbs->addTextCrumb(pht('Login')); | ||||
| $crumbs->setBorder(true); | $crumbs->setBorder(true); | ||||
| $title = pht('Login'); | $title = pht('Login'); | ||||
| $view = array( | $view = array( | ||||
| $header, | $header, | ||||
| $invite_message, | $invite_message, | ||||
| $custom_message, | |||||
| $out, | $out, | ||||
| ); | ); | ||||
| return $this->newPage() | return $this->newPage() | ||||
| ->setTitle($title) | ->setTitle($title) | ||||
| ->setCrumbs($crumbs) | ->setCrumbs($crumbs) | ||||
| ->appendChild($view); | ->appendChild($view); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | private function tryAutoLogin(array $providers) { | ||||
| $auto_uri = $provider->getAutoLoginURI($request); | $auto_uri = $provider->getAutoLoginURI($request); | ||||
| return id(new AphrontRedirectResponse()) | return id(new AphrontRedirectResponse()) | ||||
| ->setIsExternal(true) | ->setIsExternal(true) | ||||
| ->setURI($auto_uri); | ->setURI($auto_uri); | ||||
| } | } | ||||
| private function newCustomStartMessage() { | |||||
| $viewer = $this->getViewer(); | |||||
| $text = PhabricatorAuthMessage::loadMessageText( | |||||
| $viewer, | |||||
| PhabricatorAuthLoginMessageType::MESSAGEKEY); | |||||
| if (!strlen($text)) { | |||||
| return null; | |||||
| } | |||||
| $remarkup_view = new PHUIRemarkupView($viewer, $text); | |||||
| return phutil_tag( | |||||
| 'div', | |||||
| array( | |||||
| 'class' => 'auth-custom-message', | |||||
| ), | |||||
| $remarkup_view); | |||||
| } | |||||
| } | } | ||||