diff --git a/exec/handlers/index.php b/exec/handlers/index.php
index 14f15a7..99f4b14 100644
--- a/exec/handlers/index.php
+++ b/exec/handlers/index.php
@@ -12,8 +12,7 @@ return static function (AppContext $ctx): void {
if ($rules === []) {
$body = '
';
+ '' . AppContext::e($ctx->t('All valid POP/IMAP mailboxes in this account')) . '
';
$ctx->render('Global autoresponders', $body, $ok);
return;
}
@@ -35,7 +34,6 @@ return static function (AppContext $ctx): void {
}
$body = '' .
- '
| ' . AppContext::e($ctx->t('Status')) . ' | ' . AppContext::e($ctx->t('Subject prefix')) . ' | ' . AppContext::e($ctx->t('Sending period')) . ' | ' . AppContext::e($ctx->t('Actions')) . ' |
' . $rows . '
';
+ '| ' . AppContext::e($ctx->t('Status')) . ' | ' . AppContext::e($ctx->t('Subject prefix')) . ' | ' . AppContext::e($ctx->t('Sending period')) . ' | ' . AppContext::e($ctx->t('Actions')) . ' |
' . $rows . '
';
$ctx->render('Global autoresponders', $body, $ok);
};
diff --git a/lang/en.php b/lang/en.php
index 1c4a559..52f9fcd 100644
--- a/lang/en.php
+++ b/lang/en.php
@@ -5,8 +5,8 @@ return [
'Global autoresponders' => 'Global autoresponders',
'Manage automatic replies for account mailboxes' => 'Manage automatic replies for account mailboxes',
'Dashboard' => 'Dashboard',
- 'AUTORESPONDERS' => 'AUTORESPONDERS',
- 'ADD AUTORESPONDER' => 'ADD AUTORESPONDER',
+ 'AUTORESPONDERS' => 'Global autoresponder list',
+ 'ADD AUTORESPONDER' => 'Add global autoresponder',
'Add autoresponder' => 'Add autoresponder',
'Edit autoresponder' => 'Edit autoresponder',
'Preview autoresponder' => 'Preview autoresponder',
diff --git a/lang/pl.php b/lang/pl.php
index 1604860..7c4a9a5 100644
--- a/lang/pl.php
+++ b/lang/pl.php
@@ -5,8 +5,8 @@ return [
'Global autoresponders' => 'Globalne autorespondery',
'Manage automatic replies for account mailboxes' => 'Zarządzanie odpowiedziami dla skrzynek pocztowych konta',
'Dashboard' => 'Pulpit',
- 'AUTORESPONDERS' => 'AUTORESPONDERY',
- 'ADD AUTORESPONDER' => 'DODAJ AUTORESPONDER',
+ 'AUTORESPONDERS' => 'Lista globalnych autoresponderów',
+ 'ADD AUTORESPONDER' => 'Dodaj Globalny autoresponder',
'Add autoresponder' => 'Dodaj autoresponder',
'Edit autoresponder' => 'Edytuj autoresponder',
'Preview autoresponder' => 'Podgląd autorespondera',
diff --git a/plugin.conf b/plugin.conf
index f8bd486..ea08e76 100644
--- a/plugin.conf
+++ b/plugin.conf
@@ -2,7 +2,7 @@ name=global-autoresponder
id=global-autoresponder
type=user
author=HITME.PL
-version=1.1.5
+version=1.2.1
active=no
installed=no
user_run_as=root
diff --git a/tests/handler_test.php b/tests/handler_test.php
index 4cea80f..04fa0f4 100644
--- a/tests/handler_test.php
+++ b/tests/handler_test.php
@@ -29,6 +29,23 @@ test('directadmin user hooks are clickable and point to reserved icon path', fun
assert_contains('Globalne autorespondery', $txt);
});
+test('top navigation uses global autoresponder labels', function (): void {
+ $pl = require PLUGIN_ROOT . '/lang/pl.php';
+ $en = require PLUGIN_ROOT . '/lang/en.php';
+
+ assert_same('Lista globalnych autoresponderów', $pl['AUTORESPONDERS'] ?? '');
+ assert_same('Dodaj Globalny autoresponder', $pl['ADD AUTORESPONDER'] ?? '');
+ assert_same('Global autoresponder list', $en['AUTORESPONDERS'] ?? '');
+ assert_same('Add global autoresponder', $en['ADD AUTORESPONDER'] ?? '');
+});
+
+test('autoresponder index keeps add button only in top navigation', function (): void {
+ $source = file_get_contents(PLUGIN_ROOT . '/exec/handlers/index.php') ?: '';
+
+ assert_false(strpos($source, "ctx->url('create.html')") !== false);
+ assert_false(strpos($source, "ctx->t('Add autoresponder')") !== false);
+});
+
test('rule form uses minute time input and no summary box in exim mode', function (): void {
require_once PLUGIN_ROOT . '/exec/lib/Settings.php';
require_once PLUGIN_ROOT . '/exec/lib/Lang.php';