Loading src/UnicaenAutoform/Service/Formulaire/FormulaireReponseService.php +2 −2 Changes for src/UnicaenAutoform/Service/Formulaire/FormulaireReponseService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ class FormulaireReponseService case Champ::TYPE_SELECT_TEXT : if (isset($data[$champ->getId()])) { $value = $data[$champ->getId()]; if ($value != null && str_ends_with($data[$champ->getId()], '*') && isset($data['text_complementaire'])) { return $data[$champ->getId()] . ":::" . $data['text_complementaire']; if ($value != null && str_ends_with($data[$champ->getId()], '*') && isset($data['text_complementaire_'.$champ->getId()])) { return $data[$champ->getId()] . ":::" . $data['text_complementaire'.$champ->getId()]; } else { return ($value !== 'null') ? $value : null; } Loading src/UnicaenAutoform/View/Helper/partial/input/select_text.phtml +6 −6 Changes for src/UnicaenAutoform/View/Helper/partial/input/select_text.phtml: 6 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ $reponse = explode(':::', $reponse); <div class="col-sm-9"> <input class="form-control" type="text" id="text_complementaire" name="text_complementaire" style="display:none" id="text_complementaire_<?php echo $champ->getId()?>" name="text_complementaire" style="display:none" <?php if (isset($reponse[1])): ?> value="<?php echo trim($reponse); ?>" <?php else: ?> Loading @@ -48,14 +48,14 @@ $reponse = explode(':::', $reponse); function showComplement(option) { console.log(option.substring(option.length - 1)); if (option != "") { if (option.substring(option.length - 1) == '*') { document.getElementById("text_complementaire").style.display = ''; if (option !== "") { if (option.substring(option.length - 1) === '*') { document.getElementById("text_complementaire"+option.value).style.display = ''; } else { document.getElementById("text_complementaire").style.display = 'none'; document.getElementById("text_complementaire"+option.value).style.display = 'none'; } } else { document.getElementById("text_complementaire").style.display = 'none'; document.getElementById("text_complementaire"+option.value).style.display = 'none'; } } </script> Loading Loading
src/UnicaenAutoform/Service/Formulaire/FormulaireReponseService.php +2 −2 Changes for src/UnicaenAutoform/Service/Formulaire/FormulaireReponseService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ class FormulaireReponseService case Champ::TYPE_SELECT_TEXT : if (isset($data[$champ->getId()])) { $value = $data[$champ->getId()]; if ($value != null && str_ends_with($data[$champ->getId()], '*') && isset($data['text_complementaire'])) { return $data[$champ->getId()] . ":::" . $data['text_complementaire']; if ($value != null && str_ends_with($data[$champ->getId()], '*') && isset($data['text_complementaire_'.$champ->getId()])) { return $data[$champ->getId()] . ":::" . $data['text_complementaire'.$champ->getId()]; } else { return ($value !== 'null') ? $value : null; } Loading
src/UnicaenAutoform/View/Helper/partial/input/select_text.phtml +6 −6 Changes for src/UnicaenAutoform/View/Helper/partial/input/select_text.phtml: 6 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ $reponse = explode(':::', $reponse); <div class="col-sm-9"> <input class="form-control" type="text" id="text_complementaire" name="text_complementaire" style="display:none" id="text_complementaire_<?php echo $champ->getId()?>" name="text_complementaire" style="display:none" <?php if (isset($reponse[1])): ?> value="<?php echo trim($reponse); ?>" <?php else: ?> Loading @@ -48,14 +48,14 @@ $reponse = explode(':::', $reponse); function showComplement(option) { console.log(option.substring(option.length - 1)); if (option != "") { if (option.substring(option.length - 1) == '*') { document.getElementById("text_complementaire").style.display = ''; if (option !== "") { if (option.substring(option.length - 1) === '*') { document.getElementById("text_complementaire"+option.value).style.display = ''; } else { document.getElementById("text_complementaire").style.display = 'none'; document.getElementById("text_complementaire"+option.value).style.display = 'none'; } } else { document.getElementById("text_complementaire").style.display = 'none'; document.getElementById("text_complementaire"+option.value).style.display = 'none'; } } </script> Loading