From dcf9cb3de47f96f30c42c75deebd9a518f65cc8c Mon Sep 17 00:00:00 2001 From: ouidade Date: Thu, 6 Jan 2022 08:12:00 +0100 Subject: [PATCH] display none message druppal form faq --- web/themes/custom/eql/css-compiled/styles.css | 19 ++++++--- web/themes/custom/eql/scripts/main.js | 14 +++++++ .../custom/eql/scss/pages/_webform.scss | 41 +++++++++++++++---- 3 files changed, 61 insertions(+), 13 deletions(-) diff --git a/web/themes/custom/eql/css-compiled/styles.css b/web/themes/custom/eql/css-compiled/styles.css index 82db5b2..4c7673a 100644 --- a/web/themes/custom/eql/css-compiled/styles.css +++ b/web/themes/custom/eql/css-compiled/styles.css @@ -2104,6 +2104,8 @@ a { margin-left: 13%; margin-right: 20%; width: 60%; } + .path-webform .region-content [role="contentinfo"] { + display: none; } .path-webform .region-content .block-system-main-block h2 { display: none; } .path-webform .region-content #webform-submission-deposer-une-contribution-add-form { @@ -2112,20 +2114,25 @@ a { flex-wrap: wrap; flex-basis: auto; justify-content: space-between; - margin-top: 10vh; } - .path-webform .region-content #webform-submission-deposer-une-contribution-add-form input.required::after { - content: " - Remember this"; - background-color: yellow; - color: red; - font-weight: bold; } + margin-top: 10vh; + overflow: visible; } + .path-webform .region-content #webform-submission-deposer-une-contribution-add-form .required { + border-color: red !important; + display: block; + content: " "; } + .path-webform .region-content #webform-submission-deposer-une-contribution-add-form .required::after { + content: " * "; } .path-webform .region-content #webform-submission-deposer-une-contribution-add-form #edit-processed-text { width: 100%; } .path-webform .region-content #webform-submission-deposer-une-contribution-add-form .form-item-titre-du-document { margin-top: 2rem; width: 100%; } .path-webform .region-content #webform-submission-deposer-une-contribution-add-form .form-item-titre-du-document input { + overflow: visible; width: 100%; height: 5rem; } + .path-webform .region-content #webform-submission-deposer-une-contribution-add-form .form-item-titre-du-document input ::placeholder { + content: "Titre du document"; } .path-webform .region-content #webform-submission-deposer-une-contribution-add-form .form-item-auteur-s- { margin-top: 2rem; width: 100%; } diff --git a/web/themes/custom/eql/scripts/main.js b/web/themes/custom/eql/scripts/main.js index efae4d4..d5eb848 100644 --- a/web/themes/custom/eql/scripts/main.js +++ b/web/themes/custom/eql/scripts/main.js @@ -37,6 +37,20 @@ function toggleFaq(event) { answer.classList.add('opened'); } +// fleche qui tourne faq +var questions = document.getElementsByClassName("field--name-field-question"); + +for (let i = 0; i < questions.length; i++) { + const question = questions[i] + question.addEventListener("click", toggleFaq); +} +function rotateFleche(event) { + console.log(event, this); + for (let i = 0; i < answers.length; i++) { + answers[i].classList.remove('opened'); + } +} + // ///////////////// diff --git a/web/themes/custom/eql/scss/pages/_webform.scss b/web/themes/custom/eql/scss/pages/_webform.scss index 4bdef75..f303222 100644 --- a/web/themes/custom/eql/scss/pages/_webform.scss +++ b/web/themes/custom/eql/scss/pages/_webform.scss @@ -3,6 +3,12 @@ margin-left: 13%; margin-right: 20%; width: 60%; + // div:nth-of-type(2):not(#edit-actions):not(.form-item-couriel-mail-2):not(.form-item-titre-du-document):not(.form-item-intitule-de-l-offre-de-service){ + // display: none; + // } + [role="contentinfo"]{ + display: none; + } // #block-contenudelapageprincipale{ .block-system-main-block{ @@ -21,13 +27,18 @@ // input:not(:placeholder-shown) ~ label { // z-index: -1; // } - input.required::after{ - content: " - Remember this"; - background-color: yellow; - color: red; - font-weight: bold; - - } + + overflow: visible; + .required{ + border-color: red !important; + display: block; + content: " "; + } + + .required::after{ + content: " * "; + } + #edit-processed-text{ width: 100%; } @@ -36,9 +47,22 @@ margin-top: 2rem; width: 100%; input{ + overflow: visible; width: 100%; height: 5rem; + ::placeholder{ + content:"Titre du document"; + } + // &::after{ + + // display: block; + // content: " "; + // color: red; + // background-image: url("../images/pictos/twitter_black.svg"); + // font-size: 10rem; + // } } + } .form-item-auteur-s-{ @@ -147,6 +171,7 @@ input{ width: 100%; height: 5rem; + } } @@ -222,6 +247,8 @@ justify-content: space-between; margin-top: 10vh; + + #edit-couriel--wrapper{ width: 100%; .form-item-couriel-mail-1{