From d89b1a18482786370ed288bea5a2dbb8438d680a Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 4 Jun 2024 15:38:19 +0200 Subject: [PATCH] add Twig templates --- .../de/d3_mailconfigchecker_lang.php | 22 ++++ .../en/d3_mailconfigchecker_lang.php | 22 ++++ views/twig/admin/inc/bootstrap.html.twig | 14 +++ views/twig/admin/mailCheckBase.html.twig | 14 +++ views/twig/admin/mailCheckMenu.html.twig | 39 ++++++ views/twig/admin/mailConfigCheck.html.twig | 67 +++++++++++ views/twig/admin/mailInfoPage.html.twig | 34 ++++++ views/twig/admin/mailTester.html.twig | 71 +++++++++++ views/twig/admin/smtpCheck.html.twig | 96 +++++++++++++++ views/twig/admin/spfCheck.html.twig | 112 ++++++++++++++++++ 10 files changed, 491 insertions(+) create mode 100644 Application/views/admin_twig/de/d3_mailconfigchecker_lang.php create mode 100644 Application/views/admin_twig/en/d3_mailconfigchecker_lang.php create mode 100644 views/twig/admin/inc/bootstrap.html.twig create mode 100644 views/twig/admin/mailCheckBase.html.twig create mode 100644 views/twig/admin/mailCheckMenu.html.twig create mode 100644 views/twig/admin/mailConfigCheck.html.twig create mode 100644 views/twig/admin/mailInfoPage.html.twig create mode 100644 views/twig/admin/mailTester.html.twig create mode 100644 views/twig/admin/smtpCheck.html.twig create mode 100644 views/twig/admin/spfCheck.html.twig diff --git a/Application/views/admin_twig/de/d3_mailconfigchecker_lang.php b/Application/views/admin_twig/de/d3_mailconfigchecker_lang.php new file mode 100644 index 0000000..f7fb601 --- /dev/null +++ b/Application/views/admin_twig/de/d3_mailconfigchecker_lang.php @@ -0,0 +1,22 @@ + + * @link https://www.oxidmodule.com + */ + +declare(strict_types=1); + +// @codeCoverageIgnoreStart + +$sLangName = 'Deutsch'; + +$aLang = include __DIR__."/../../de/translations.php"; + +// @codeCoverageIgnoreEnd diff --git a/Application/views/admin_twig/en/d3_mailconfigchecker_lang.php b/Application/views/admin_twig/en/d3_mailconfigchecker_lang.php new file mode 100644 index 0000000..0508c4d --- /dev/null +++ b/Application/views/admin_twig/en/d3_mailconfigchecker_lang.php @@ -0,0 +1,22 @@ + + * @link https://www.oxidmodule.com + */ + +declare(strict_types=1); + +// @codeCoverageIgnoreStart + +$sLangName = 'English'; + +$aLang = include __DIR__."/../../en/translations.php"; + +// @codeCoverageIgnoreEnd diff --git a/views/twig/admin/inc/bootstrap.html.twig b/views/twig/admin/inc/bootstrap.html.twig new file mode 100644 index 0000000..ba3205f --- /dev/null +++ b/views/twig/admin/inc/bootstrap.html.twig @@ -0,0 +1,14 @@ + + \ No newline at end of file diff --git a/views/twig/admin/mailCheckBase.html.twig b/views/twig/admin/mailCheckBase.html.twig new file mode 100644 index 0000000..2bdaab7 --- /dev/null +++ b/views/twig/admin/mailCheckBase.html.twig @@ -0,0 +1,14 @@ + + + + + {{ translate({ ident: "GENERAL_ADMIN_TITLE" }) }} + + + + + + + + + diff --git a/views/twig/admin/mailCheckMenu.html.twig b/views/twig/admin/mailCheckMenu.html.twig new file mode 100644 index 0000000..1c10b68 --- /dev/null +++ b/views/twig/admin/mailCheckMenu.html.twig @@ -0,0 +1,39 @@ +{% include "headitem.html.twig" with {title: "GENERAL_ADMIN_TITLE"|translate, box: "list"} %} + +{% if readonly %} + {% set readonly = "readonly disabled" %} +{% else %} + {% set readonly = "" %} +{% endif %} + + + + + +{% include "pagetabsnippet.html.twig" %} + + + + diff --git a/views/twig/admin/mailConfigCheck.html.twig b/views/twig/admin/mailConfigCheck.html.twig new file mode 100644 index 0000000..ab216f4 --- /dev/null +++ b/views/twig/admin/mailConfigCheck.html.twig @@ -0,0 +1,67 @@ +{% include "headitem.html.twig" with {title: "d3mxd3cleartmp"|translate} %} +{% include "@d3mailconfigchecker/admin/inc/bootstrap.html.twig" %} + + + +{% set readonly = "readonly disabled" %} + +
+ {{ oViewConf.getHiddenSid()|raw }} + + + +
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ {% if mailer %} +
+ {{ translate({ ident: "D3_MAILCHECKER_CFGCHECK_SHOPSEND", suffix: "COLON" }) }} + {% if mailer == 'mail' %} +
+ {{ translate({ ident: "D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER_DESC" }) }} + {% else %} + {{ translate({ ident: "D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP" }) }}
+ {{ translate({ ident: "D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC" }) }} + {% endif %} +
+ {% else %} +
+ {{ oViewConf.getHiddenSid()|raw }} + + + +
+ {% endif %} +
+
+ +{% include "bottomnaviitem.html.twig" %} +{% include "bottomitem.html.twig" %} \ No newline at end of file diff --git a/views/twig/admin/mailInfoPage.html.twig b/views/twig/admin/mailInfoPage.html.twig new file mode 100644 index 0000000..481bad8 --- /dev/null +++ b/views/twig/admin/mailInfoPage.html.twig @@ -0,0 +1,34 @@ +{% include "headitem.html.twig" with {title: "d3mxd3cleartmp"|translate} %} +{% include "@d3mailconfigchecker/admin/inc/bootstrap.html.twig" %} + + + +{% set readonly = "readonly disabled" %} + +
+ {{ oViewConf.getHiddenSid()|raw }} + + + +
+ +
+
+

