From b3dd456a37eb133b86ca0bc009b7c36b06881e00 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 8 Dec 2020 12:53:13 +0100 Subject: [PATCH 1/2] fix survey module --- htdocs/opensurvey/wizard/create_survey.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 73413f3255d..51ae2f1aa3e 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -39,7 +39,7 @@ $title = GETPOST('title'); $description = GETPOST('description', 'restricthtml'); $mailsonde = GETPOST('mailsonde'); $creation_sondage_date = GETPOST('creation_sondage_date'); -$creation_sondage_date = GETPOST('creation_sondage_date'); +$creation_sondage_autre = GETPOST('creation_sondage_autre'); // We init some session variable to avoir warning $session_var = array('title', 'description', 'mailsonde'); @@ -53,7 +53,7 @@ $cocheplus = ''; $cochemail = ''; // Jump to correct page -if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) +if (!empty($creation_sondage_date) || !empty($creation_sondage_autre)) { $_SESSION["title"] = $title; $_SESSION["description"] = $description; @@ -98,7 +98,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) if (!$testdate) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("ExpireDate")), null, 'errors'); } - +var_dump($creation_sondage_date,$creation_sondage_autre); if ($title && $testdate) { if (!empty($creation_sondage_date)) @@ -163,7 +163,7 @@ print dol_get_fiche_end(); //focus javascript sur le premier champ print ''."\n"; print '
'."\n"; From eed7f57f98cb718b03db2ff92632f5d603795e88 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 8 Dec 2020 12:54:14 +0100 Subject: [PATCH 2/2] fix survey module --- htdocs/opensurvey/wizard/create_survey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 51ae2f1aa3e..cbeb448d2d7 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -98,7 +98,7 @@ if (!empty($creation_sondage_date) || !empty($creation_sondage_autre)) if (!$testdate) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("ExpireDate")), null, 'errors'); } -var_dump($creation_sondage_date,$creation_sondage_autre); + if ($title && $testdate) { if (!empty($creation_sondage_date))