From a15806715015f2cb323574550f93df86eb1095c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:39:53 +0100 Subject: [PATCH] Improved error feedback when empty required inputs are submitted --- htdocs/langs/en_US/opensurvey.lang | 1 - htdocs/opensurvey/wizard/create_survey.php | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 5c24f982aba..ce6987f4bac 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Your email address ToReceiveEMailForEachVote=To receive an email for each vote TypeDate=Type date TypeClassic=Type standard -FieldMandatory=Field mandatory OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it RemoveAllDays=Remove all days CopyHoursOfFirstDay=Copy hours of first day diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index ad849ded5bb..6e1927b7f2b 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -142,7 +142,7 @@ print ''."\n"; print ''."\n"; if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { - setEventMessage($langs->trans("FieldMandatory"), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PollTitle")), 'errors'); } print ''."\n"; @@ -154,7 +154,7 @@ print 'trans("FieldMandatory"), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("OpenSurveyYourName")), 'errors'); } print ''."\n"; @@ -164,7 +164,7 @@ print 'trans("FieldMandatory"), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("OpenSurveyYourEMail")), 'errors'); } elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { $langs->load('errors');
'. $langs->trans("PollTitle") .'