Reasonable pht pass at auth.
Summary: Spent some time going through auth stuff for pht's. Test Plan: Tested logging in, logging out, reseting password, using Github, creating a new account. I couldn't quite test everything so will double read the diff when I submit it. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4671
This commit is contained in:
@@ -42,11 +42,12 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController {
|
||||
$existing_ldap) {
|
||||
$dialog = new AphrontDialogView();
|
||||
$dialog->setUser($current_user);
|
||||
$dialog->setTitle('Already Linked to Another Account');
|
||||
$dialog->setTitle(pht('Already Linked to Another Account'));
|
||||
$dialog->appendChild(
|
||||
'<p>The LDAP account you just authorized is already linked to '.
|
||||
'another Phabricator account. Before you can link it to a '.
|
||||
'different LDAP account, you must unlink the old account.</p>'
|
||||
'<p>'.pht('The LDAP account you just authorized is already '.
|
||||
'linked toanother Phabricator account. Before you can link it '.
|
||||
'to a different LDAP account, you must unlink the old '.
|
||||
'account.').'</p>'
|
||||
);
|
||||
$dialog->addCancelButton('/settings/panel/ldap/');
|
||||
|
||||
@@ -60,12 +61,14 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController {
|
||||
if (!$request->isDialogFormPost()) {
|
||||
$dialog = new AphrontDialogView();
|
||||
$dialog->setUser($current_user);
|
||||
$dialog->setTitle('Link LDAP Account');
|
||||
$dialog->setTitle(pht('Link LDAP Account'));
|
||||
$dialog->appendChild(
|
||||
'<p>Link your LDAP account to your Phabricator account?</p>');
|
||||
'<p>'.
|
||||
pht('Link your LDAP account to your Phabricator account?').
|
||||
'</p>');
|
||||
$dialog->addHiddenInput('username', $request->getStr('username'));
|
||||
$dialog->addHiddenInput('password', $request->getStr('password'));
|
||||
$dialog->addSubmitButton('Link Accounts');
|
||||
$dialog->addSubmitButton(pht('Link Accounts'));
|
||||
$dialog->addCancelButton('/settings/panel/ldap/');
|
||||
|
||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||
@@ -116,27 +119,27 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController {
|
||||
->setAction('/ldap/login/')
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('LDAP username')
|
||||
->setLabel(pht('LDAP username'))
|
||||
->setName('username')
|
||||
->setValue($ldap_username))
|
||||
->appendChild(
|
||||
id(new AphrontFormPasswordControl())
|
||||
->setLabel('Password')
|
||||
->setLabel(pht('Password'))
|
||||
->setName('password'));
|
||||
|
||||
$ldap_form
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Login'));
|
||||
->setValue(pht('Login')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
|
||||
$panel->appendChild('<h1>LDAP login</h1>');
|
||||
$panel->appendChild('<h1>'.pht('LDAP login').'</h1>');
|
||||
$panel->appendChild($ldap_form);
|
||||
|
||||
if (isset($errors) && count($errors) > 0) {
|
||||
$error_view = new AphrontErrorView();
|
||||
$error_view->setTitle('Login Failed');
|
||||
$error_view->setTitle(pht('Login Failed'));
|
||||
$error_view->setErrors($errors);
|
||||
}
|
||||
|
||||
@@ -146,7 +149,7 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController {
|
||||
$panel,
|
||||
),
|
||||
array(
|
||||
'title' => 'Login',
|
||||
'title' => pht('Login'),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user