Skip to content

Commit

Permalink
NTR: hide status change
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik authored and boxblinkracer committed Sep 18, 2023
1 parent a16483e commit 6d42fc8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Resources/views/mollie/pos/checkout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
</a>
</div>
{% if changeStatusUrl %}
<a href="{{ changeStatusUrl }}" title="Change Status in Test Mode" target="_blank" class="m-button">
<a href="{{ changeStatusUrl }}" title="Change Status in Test Mode" target="_blank" id="statusChange" class="m-button">
Change Status in Test Mode
<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M17.17 32.92l9.17-9.17-9.17-9.17 2.83-2.83 12 12-12 12z"/><path d="M0-.25h48v48h-48z" fill="none"/></svg>
</a>
Expand All @@ -214,6 +214,7 @@

<script>
const returnButton = document.getElementById('returnButton');
const statusChangeButton = document.getElementById('statusChange');
const loadingElements = Array.from(document.getElementsByClassName('loading'));
const successElements = Array.from(document.getElementsByClassName('success'));
const failedElements = Array.from(document.getElementsByClassName('failed'));
Expand All @@ -228,6 +229,9 @@
if (json.ready) {
clearInterval(interval);
if(statusChangeButton !== null){
statusChangeButton.style.display = 'none';
}
loadingElements.forEach(function(element){
element.style.display = 'none';
});
Expand Down Expand Up @@ -255,7 +259,9 @@
loadingElements.forEach(function(element){
element.style.display = 'none';
});
if(statusChangeButton !== null){
statusChangeButton.style.display = 'none';
}
returnButton.style.display = 'block';
returnButton.href= json.redirectUrl;
Expand Down

0 comments on commit 6d42fc8

Please sign in to comment.