Skip to content

Commit

Permalink
fix email-domain navigation and descriptions
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Mar 3, 2023
1 parent bf7d22a commit b03e11c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
8 changes: 6 additions & 2 deletions customer_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
'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,
Expand Down Expand Up @@ -123,7 +123,7 @@
}
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')
];
}
Expand Down Expand Up @@ -192,7 +192,11 @@
"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']);
}

Expand Down
7 changes: 5 additions & 2 deletions lib/formfields/customer/email/formfield.emails_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -40,7 +42,8 @@
'domain' => [
'next_to_prefix' => '@',
'type' => 'select',
'select_var' => $domains
'select_var' => $domains,
'selected' => $selected_domain
]
]
],
Expand Down
4 changes: 3 additions & 1 deletion lng/de.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
'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.<br>Standard ist leer (von überall erlaubt).',
'valid_until' => 'Gültig bis',
Expand Down Expand Up @@ -721,6 +721,8 @@
'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',
Expand Down
2 changes: 2 additions & 0 deletions lng/en.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,8 @@
'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',
Expand Down

0 comments on commit b03e11c

Please sign in to comment.