From a563ba644ec2a260f515184c98a4bcc8b7d0d077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 3 Oct 2024 13:56:16 +0200 Subject: [PATCH] clean the file from code in error --- .../public/page/workflow-show/index.js | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/page/workflow-show/index.js b/src/Bundle/ChillMainBundle/Resources/public/page/workflow-show/index.js index 1536417b1..0b19c316a 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/page/workflow-show/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/page/workflow-show/index.js @@ -1,27 +1,19 @@ import {ShowHide} from 'ChillMainAssets/lib/show_hide/show_hide.js'; window.addEventListener('DOMContentLoaded', function() { - let + const divTransitions = document.querySelector('#transitions'), - futureDestUsersContainer = document.querySelector('#futureDests') - personSignatureField = document.querySelector('#person-signature-field'); - userSignatureField = document.querySelector('#user-signature-field'); - signatureTypeChoices = document.querySelector('#signature-type-choice'); - personChoice = document.querySelector('#workflow_step_isPersonOrUserSignature_0'); - userChoice = document.querySelector('#workflow_step_isPersonOrUserSignature_1'); - signatureZone = document.querySelector('#signature-zone'); - ; - - let - transitionFilterContainer = document.querySelector('#transitionFilter'), - transitionsContainer = document.querySelector('#transitions') + futureDestUsersContainer = document.querySelector('#futureDests'), + personSignatureField = document.querySelector('#person-signature-field'), + userSignatureField = document.querySelector('#user-signature-field'), + signatureTypeChoices = document.querySelector('#signature-type-choice'), + personChoice = document.querySelector('#workflow_step_isPersonOrUserSignature_0'), + userChoice = document.querySelector('#workflow_step_isPersonOrUserSignature_1'), + signatureZone = document.querySelector('#signature-zone'), + transitionFilterContainer = document.querySelector('#transitionFilter'), + transitionsContainer = document.querySelector('#transitions') ; - // ShowHide instance for signatureTypeChoices. This should always be present in the DOM and we toggle visibility. - // The field is not mapped and so not submitted with the form. Without it's presence upon DOM loading other show hides do not function well. - signatureTypeChoices.style.display = 'none'; - - // ShowHide instance for future dest users new ShowHide({ debug: false, @@ -34,13 +26,11 @@ window.addEventListener('DOMContentLoaded', function() { if (input.checked) { const inputData = JSON.parse(input.getAttribute('data-is-signature')) if (inputData.includes('person') || inputData.includes('user')) { - signatureTypeChoices.style.display = ''; return false; } else { personChoice.checked = false userChoice.checked = false - signatureTypeChoices.style.display = 'none'; return true; } } @@ -62,7 +52,6 @@ window.addEventListener('DOMContentLoaded', function() { if (input.checked) { const inputData = JSON.parse(input.getAttribute('data-is-signature')) if (inputData.includes('person') || inputData.includes('user')) { - signatureTypeChoices.style.display = ''; return true; } }