align smarty templates
This commit is contained in:
parent
b2ba738b05
commit
faf08ed786
@ -33,7 +33,7 @@ class d3_account_totp extends AccountController
|
|||||||
{
|
{
|
||||||
use OtpManagementControllerTrait;
|
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 = [];
|
public array $aBackupCodes = [];
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ use OxidEsales\Eshop\Core\Utils;
|
|||||||
|
|
||||||
class d3totplogin extends FrontendController
|
class d3totplogin extends FrontendController
|
||||||
{
|
{
|
||||||
protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/apex/d3totplogin';
|
protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/tpl/d3totplogin';
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
16
metadata.php
16
metadata.php
@ -72,11 +72,11 @@ $aModule = [
|
|||||||
'd3totpadminlogin' => d3totpadminlogin::class,
|
'd3totpadminlogin' => d3totpadminlogin::class,
|
||||||
],
|
],
|
||||||
'templates' => [
|
'templates' => [
|
||||||
'@'.Constants::OXID_MODULE_ID.'/admin/d3user_totp.tpl' => 'views/smarty/admin/d3user_totp.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/d3totplogin.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.'/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.'/tpl/d3_account_totp.tpl' => 'views/smarty/tpl/d3_account_totp.tpl',
|
||||||
'@'.Constants::OXID_MODULE_ID.'/wave/d3totpadminlogin.tpl' => 'views/smarty/wave/d3totpadminlogin.tpl',
|
'@'.Constants::OXID_MODULE_ID.'/tpl/d3totplogin.tpl' => 'views/smarty/tpl/d3totplogin.tpl',
|
||||||
],
|
],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
[
|
[
|
||||||
@ -94,22 +94,22 @@ $aModule = [
|
|||||||
[
|
[
|
||||||
'template' => 'login.tpl',
|
'template' => 'login.tpl',
|
||||||
'block' => 'admin_login_form',
|
'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',
|
'template' => 'page/account/inc/account_menu.tpl',
|
||||||
'block' => 'account_menu',
|
'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',
|
'template' => 'page/account/dashboard.tpl',
|
||||||
'block' => 'account_dashboard_col2',
|
'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',
|
'template' => 'widget/header/servicebox.tpl',
|
||||||
'block' => 'widget_header_servicebox_items',
|
'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',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
|
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
|
||||||
[{include file="@d3totp/admin/inc/bootstrap.tpl" }]
|
[{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()}]
|
[{assign var="userid" value=$edit->getId()}]
|
||||||
[{$totp->loadByUserId($userid)}]
|
[{$totp->loadByUserId($userid)}]
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<h1 class="page-header">[{oxmultilang ident="D3_TOTP_ACCOUNT"}]</h1>
|
<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()}]
|
[{assign var="userid" value=$user->getId()}]
|
||||||
[{$totp->loadByUserId($userid)}]
|
[{$totp->loadByUserId($userid)}]
|
||||||
|
|
||||||
@ -37,10 +37,15 @@
|
|||||||
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
|
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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}]>
|
<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>
|
<label for="totp_use">[{oxmultilang ident="D3_TOTP_ACCOUNT_USE"}]</label>
|
||||||
</p>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
[{if false == $totp->getId()}]
|
[{if false == $totp->getId()}]
|
||||||
<div class="registerNew [{* flow *}] panel panel-default [{* wave *}] card">
|
<div class="registerNew [{* flow *}] panel panel-default [{* wave *}] card">
|
||||||
@ -93,22 +98,22 @@
|
|||||||
|
|
||||||
[{if $totp->getId()}]
|
[{if $totp->getId()}]
|
||||||
[{block name="d3_account_totp_deletenotes"}]
|
[{block name="d3_account_totp_deletenotes"}]
|
||||||
<div class="[{* flow *}] panel panel-default [{* wave *}] card">
|
<div class="[{* wave *}] card">
|
||||||
<div class="[{* flow *}] panel-heading [{* wave *}] card-header">
|
<div class="[{* wave *}] card-header">
|
||||||
[{oxmultilang ident="D3_TOTP_REGISTEREXIST"}]
|
[{oxmultilang ident="D3_TOTP_REGISTEREXIST"}]
|
||||||
</div>
|
</div>
|
||||||
<div class="[{* flow *}] panel-body [{* wave *}] card-body">
|
<div class="[{* wave *}] card-body">
|
||||||
[{oxmultilang ident="D3_TOTP_REGISTERDELETE_DESC"}]
|
[{oxmultilang ident="D3_TOTP_REGISTERDELETE_DESC"}]
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
[{/block}]
|
[{/block}]
|
||||||
|
|
||||||
[{block name="d3_account_totp_backupcodes"}]
|
[{block name="d3_account_totp_backupcodes"}]
|
||||||
<div class="[{* flow *}] panel panel-default [{* wave *}] card">
|
<div class="[{* wave *}] card">
|
||||||
<div class="[{* flow *}] panel-heading [{* wave *}] card-header">
|
<div class="[{* wave *}] card-header">
|
||||||
[{oxmultilang ident="D3_TOTP_BACKUPCODES"}]
|
[{oxmultilang ident="D3_TOTP_BACKUPCODES"}]
|
||||||
</div>
|
</div>
|
||||||
<div class="[{* flow *}] panel-body [{* wave *}] card-body">
|
<div class="[{* wave *}] card-body">
|
||||||
[{if $oView->getBackupCodes()}]
|
[{if $oView->getBackupCodes()}]
|
||||||
[{block name="d3_account_totp_backupcodes_list"}]
|
[{block name="d3_account_totp_backupcodes_list"}]
|
||||||
<label for="backupcodes">[{oxmultilang ident="D3_TOTP_BACKUPCODES_DESC"}]</label>
|
<label for="backupcodes">[{oxmultilang ident="D3_TOTP_BACKUPCODES_DESC"}]</label>
|
@ -17,9 +17,11 @@
|
|||||||
|
|
||||||
<h3>[{oxmultilang ident="D3_TOTP_INPUT"}]</h3>
|
<h3>[{oxmultilang ident="D3_TOTP_INPUT"}]</h3>
|
||||||
|
|
||||||
[{if !empty($Errors.default)}]
|
[{* [{if !empty($Errors.default)}]*}]
|
||||||
[{include file="inc_error.tpl" Errorlist=$Errors.default}]
|
[{* [{include file="inc_error.tpl" Errorlist=$Errors.default}]*}]
|
||||||
[{/if}]
|
[{* [{/if}]*}]
|
||||||
|
|
||||||
|
<div>[{oxmultilang ident="D3_TOTP_INPUT_HELP"}]</div>
|
||||||
|
|
||||||
[{$oView->getBackupCodeCountMessage()}]
|
[{$oView->getBackupCodeCountMessage()}]
|
||||||
|
|
||||||
@ -60,8 +62,6 @@
|
|||||||
[{/capture}]
|
[{/capture}]
|
||||||
[{oxscript add=$smarty.capture.d3js}]
|
[{oxscript add=$smarty.capture.d3js}]
|
||||||
|
|
||||||
<div>[{oxmultilang ident="D3_TOTP_INPUT_HELP"}]</div>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-primary">
|
||||||
[{oxmultilang ident="D3_TOTP_SUBMIT_LOGIN"}]
|
[{oxmultilang ident="D3_TOTP_SUBMIT_LOGIN"}]
|
||||||
</button><br>
|
</button><br>
|
Loading…
x
Reference in New Issue
Block a user