add icon to show admin/customer custom-notes in overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -34,4 +34,9 @@ class Customer
|
||||
return $attributes['fields']['loginfail_count'] >= Settings::Get('login.maxloginattempts')
|
||||
&& $attributes['fields']['lastlogin_fail'] > (time() - Settings::Get('login.deactivatetime'));
|
||||
}
|
||||
|
||||
public static function hasNote(array $attributes)
|
||||
{
|
||||
return !empty($attributes['fields']['custom_notes']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,17 @@ class Text
|
||||
return wordwrap($attributes['data'], 100, '<br>', true);
|
||||
}
|
||||
|
||||
public static function customerNoteDetailModal(array $attributes): array
|
||||
{
|
||||
$note = $attributes['fields']['custom_notes'] ?? '';
|
||||
return [
|
||||
'entry' => $attributes['fields']['id'],
|
||||
'id' => 'cnModal' . $attributes['fields']['id'],
|
||||
'title' => lng('usersettings.custom_notes.title') . ': ' . ($attributes['fields']['loginname'] ?? $attributes['fields']['adminname']),
|
||||
'body' => nl2br($note)
|
||||
];
|
||||
}
|
||||
|
||||
public static function apikeyDetailModal(array $attributes): array
|
||||
{
|
||||
$linker = UI::getLinker();
|
||||
|
||||
Reference in New Issue
Block a user