mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Don't show an auth provider as enabled if it's still being created
Test Plan: attempted to create a new auth provider; observed that "enabled" ui element does not render. viewed existing auth provider and observed that "enabled" ui element still renders Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin Maniphest Tasks: T12245 Differential Revision: https://secure.phabricator.com/D17337
This commit is contained in:
parent
b71e089669
commit
8dd7b544fe
1 changed files with 12 additions and 10 deletions
|
@ -191,17 +191,19 @@ final class PhabricatorAuthEditController
|
||||||
->setHeader(pht('%s: %s', $title, $provider->getProviderName()))
|
->setHeader(pht('%s: %s', $title, $provider->getProviderName()))
|
||||||
->setHeaderIcon($header_icon);
|
->setHeaderIcon($header_icon);
|
||||||
|
|
||||||
|
if (!$is_new) {
|
||||||
if ($config->getIsEnabled()) {
|
if ($config->getIsEnabled()) {
|
||||||
$status_name = pht('Enabled');
|
$status_name = pht('Enabled');
|
||||||
$status_color = 'green';
|
$status_color = 'green';
|
||||||
$status_icon = 'fa-check';
|
$status_icon = 'fa-check';
|
||||||
$header->setStatus($status_icon, $status_color, $status_name);
|
$header->setStatus($status_icon, $status_color, $status_name);
|
||||||
} else if (!$is_new) {
|
} else {
|
||||||
$status_name = pht('Disabled');
|
$status_name = pht('Disabled');
|
||||||
$status_color = 'indigo';
|
$status_color = 'indigo';
|
||||||
$status_icon = 'fa-ban';
|
$status_icon = 'fa-ban';
|
||||||
$header->setStatus($status_icon, $status_color, $status_name);
|
$header->setStatus($status_icon, $status_color, $status_name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$config_name = 'auth.email-domains';
|
$config_name = 'auth.email-domains';
|
||||||
$config_href = '/config/edit/'.$config_name.'/';
|
$config_href = '/config/edit/'.$config_name.'/';
|
||||||
|
|
Loading…
Reference in a new issue