align smarty templates

This commit is contained in:
Daniel Seifert 2024-09-20 21:55:25 +02:00
parent b2ba738b05
commit faf08ed786
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
8 changed files with 33 additions and 28 deletions

View File

@ -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 = [];

View File

@ -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()
{

View File

@ -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',
],
],
];

View File

@ -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)}]

View File

@ -2,7 +2,7 @@
<h1 class="page-header">[{oxmultilang ident="D3_TOTP_ACCOUNT"}]</h1>
[{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 @@
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
</div>
<p>
<input id="totp_use" value="1" type="checkbox" name="totp_use" [{if $totp->getId()}] checked[{/if}] [{if false == $totp->getId()}]onclick="$('.registerNew').toggle(); $('.submitBtn').toggle();"[{/if}]>
<label for="totp_use">[{oxmultilang ident="D3_TOTP_ACCOUNT_USE"}]</label>
</p>
<div class="[{* wave *}] card">
<div class="[{* wave *}] card-header">
[{oxmultilang ident="D3_TOTP_STATUS"}]
</div>
<div class="[{* wave *}] card-body">
<input id="totp_use" value="1" type="checkbox" name="totp_use" [{if $totp->getId()}] checked[{/if}] [{if false == $totp->getId()}]onclick="$('.registerNew').toggle(); $('.submitBtn').toggle();"[{/if}]>
<label for="totp_use">[{oxmultilang ident="D3_TOTP_ACCOUNT_USE"}]</label>
</div>
</div>
[{if false == $totp->getId()}]
<div class="registerNew [{* flow *}] panel panel-default [{* wave *}] card">
@ -93,22 +98,22 @@
[{if $totp->getId()}]
[{block name="d3_account_totp_deletenotes"}]
<div class="[{* flow *}] panel panel-default [{* wave *}] card">
<div class="[{* flow *}] panel-heading [{* wave *}] card-header">
<div class="[{* wave *}] card">
<div class="[{* wave *}] card-header">
[{oxmultilang ident="D3_TOTP_REGISTEREXIST"}]
</div>
<div class="[{* flow *}] panel-body [{* wave *}] card-body">
<div class="[{* wave *}] card-body">
[{oxmultilang ident="D3_TOTP_REGISTERDELETE_DESC"}]
</div>
</div>
[{/block}]
[{block name="d3_account_totp_backupcodes"}]
<div class="[{* flow *}] panel panel-default [{* wave *}] card">
<div class="[{* flow *}] panel-heading [{* wave *}] card-header">
<div class="[{* wave *}] card">
<div class="[{* wave *}] card-header">
[{oxmultilang ident="D3_TOTP_BACKUPCODES"}]
</div>
<div class="[{* flow *}] panel-body [{* wave *}] card-body">
<div class="[{* wave *}] card-body">
[{if $oView->getBackupCodes()}]
[{block name="d3_account_totp_backupcodes_list"}]
<label for="backupcodes">[{oxmultilang ident="D3_TOTP_BACKUPCODES_DESC"}]</label>

View File

@ -17,9 +17,11 @@
<h3>[{oxmultilang ident="D3_TOTP_INPUT"}]</h3>
[{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}]*}]
<div>[{oxmultilang ident="D3_TOTP_INPUT_HELP"}]</div>
[{$oView->getBackupCodeCountMessage()}]
@ -60,8 +62,6 @@
[{/capture}]
[{oxscript add=$smarty.capture.d3js}]
<div>[{oxmultilang ident="D3_TOTP_INPUT_HELP"}]</div>
<button type="submit" class="btn btn-primary">
[{oxmultilang ident="D3_TOTP_SUBMIT_LOGIN"}]
</button><br>