diff --git a/customer_email.php b/customer_email.php index 1ac2513f..a9944734 100644 --- a/customer_email.php +++ b/customer_email.php @@ -71,7 +71,7 @@ if ($page == 'overview' || $page == 'emails') { 'listing' => Listing::format($collection, $emaildomain_list_data, 'emaildomain_list'), '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') ] ] : null, @@ -123,7 +123,7 @@ if ($page == 'email_domain') { } if (CurrentUser::canAddResource('emails')) { $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') ]; } @@ -192,7 +192,11 @@ if ($page == 'email_domain') { "cid" => $userinfo['customerid'] ]); $domains = []; + $selected_domain = ""; 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']); } diff --git a/lib/formfields/customer/email/formfield.emails_add.php b/lib/formfields/customer/email/formfield.emails_add.php index 7d676c47..12bc95cd 100644 --- a/lib/formfields/customer/email/formfield.emails_add.php +++ b/lib/formfields/customer/email/formfield.emails_add.php @@ -23,11 +23,13 @@ * @license https://files.froxlor.org/misc/COPYING.txt GPLv2 */ +$email_domainid ?: 0; + return [ 'emails_add' => [ 'title' => lng('emails.emails_add'), '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' => [ 'section_a' => [ 'title' => lng('emails.emails_add'), @@ -40,7 +42,8 @@ return [ 'domain' => [ 'next_to_prefix' => '@', 'type' => 'select', - 'select_var' => $domains + 'select_var' => $domains, + 'selected' => $selected_domain ] ] ], diff --git a/lng/de.lng.php b/lng/de.lng.php index add64217..2f452782 100644 --- a/lng/de.lng.php +++ b/lng/de.lng.php @@ -494,7 +494,7 @@ return [ 'key_add' => 'API Key hinzufügen', 'apikey_removed' => 'Der API Key mit der ID #%s wurde erfolgreich gelöscht.', 'apikey_added' => 'Der neue API Key wurde erfolgreich angelegt.', - 'clicktoview' => 'API Key Details anzeigen', + 'clicktoview' => 'Details anzeigen', 'allowed_from' => 'Erlaube Zugriff von', 'allowed_from_help' => 'Komma getrennte Liste von IPs oder Netzen.
Standard ist leer (von überall erlaubt).', 'valid_until' => 'Gültig bis', @@ -721,6 +721,8 @@ return [ 'quota_edit' => 'E-Mail-Kontingent ändern', 'noemaildomainaddedyet' => 'Sie haben bisher noch keine (E-Mail-)Domain in Ihrem Konto.', 'back_to_overview' => 'Zurück zur Domain-Übersicht', + 'accounts' => 'Konten', + 'emails' => 'Adressen', ], 'error' => [ 'error' => 'Fehlermeldung', diff --git a/lng/en.lng.php b/lng/en.lng.php index 339a9159..4d599ecc 100644 --- a/lng/en.lng.php +++ b/lng/en.lng.php @@ -787,6 +787,8 @@ return [ 'quota_edit' => 'Change E-Mail Quota', 'noemaildomainaddedyet' => 'You do not have a (email-)domain in your account yet.', 'back_to_overview' => 'Back to domain overview', + 'accounts' => 'Accounts', + 'emails' => 'Addresses', ], 'error' => [ 'error' => 'Error',