+ {{ translate({ ident: "D3_MAILCHECKER_INFO_1" }) }} +

+

+ {{ translate({ ident: "D3_MAILCHECKER_INFO_2" }) }} +

+

+ {{ translate({ ident: "D3_MAILCHECKER_INFO_3" }) }} +

+
+
+ +{% include "bottomnaviitem.html.twig" %} +{% include "bottomitem.html.twig" %} \ No newline at end of file diff --git a/views/twig/admin/mailTester.html.twig b/views/twig/admin/mailTester.html.twig new file mode 100644 index 0000000..4ad3f34 --- /dev/null +++ b/views/twig/admin/mailTester.html.twig @@ -0,0 +1,71 @@ +{% include "headitem.html.twig" with {title: "d3mxd3cleartmp"|translate} %} +{% include "@d3mailconfigchecker/admin/inc/bootstrap.html.twig" %} + +{% if readonly %} + {% set readonly = "readonly disabled" %} +{% else %} + {% set readonly = "" %} +{% endif %} +
+ {{ oViewConf.getHiddenSid()|raw }} + + + +
+ +{% if success %} +
{{ translate({ ident: "D3_MAILCHECKER_TESTMAIL_SUCCESS" }) }}
+{% endif %} + +
+ {{ translate({ ident: "D3_MAILCHECKER_TESTMAIL_DESC" }) }} +
+ +
{{ translate({ ident: "D3_MAILCHECKER_SPFRESULT_LINKS" }) }}
+ + +
+
+
+ {{ oViewConf.getHiddenSid()|raw }} + + + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+ +{% include "bottomnaviitem.html.twig" %} + +{% include "bottomitem.html.twig" %} \ No newline at end of file diff --git a/views/twig/admin/smtpCheck.html.twig b/views/twig/admin/smtpCheck.html.twig new file mode 100644 index 0000000..8cfc60b --- /dev/null +++ b/views/twig/admin/smtpCheck.html.twig @@ -0,0 +1,96 @@ +{% include "headitem.html.twig" with {title: "GENERAL_ADMIN_TITLE"|translate} %} +{% include "@d3mailconfigchecker/admin/inc/bootstrap.html.twig" %} + + + +
+ {{ oViewConf.getHiddenSid()|raw }} + + + + +
+ +{% if success %} +
{{ translate({ ident: "D3_MAILCHECKER_SMTPCHECK_SUCCESS" }) }}
+{% endif %} + +
+
+

+ {{ translate({ ident: "D3_MAILCHECKER_SMTPCHECK_DESC1" }) }} +

+

+ {{ translate({ ident: "D3_MAILCHECKER_SMTPCHECK_DESC2" }) }} +

+

+ {{ translate({ ident: "D3_MAILCHECKER_SMTPCHECK_DESC3" }) }} +

+ +
+ {{ oViewConf.getHiddenSid()|raw }} + + + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+ +
+ {% for action, logItems in smtpLog %} +
+
{{ loop.index }} - {{ action }}
+
+
    + {% for logItem in logItems %} +
  • + {{ logItem }} +
  • + {% endfor %} +
+
+
+ {% endfor %} +
+
+ +{% include "bottomnaviitem.html.twig" %} + +{% include "bottomitem.html.twig" %} diff --git a/views/twig/admin/spfCheck.html.twig b/views/twig/admin/spfCheck.html.twig new file mode 100644 index 0000000..759fd1a --- /dev/null +++ b/views/twig/admin/spfCheck.html.twig @@ -0,0 +1,112 @@ +{% include "headitem.html.twig" with {title: "GENERAL_ADMIN_TITLE"|translate} %} +{% include "@d3mailconfigchecker/admin/inc/bootstrap.html.twig" %} + +
+ {{ oViewConf.getHiddenSid()|raw }} + + + + +
+ +
+
+

{{ translate({ ident: "D3_MAILCHECKER_SPFRESULT_HL" }) }}

+ {{ translate({ ident: "D3_MAILCHECKER_SPFRESULT_DESC" }) }} +
+
+
+
+
+ {% for domain, spf in spf_result %} +
+
+
+ {{ domain }} +
+
+

{{ translate({ ident: "D3_MAILCHECKER_SPFRESULT_"|cat(spf.getStatus())|upper }) }}

+ {% if spf.getRecord() %} +

+ + +

+ {% endif %} + +
{{ translate({ ident: "D3_MAILCHECKER_SPFRESULT_LINKS" }) }}
+ +
+
+
+ {% endfor %} +
+
+
+ +
+
+

{{ translate({ ident: "D3_MAILCHECKER_DMARCRESULT_HL" }) }}

+ {{ translate({ ident: "D3_MAILCHECKER_DMARCRESULT_DESC" }) }} +
+
+
+
+
+ {% for domain, dmarc in dmarc_result %} +
+
+
+ {{ domain }} +
+
+

{{ translate({ ident: "D3_MAILCHECKER_DMARCRESULT_"|cat(dmarc.getStatus())|upper }) }}

+ {% if dmarc.getRecord() %} +

+ + +

+ {% endif %} + +
{{ translate({ ident: "D3_MAILCHECKER_DMARCRESULT_LINKS" }) }}
+ +
+
+
+ {% endfor %} +
+
+
+ +{% include "bottomnaviitem.html.twig" %} + +{% include "bottomitem.html.twig" %}