re-add edit button in ssl-certificates overview when manually set
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -38,8 +38,13 @@ class SSLCertificate
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canDelete(array $attributes): bool
|
public static function canEditSSL(array $attributes): bool
|
||||||
{
|
{
|
||||||
|
if ((int)$attributes['fields']['domainid'] > 0
|
||||||
|
&& (int)$attributes['fields']['letsencrypt'] == 0
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,16 @@ return [
|
|||||||
'c.validtodate',
|
'c.validtodate',
|
||||||
]),
|
]),
|
||||||
'actions' => [
|
'actions' => [
|
||||||
|
'edit' => [
|
||||||
|
'icon' => 'fa-solid fa-edit',
|
||||||
|
'title' => lng('panel.edit'),
|
||||||
|
'href' => [
|
||||||
|
'section' => 'domains',
|
||||||
|
'page' => 'domaindnseditor',
|
||||||
|
'domain_id' => ':domainid'
|
||||||
|
],
|
||||||
|
'visible' => [SSLCertificate::class, 'canEditSSL']
|
||||||
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'icon' => 'fa-solid fa-trash',
|
'icon' => 'fa-solid fa-trash',
|
||||||
'title' => lng('panel.delete'),
|
'title' => lng('panel.delete'),
|
||||||
|
|||||||
Reference in New Issue
Block a user