Skip to content
Snippets Groups Projects
Unverified Commit 8a20fde7 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Migrate QualifiedSigningRequest to http://schema.org/EntryPoint and implement...

Migrate QualifiedSigningRequest to http://schema.org/EntryPoint and implement setting of file name (#4)
parent a0324fdb
No related branches found
No related tags found
No related merge requests found
Pipeline #10223 passed with warnings
...@@ -148,29 +148,19 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle ...@@ -148,29 +148,19 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
this.errorFiles[Math.floor(Math.random() * 1000000)] = ev.detail; this.errorFiles[Math.floor(Math.random() * 1000000)] = ev.detail;
// this triggers the correct update() execution // this triggers the correct update() execution
this.errorFilesCount++; this.errorFilesCount++;
} else if (ev.detail.json["@type"] === "http://schema.org/WebPage" ) { } else {
// we use this to put in the html form from our requests const entryPoint = ev.detail.json;
let iframeBlock = this._("#iframe-block");
iframeBlock.innerHTML = ev.detail.json.text; if (entryPoint["@type"] === "http://schema.org/EntryPoint" ) {
this.currentFileName = entryPoint.name;
// we will submit the form to our iframe, this was the most reliable way // we want to load the redirect url in the iframe
// to be able to work with the submitted form in the same iframe repeatedly let iframe = this._("#iframe");
let form = this._("#iframe-block form"); iframe.src = entryPoint.url;
form.setAttribute("target", "external_iframe");
form.submit();
// show the iframe // show the iframe
this.externalAuthInProgress = true; this.externalAuthInProgress = true;
}
// doesn't seem to work reliably
// let iframe = document.createElement('iframe');
// iframe.sandbox = '';
// iframeBlock.appendChild(iframe);
// this.setIframeHTML(iframe, ev.detail.json.text);
// only works once when used with a static iframe, it doesn't work
// with a dynamically created iframe
// this.replaceIframeContent(iframe, ev.detail.json.text);
} }
} }
...@@ -321,11 +311,8 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle ...@@ -321,11 +311,8 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
#iframe { #iframe {
width: 100%; width: 100%;
height: 500px; height: 240px;
} border: none;
#iframe-block {
display: none;
} }
.files-block .file { .files-block .file {
...@@ -401,7 +388,6 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle ...@@ -401,7 +388,6 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
</div> </div>
</div> </div>
<iframe name="external_iframe" id="iframe" class="${classMap({hidden: !this.externalAuthInProgress})}"></iframe> <iframe name="external_iframe" id="iframe" class="${classMap({hidden: !this.externalAuthInProgress})}"></iframe>
<div id="iframe-block"></div>
<div class="field notification is-info ${classMap({hidden: !this.uploadInProgress})}"> <div class="field notification is-info ${classMap({hidden: !this.uploadInProgress})}">
<vpu-mini-spinner></vpu-mini-spinner> <vpu-mini-spinner></vpu-mini-spinner>
<strong>${this.uploadStatusFileName}</strong> <strong>${this.uploadStatusFileName}</strong>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment