Skip to content
Snippets Groups Projects
Commit 4338a6b2 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Fix initialization of TOTP info modal

The TOTP info modal displays the OTP auth url
along with a description. This content however
is added to the modal body by a callback. To
prevent the "modal content empty" warning
from being shown, the modal is now initialized
with an empty string as content.

Resolves: #94999
Releases: master
Change-Id: I0a8c274466d4f62da8edb26a4c2b547b66be3ba6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70761


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarJochen <rothjochen@gmail.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarJochen <rothjochen@gmail.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 76e94a34
Branches
Tags
No related merge requests found
......@@ -41,6 +41,7 @@ class MfaTotpUrlButton extends LitElement {
private showTotpAuthUrlModal(): void {
Modal.advanced({
title: this.title,
content: '', // Empty content, will be filled by the callback
buttons: [
{
trigger: (): void => Modal.dismiss(),
......
......@@ -10,7 +10,7 @@
*
* The TYPO3 project - inspiring people to share!
*/
var __decorate=this&&this.__decorate||function(t,e,o,r){var i,l=arguments.length,n=l<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,r);else for(var d=t.length-1;d>=0;d--)(i=t[d])&&(n=(l<3?i(n):l>3?i(e,o,n):i(e,o))||n);return l>3&&n&&Object.defineProperty(e,o,n),n};define(["require","exports","lit","lit/decorators","TYPO3/CMS/Backend/Modal"],(function(t,e,o,r,i){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.modalBody=".t3js-modal-body"}(l||(l={}));let n=class extends o.LitElement{constructor(){super(),this.addEventListener("click",t=>{t.preventDefault(),this.showTotpAuthUrlModal()})}render(){return o.html`<slot></slot>`}showTotpAuthUrlModal(){i.advanced({title:this.title,buttons:[{trigger:()=>i.dismiss(),text:this.ok||"OK",active:!0,btnClass:"btn-default",name:"ok"}],callback:t=>{o.render(o.html`
var __decorate=this&&this.__decorate||function(t,e,o,r){var i,n=arguments.length,l=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,o,r);else for(var d=t.length-1;d>=0;d--)(i=t[d])&&(l=(n<3?i(l):n>3?i(e,o,l):i(e,o))||l);return n>3&&l&&Object.defineProperty(e,o,l),l};define(["require","exports","lit","lit/decorators","TYPO3/CMS/Backend/Modal"],(function(t,e,o,r,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.modalBody=".t3js-modal-body"}(n||(n={}));let l=class extends o.LitElement{constructor(){super(),this.addEventListener("click",t=>{t.preventDefault(),this.showTotpAuthUrlModal()})}render(){return o.html`<slot></slot>`}showTotpAuthUrlModal(){i.advanced({title:this.title,content:"",buttons:[{trigger:()=>i.dismiss(),text:this.ok||"OK",active:!0,btnClass:"btn-default",name:"ok"}],callback:t=>{o.render(o.html`
<p>${this.description}</p>
<pre>${this.url}</pre>
`,t[0].querySelector(l.modalBody))}})}};__decorate([r.property({type:String})],n.prototype,"url",void 0),__decorate([r.property({type:String})],n.prototype,"title",void 0),__decorate([r.property({type:String})],n.prototype,"description",void 0),__decorate([r.property({type:String})],n.prototype,"ok",void 0),n=__decorate([r.customElement("typo3-mfa-totp-url-info-button")],n)}));
\ No newline at end of file
`,t[0].querySelector(n.modalBody))}})}};__decorate([r.property({type:String})],l.prototype,"url",void 0),__decorate([r.property({type:String})],l.prototype,"title",void 0),__decorate([r.property({type:String})],l.prototype,"description",void 0),__decorate([r.property({type:String})],l.prototype,"ok",void 0),l=__decorate([r.customElement("typo3-mfa-totp-url-info-button")],l)}));
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment