fix styling of deactivated/locked customers in overview and 0-value in edit-form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -123,7 +123,7 @@ class PhpSettings extends ApiCommand implements ResourceEntity
|
||||
}
|
||||
|
||||
// check whether we use that config as froxor-vhost config
|
||||
if (Settings::Get('system.mod_fcgid_defaultini_ownvhost') == $row['id'] || Settings::Get('phpfpm.vhost_defaultini') == $row['id']) {
|
||||
if ((Settings::Get('system.mod_fcgid') == '1' && Settings::Get('system.mod_fcgid_defaultini_ownvhost') == $row['id']) || (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.vhost_defaultini') == $row['id'])) {
|
||||
$domains[] = Settings::Get('system.hostname');
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,21 @@ class Style
|
||||
return $attributes['fields']['deactivated'] ? 'bg-info' : $termination_css;
|
||||
}
|
||||
|
||||
public static function resultCustomerLockedOrDeactivated(array $attributes): string
|
||||
{
|
||||
$row_css = '';
|
||||
if ((int)$attributes['fields']['deactivated'] == 1) {
|
||||
$row_css = 'bg-info';
|
||||
} elseif (
|
||||
$attributes['fields']['loginfail_count'] >= Settings::Get('login.maxloginattempts')
|
||||
&& $attributes['fields']['lastlogin_fail'] > (time() - Settings::Get('login.deactivatetime'))
|
||||
) {
|
||||
$row_css = 'bg-warning';
|
||||
}
|
||||
|
||||
return $row_css;
|
||||
}
|
||||
|
||||
public static function diskspaceWarning(array $attributes): string
|
||||
{
|
||||
return self::getWarningStyle('diskspace', $attributes['fields'], (int)Settings::Get('system.report_webmax'));
|
||||
|
||||
Reference in New Issue
Block a user