Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthUnlinkController.php
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | private function renderNotUnlinkableErrorDialog( | ||||
PhabricatorAuthProvider $provider, | PhabricatorAuthProvider $provider, | ||||
$done_uri) { | $done_uri) { | ||||
return $this->newDialog() | return $this->newDialog() | ||||
->setTitle(pht('Permanent Account Link')) | ->setTitle(pht('Permanent Account Link')) | ||||
->appendChild( | ->appendChild( | ||||
pht( | pht( | ||||
'You can not unlink this account because the administrator has '. | 'You can not unlink this account because the administrator has '. | ||||
'configured Phabricator to make links to "%s" accounts permanent.', | 'configured this server to make links to "%s" accounts permanent.', | ||||
$provider->getProviderName())) | $provider->getProviderName())) | ||||
->addCancelButton($done_uri); | ->addCancelButton($done_uri); | ||||
} | } | ||||
private function renderOnlyUsableAccountConfirmDialog( | private function renderOnlyUsableAccountConfirmDialog( | ||||
array $confirmations, | array $confirmations, | ||||
$done_uri) { | $done_uri) { | ||||
Show All 20 Lines | private function renderConfirmDialog( | ||||
$done_uri) { | $done_uri) { | ||||
$confirmations[] = 'unlink'; | $confirmations[] = 'unlink'; | ||||
$provider = $config->getProvider(); | $provider = $config->getProvider(); | ||||
$title = pht('Unlink "%s" Account?', $provider->getProviderName()); | $title = pht('Unlink "%s" Account?', $provider->getProviderName()); | ||||
$body = pht( | $body = pht( | ||||
'You will no longer be able to use your %s account to '. | 'You will no longer be able to use your %s account to '. | ||||
'log in to Phabricator.', | 'log in.', | ||||
$provider->getProviderName()); | $provider->getProviderName()); | ||||
return $this->newDialog() | return $this->newDialog() | ||||
->setTitle($title) | ->setTitle($title) | ||||
->addHiddenInput('confirmations', implode(',', $confirmations)) | ->addHiddenInput('confirmations', implode(',', $confirmations)) | ||||
->appendParagraph($body) | ->appendParagraph($body) | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht( | pht( | ||||
'Note: Unlinking an authentication provider will terminate any '. | 'Note: Unlinking an authentication provider will terminate any '. | ||||
'other active login sessions.')) | 'other active login sessions.')) | ||||
->addSubmitButton(pht('Unlink Account')) | ->addSubmitButton(pht('Unlink Account')) | ||||
->addCancelButton($done_uri); | ->addCancelButton($done_uri); | ||||
} | } | ||||
} | } |