diff --git a/Application/Controller/d3_account_totp.php b/Application/Controller/d3_account_totp.php index dd29987..304c3a5 100644 --- a/Application/Controller/d3_account_totp.php +++ b/Application/Controller/d3_account_totp.php @@ -33,7 +33,7 @@ class d3_account_totp extends AccountController { use OtpManagementControllerTrait; - protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/apex/d3_account_totp'; + protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/tpl/d3_account_totp'; public array $aBackupCodes = []; diff --git a/Application/Controller/d3totplogin.php b/Application/Controller/d3totplogin.php index a8cd5af..9136bd0 100644 --- a/Application/Controller/d3totplogin.php +++ b/Application/Controller/d3totplogin.php @@ -25,7 +25,7 @@ use OxidEsales\Eshop\Core\Utils; class d3totplogin extends FrontendController { - protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/apex/d3totplogin'; + protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/tpl/d3totplogin'; public function render() { diff --git a/metadata.php b/metadata.php index 9ba520e..ec901f8 100644 --- a/metadata.php +++ b/metadata.php @@ -72,11 +72,11 @@ $aModule = [ 'd3totpadminlogin' => d3totpadminlogin::class, ], 'templates' => [ - '@'.Constants::OXID_MODULE_ID.'/admin/d3user_totp.tpl' => 'views/smarty/admin/d3user_totp.tpl', - '@'.Constants::OXID_MODULE_ID.'/admin/d3totplogin.tpl' => 'views/smarty/admin/d3totplogin.tpl', - '@'.Constants::OXID_MODULE_ID.'/admin/inc/bootstrap.tpl' => 'views/smarty/admin/inc/bootstrap.tpl', - '@'.Constants::OXID_MODULE_ID.'/wave/d3_account_totp.tpl' => 'views/smarty/wave/d3_account_totp.tpl', - '@'.Constants::OXID_MODULE_ID.'/wave/d3totpadminlogin.tpl' => 'views/smarty/wave/d3totpadminlogin.tpl', + '@'.Constants::OXID_MODULE_ID.'/admin/d3user_totp.tpl' => 'views/smarty/admin/tpl/d3user_totp.tpl', + '@'.Constants::OXID_MODULE_ID.'/admin/d3totplogin.tpl' => 'views/smarty/admin/tpl/d3totplogin.tpl', + '@'.Constants::OXID_MODULE_ID.'/admin/inc/bootstrap.tpl' => 'views/smarty/admin/inc/bootstrap.tpl', + '@'.Constants::OXID_MODULE_ID.'/tpl/d3_account_totp.tpl' => 'views/smarty/tpl/d3_account_totp.tpl', + '@'.Constants::OXID_MODULE_ID.'/tpl/d3totplogin.tpl' => 'views/smarty/tpl/d3totplogin.tpl', ], 'settings' => [ [ @@ -94,22 +94,22 @@ $aModule = [ [ 'template' => 'login.tpl', 'block' => 'admin_login_form', - 'file' => 'Application/views/admin/blocks/d3totp_login_admin_login_form.tpl', + 'file' => 'views/smarty/admin/blocks/d3totp_login_admin_login_form.tpl', ], [ 'template' => 'page/account/inc/account_menu.tpl', 'block' => 'account_menu', - 'file' => 'Application/views/blocks/page/account/inc/account_menu.tpl', + 'file' => 'views/smarty/blocks/page/account/inc/account_menu.tpl', ], [ 'template' => 'page/account/dashboard.tpl', 'block' => 'account_dashboard_col2', - 'file' => 'Application/views/blocks/page/account/account_dashboard_col2_wave.tpl', + 'file' => 'views/smarty/blocks/page/account/account_dashboard_col2_wave.tpl', ], [ 'template' => 'widget/header/servicebox.tpl', 'block' => 'widget_header_servicebox_items', - 'file' => 'Application/views/blocks/widget/header/widget_header_servicebox_items.tpl', + 'file' => 'views/smarty/blocks/widget/header/widget_header_servicebox_items.tpl', ], ], ]; diff --git a/views/smarty/admin/tpl/d3user_totp.tpl b/views/smarty/admin/tpl/d3user_totp.tpl index a7fd0bd..524ca90 100644 --- a/views/smarty/admin/tpl/d3user_totp.tpl +++ b/views/smarty/admin/tpl/d3user_totp.tpl @@ -1,7 +1,7 @@ [{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] [{include file="@d3totp/admin/inc/bootstrap.tpl" }] -[{assign var="totp" value=$edit->d3GetTotp()}] +[{assign var="totp" value=$edit->d3GetSessionedTotp()}] [{assign var="userid" value=$edit->getId()}] [{$totp->loadByUserId($userid)}] diff --git a/views/smarty/wave/d3_account_totp.tpl b/views/smarty/tpl/d3_account_totp.tpl similarity index 84% rename from views/smarty/wave/d3_account_totp.tpl rename to views/smarty/tpl/d3_account_totp.tpl index 0362b79..27762f1 100644 --- a/views/smarty/wave/d3_account_totp.tpl +++ b/views/smarty/tpl/d3_account_totp.tpl @@ -2,7 +2,7 @@

[{oxmultilang ident="D3_TOTP_ACCOUNT"}]

- [{assign var="totp" value=$user->d3GetTotp()}] + [{assign var="totp" value=$user->d3GetSessionedTotp()}] [{assign var="userid" value=$user->getId()}] [{$totp->loadByUserId($userid)}] @@ -37,10 +37,15 @@ -

- getId()}] checked[{/if}] [{if false == $totp->getId()}]onclick="$('.registerNew').toggle(); $('.submitBtn').toggle();"[{/if}]> - -

+
+
+ [{oxmultilang ident="D3_TOTP_STATUS"}] +
+
+ getId()}] checked[{/if}] [{if false == $totp->getId()}]onclick="$('.registerNew').toggle(); $('.submitBtn').toggle();"[{/if}]> + +
+
[{if false == $totp->getId()}]
@@ -93,22 +98,22 @@ [{if $totp->getId()}] [{block name="d3_account_totp_deletenotes"}] -
-
+
+
[{oxmultilang ident="D3_TOTP_REGISTEREXIST"}]
-
+
[{oxmultilang ident="D3_TOTP_REGISTERDELETE_DESC"}]
[{/block}] [{block name="d3_account_totp_backupcodes"}] -
-
+
+
[{oxmultilang ident="D3_TOTP_BACKUPCODES"}]
-
+
[{if $oView->getBackupCodes()}] [{block name="d3_account_totp_backupcodes_list"}] diff --git a/views/smarty/wave/d3totpadminlogin.tpl b/views/smarty/tpl/d3totplogin.tpl similarity index 95% rename from views/smarty/wave/d3totpadminlogin.tpl rename to views/smarty/tpl/d3totplogin.tpl index 28e15aa..555bd19 100644 --- a/views/smarty/wave/d3totpadminlogin.tpl +++ b/views/smarty/tpl/d3totplogin.tpl @@ -17,9 +17,11 @@

[{oxmultilang ident="D3_TOTP_INPUT"}]

- [{if !empty($Errors.default)}] - [{include file="inc_error.tpl" Errorlist=$Errors.default}] - [{/if}] +[{* [{if !empty($Errors.default)}]*}] +[{* [{include file="inc_error.tpl" Errorlist=$Errors.default}]*}] +[{* [{/if}]*}] + +
[{oxmultilang ident="D3_TOTP_INPUT_HELP"}]
[{$oView->getBackupCodeCountMessage()}] @@ -60,8 +62,6 @@ [{/capture}] [{oxscript add=$smarty.capture.d3js}] -
[{oxmultilang ident="D3_TOTP_INPUT_HELP"}]
-
diff --git a/views/twig/apex/d3_account_totp.html.twig b/views/twig/tpl/d3_account_totp.html.twig similarity index 100% rename from views/twig/apex/d3_account_totp.html.twig rename to views/twig/tpl/d3_account_totp.html.twig diff --git a/views/twig/apex/d3totplogin.html.twig b/views/twig/tpl/d3totplogin.html.twig similarity index 100% rename from views/twig/apex/d3totplogin.html.twig rename to views/twig/tpl/d3totplogin.html.twig