format admin user configuration page

This commit is contained in:
Daniel Seifert 2022-10-26 14:42:26 +02:00
parent 043e4e8727
commit cdd2118aab
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F

View File

@ -1,8 +1,11 @@
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}] [{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
[{*assign var="webauthn" value=$edit->d3GetWebauthn()}]*}] [{oxstyle include="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"}]
[{assign var="userid" value=$edit->getId()}] [{oxscript include="https://code.jquery.com/jquery-3.2.1.slim.min.js"}]
[{*$webauthn->loadByUserId($userid)*}] [{oxscript include="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"}]
[{oxscript include="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"}]
[{oxstyle include="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css"}]
[{oxstyle}]
[{if $readonly}] [{if $readonly}]
[{assign var="readonly" value="readonly disabled"}] [{assign var="readonly" value="readonly disabled"}]
@ -17,6 +20,14 @@
.hidden-delete { .hidden-delete {
display: none; display: none;
} }
.container-fluid,
.errorbox {
font-size: 13px;
}
.errorbox p {
margin: 0.5rem;
}
</style> </style>
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post"> <form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
@ -40,18 +51,20 @@
[{/capture}] [{/capture}]
[{oxscript add=$smarty.capture.javascripts}] [{oxscript add=$smarty.capture.javascripts}]
[{if $oxid && $oxid != '-1'}] [{if $oxid && $oxid != '-1'}]
[{if $pageType === 'requestnew'}] [{if $pageType === 'requestnew'}]
[{include file="js_create.tpl"}] <div class="container-fluid">
<div class="row">
[{include file="js_create.tpl"}]
<div> <div>
Bitte die Anfrage Ihres Browsers bestätigen. Bitte die Anfrage Ihres Browsers bestätigen.
</div>
<button onclick="document.getElementById('webauthn').submit();">Abbrechen</button>
</div>
</div> </div>
<button onclick="document.getElementById('webauthn').submit();">Abbrechen</button>
[{else}] [{else}]
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post" style="padding: 0;margin: 0;height:0;"> <form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post" style="padding: 0;margin: 0;height:0;">
[{$oViewConf->getHiddenSid()}] [{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]"> <input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
@ -61,9 +74,6 @@
<input type="hidden" name="oxid" value="[{$oxid}]"> <input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="deleteoxid" id="oxidvalue" value=""> <input type="hidden" name="deleteoxid" id="oxidvalue" value="">
<button type="submit" style="display: none;"></button> <button type="submit" style="display: none;"></button>
[{* <input type="hidden" name="editval[d3totp__oxid]" value="[{$webauthn->getId()}]">
<input type="hidden" name="editval[d3totp__oxuserid]" value="[{$oxid}]">
*}]
</form> </form>
[{if $sSaveError}] [{if $sSaveError}]
@ -75,71 +85,70 @@
</table> </table>
[{/if}] [{/if}]
<table style="padding:0; border:0; width:98%;"> <div class="container-fluid">
<tr> <div class="row">
<td class="edittext" style="vertical-align: top; padding-top:10px;padding-left:10px; width: 50%;"> <div class="col-6">
<form name="newcred" id="newcred" action="[{$oViewConf->getSelfLink()}]" method="post"> <div class="card">
[{$oViewConf->getHiddenSid()}] [{block name="user_d3user_totp_registernew"}]
<input type="hidden" name="cl" value="[{$oView->getClassName()}]"> <div class="card-header">
<input type="hidden" name="fnc" value="requestNewCredential"> [{oxmultilang ident="D3_WEBAUTHN_REGISTERNEW"}]
<input type="hidden" name="oxid" value="[{$oxid}]"> </div>
<table style="padding:0; border:0"> <div class="card-body">
[{block name="user_d3user_totp_form1"}] <form name="newcred" id="newcred" action="[{$oViewConf->getSelfLink()}]" method="post">
<tr> [{$oViewConf->getHiddenSid()}]
<td class="edittext"> <input type="hidden" name="cl" value="[{$oView->getClassName()}]">
<h4>[{oxmultilang ident="D3_WEBAUTHN_REGISTERNEW"}]</h4> <input type="hidden" name="fnc" value="requestNewCredential">
</td> <input type="hidden" name="oxid" value="[{$oxid}]">
</tr> [{block name="user_d3user_totp_registerform"}]
<tr>
<td class="edittext">
<label for="credentialname">Name des Schlüssels</label> <label for="credentialname">Name des Schlüssels</label>
<input id="credentialname" type="text" name="credenialname" [{$readonly}]> <p class="card-text">
</td> <input id="credentialname" type="text" name="credenialname" [{$readonly}]>
</tr> </p>
<tr> <p class="card-text">
<td class="edittext"> <button type="submit" [{$readonly}] class="btn btn-primary btn-success">
<button type="submit" [{$readonly}]>[{oxmultilang ident="D3_WEBAUTHN_ADDKEY"}]</button> [{oxmultilang ident="D3_WEBAUTHN_ADDKEY"}]
</td> </button>
</tr> </p>
[{/block}] [{/block}]
</table> </form>
</form> </div>
</td>
<!-- Anfang rechte Seite -->
<td class="edittext" style="text-align: left; vertical-align: top; height:99%;padding-left:5px;padding-bottom:30px;padding-top:10px; width: 50%;">
<table style="padding:0; border:0">
[{block name="user_d3user_totp_form2"}]
<tr>
<td class="edittext" colspan="2">
<h4>[{oxmultilang ident="D3_WEBAUTHN_REGISTEREDKEYS"}]</h4>
</td>
</tr>
[{foreach from=$oView->getCredentialList($userid) item="credential"}]
<tr>
[{***
<td class="edittext">
<label for="secret">[{$credential->d3GetName()}]</label>
</td>
***}]
<td class="edittext">
<a href="#" onclick="toggle('keydetails_[{$credential->getId()}]'); return false;" class="list-group-item">
[{$credential->getName()}]
</a>
<div class="list-group-item hidden-delete" id="keydetails_[{$credential->getId()}]">
<a onclick="deleteItem('[{$credential->getId()}]'); return false;"><span class="glyphicon glyphicon-pencil">delete</span></a>
</div>
</td>
</tr>
[{/foreach}]
[{/block}] [{/block}]
</table> </div>
</td> </div>
<!-- Ende rechte Seite --> <div class="col-6">
</tr> <div class="card">
</table> [{block name="user_d3user_totp_form2"}]
<div class="card-header">
[{oxmultilang ident="D3_WEBAUTHN_REGISTEREDKEYS"}]
</div>
<div class="card-body">
[{if $oView->getCredentialList($userid)}]
<ul class="list-group list-group-flush">
[{foreach from=$oView->getCredentialList($userid) item="credential"}]
<li class="list-group-item">
[{$credential->getName()}]
<a onclick="deleteItem('[{$credential->getId()}]'); return false;" href="#" class="btn btn-danger btn-sm">
<span class="glyphicon glyphicon-pencil"></span>
delete
</a>
</li>
[{/foreach}]
</ul>
[{else}]
<div class="card-text">
kein Schluessel registriert
</div>
[{/if}]
</div>
[{/block}]
</div>
</div>
</div>
</div>
[{/if}] [{/if}]
[{/if}] [{/if}]
[{oxscript}]
[{include file="bottomnaviitem.tpl"}] [{include file="bottomnaviitem.tpl"}]
[{include file="bottomitem.tpl"}] [{include file="bottomitem.tpl"}]