fix email-domain navigation and descriptions

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-03-03 13:03:12 +01:00
parent bf7d22a794
commit b03e11c18d
4 changed files with 16 additions and 5 deletions

View File

@@ -71,7 +71,7 @@ if ($page == 'overview' || $page == 'emails') {
'listing' => Listing::format($collection, $emaildomain_list_data, 'emaildomain_list'), 'listing' => Listing::format($collection, $emaildomain_list_data, 'emaildomain_list'),
'actions_links' => CurrentUser::canAddResource('emails') ? [ 'actions_links' => CurrentUser::canAddResource('emails') ? [
[ [
'href' => $linker->getLink(['section' => 'email', 'page' => $page, 'action' => 'add']), 'href' => $linker->getLink(['section' => 'email', 'page' => 'email_domain', 'action' => 'add']),
'label' => lng('emails.emails_add') 'label' => lng('emails.emails_add')
] ]
] : null, ] : null,
@@ -123,7 +123,7 @@ if ($page == 'email_domain') {
} }
if (CurrentUser::canAddResource('emails')) { if (CurrentUser::canAddResource('emails')) {
$actions_links[] = [ $actions_links[] = [
'href' => $linker->getLink(['section' => 'email', 'page' => 'email_domain', 'action' => 'add']), 'href' => $linker->getLink(['section' => 'email', 'page' => 'email_domain', 'action' => 'add', 'domainid' => $email_domainid]),
'label' => lng('emails.emails_add') 'label' => lng('emails.emails_add')
]; ];
} }
@@ -192,7 +192,11 @@ if ($page == 'email_domain') {
"cid" => $userinfo['customerid'] "cid" => $userinfo['customerid']
]); ]);
$domains = []; $domains = [];
$selected_domain = "";
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($email_domainid == $row['id']) {
$selected_domain = $row['domain'];
}
$domains[$row['domain']] = $idna_convert->decode($row['domain']); $domains[$row['domain']] = $idna_convert->decode($row['domain']);
} }

View File

@@ -23,11 +23,13 @@
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2 * @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/ */
$email_domainid ?: 0;
return [ return [
'emails_add' => [ 'emails_add' => [
'title' => lng('emails.emails_add'), 'title' => lng('emails.emails_add'),
'image' => 'fa-solid fa-plus', 'image' => 'fa-solid fa-plus',
'self_overview' => ['section' => 'email', 'page' => 'email_domain', 'domainid' => $email_domainid ?: 0], 'self_overview' => ['section' => 'email', 'page' => $email_domainid != 0 ? 'email_domain' : 'emails', 'domainid' => $email_domainid],
'sections' => [ 'sections' => [
'section_a' => [ 'section_a' => [
'title' => lng('emails.emails_add'), 'title' => lng('emails.emails_add'),
@@ -40,7 +42,8 @@ return [
'domain' => [ 'domain' => [
'next_to_prefix' => '@', 'next_to_prefix' => '@',
'type' => 'select', 'type' => 'select',
'select_var' => $domains 'select_var' => $domains,
'selected' => $selected_domain
] ]
] ]
], ],

View File

@@ -494,7 +494,7 @@ return [
'key_add' => 'API Key hinzufügen', 'key_add' => 'API Key hinzufügen',
'apikey_removed' => 'Der API Key mit der ID #%s wurde erfolgreich gelöscht.', 'apikey_removed' => 'Der API Key mit der ID #%s wurde erfolgreich gelöscht.',
'apikey_added' => 'Der neue API Key wurde erfolgreich angelegt.', 'apikey_added' => 'Der neue API Key wurde erfolgreich angelegt.',
'clicktoview' => 'API Key Details anzeigen', 'clicktoview' => 'Details anzeigen',
'allowed_from' => 'Erlaube Zugriff von', 'allowed_from' => 'Erlaube Zugriff von',
'allowed_from_help' => 'Komma getrennte Liste von IPs oder Netzen.<br>Standard ist leer (von überall erlaubt).', 'allowed_from_help' => 'Komma getrennte Liste von IPs oder Netzen.<br>Standard ist leer (von überall erlaubt).',
'valid_until' => 'Gültig bis', 'valid_until' => 'Gültig bis',
@@ -721,6 +721,8 @@ return [
'quota_edit' => 'E-Mail-Kontingent ändern', 'quota_edit' => 'E-Mail-Kontingent ändern',
'noemaildomainaddedyet' => 'Sie haben bisher noch keine (E-Mail-)Domain in Ihrem Konto.', 'noemaildomainaddedyet' => 'Sie haben bisher noch keine (E-Mail-)Domain in Ihrem Konto.',
'back_to_overview' => 'Zurück zur Domain-Übersicht', 'back_to_overview' => 'Zurück zur Domain-Übersicht',
'accounts' => 'Konten',
'emails' => 'Adressen',
], ],
'error' => [ 'error' => [
'error' => 'Fehlermeldung', 'error' => 'Fehlermeldung',

View File

@@ -787,6 +787,8 @@ return [
'quota_edit' => 'Change E-Mail Quota', 'quota_edit' => 'Change E-Mail Quota',
'noemaildomainaddedyet' => 'You do not have a (email-)domain in your account yet.', 'noemaildomainaddedyet' => 'You do not have a (email-)domain in your account yet.',
'back_to_overview' => 'Back to domain overview', 'back_to_overview' => 'Back to domain overview',
'accounts' => 'Accounts',
'emails' => 'Addresses',
], ],
'error' => [ 'error' => [
'error' => 'Error', 'error' => 'Error',