mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Respect "can edit username" in registration UI
Summary: Fixes T3741. The flag is respected in terms of actually creating the account, but the UI is a bit unclear. This can never occur naturally, but installs can register an event which locks it. Test Plan: Artificially locked it, verified I got more reasonable UI; {F81282} Reviewers: btrahan, datr Reviewed By: datr CC: aran Maniphest Tasks: T3741 Differential Revision: https://secure.phabricator.com/D7577
This commit is contained in:
parent
c0e1a63a63
commit
fb6e38548b
1 changed files with 9 additions and 2 deletions
|
@ -326,13 +326,20 @@ final class PhabricatorAuthRegisterController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$form
|
if ($can_edit_username) {
|
||||||
->appendChild(
|
$form->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel(pht('Phabricator Username'))
|
->setLabel(pht('Phabricator Username'))
|
||||||
->setName('username')
|
->setName('username')
|
||||||
->setValue($value_username)
|
->setValue($value_username)
|
||||||
->setError($e_username));
|
->setError($e_username));
|
||||||
|
} else {
|
||||||
|
$form->appendChild(
|
||||||
|
id(new AphrontFormMarkupControl())
|
||||||
|
->setLabel(pht('Phabricator Username'))
|
||||||
|
->setValue($value_username)
|
||||||
|
->setError($e_username));
|
||||||
|
}
|
||||||
|
|
||||||
if ($must_set_password) {
|
if ($must_set_password) {
|
||||||
$form->appendChild(
|
$form->appendChild(
|
||||||
|
|
Loading…
Reference in a new issue