diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 54ab2d8c4..5a7fe3f2d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,6 +4,7 @@ - Survey summaries now added. In the Survey edit, select quiz mode, and a summary will be shown to the user at the end of the survey. - fixed #10110: Matrix 2.0 - "Data Error" on Pending Product Listing Updates - rfe #9965: matrix/pls reverse dropped event variables + - fixed install of Passive Analytics settings for new sites 7.7.2 - fixed #10056: YUI javascripts included while adminOff (BNC) - fixed a bug that required you to hit "update cart" before the checkout diff --git a/docs/upgrades/packages-7.7.3/root_import_survey_default-survey-edit.wgpkg b/docs/upgrades/packages-7.7.3/root_import_survey_default-survey-edit.wgpkg new file mode 100644 index 000000000..bcf746dbf Binary files /dev/null and b/docs/upgrades/packages-7.7.3/root_import_survey_default-survey-edit.wgpkg differ diff --git a/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm b/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm index 458d6db7d..f74d8984c 100644 --- a/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm +++ b/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm @@ -1200,15 +1200,12 @@ Returns an array of messages to inform a user what is logically wrong with the S sub validateSurvey{ my $self = shift; - #check all goto's - #bad goto expressions - #check that all survey is able to be seen my @messages; #set up valid goto targets my $gotoTargets = $self->getGotoTargets(); - my $goodTargets; + my $goodTargets = {}; my $duplicateTargets; for my $g (@{$gotoTargets}) { $goodTargets->{$g}++; diff --git a/lib/WebGUI/i18n/English/Asset_Survey.pm b/lib/WebGUI/i18n/English/Asset_Survey.pm index 302a2a986..5e4efd943 100644 --- a/lib/WebGUI/i18n/English/Asset_Survey.pm +++ b/lib/WebGUI/i18n/English/Asset_Survey.pm @@ -67,6 +67,10 @@ our $I18N = { message => q|Delete|, lastUpdated => 1224686319 }, + 'warnings' => { + message => q|Warnings|, + lastUpdated => 0 + }, 'section number' => { message => q|Section Number:|, lastUpdated => 1224686319 @@ -355,9 +359,9 @@ our $I18N = { lastUpdated => 0 }, 'jump expression description' => { - message => q|An expression used to control complex branching based user responses to previous questions.|, + message => q|An expression used to control complex branching based user responses to previous questions. Ignored unless enableSurveyExpressionEngine enabled in your site config file.|, context => q|Description of the 'jump expression' field, used as hoverhelp in the edit answer dialog.|, - lastUpdated => 0 + lastUpdated => 1239259550 }, 'text answer' => { message => q|TextArea|, diff --git a/www/extras/wobject/Survey/editsurvey.js b/www/extras/wobject/Survey/editsurvey.js index bad386699..509e231f6 100644 --- a/www/extras/wobject/Survey/editsurvey.js +++ b/www/extras/wobject/Survey/editsurvey.js @@ -56,9 +56,17 @@ Survey.Data = (function(){ focus = d.address;//What is the current highlighted item. var warnings = ""; for(var w in d.warnings){ - warnings = warnings + "
" + d.warnings[w]; + warnings += "
" + d.warnings[w] + "
"; + } + if (document.getElementById('warnings')) { + if (warnings !== "") { + document.getElementById('warnings').innerHTML = warnings; + YAHOO.util.Dom.setStyle('warnings-outer', 'display', 'block'); + } + else { + YAHOO.util.Dom.setStyle('warnings-outer', 'display', 'none'); + } } - document.getElementById('warnings').innerHTML = warnings; var showEdit = 1; if (lastId.toString() === d.address.toString()) { showEdit = 0; diff --git a/www/extras/wobject/Survey/surveyedit.css b/www/extras/wobject/Survey/surveyedit.css index c9853549d..1740e13a4 100644 --- a/www/extras/wobject/Survey/surveyedit.css +++ b/www/extras/wobject/Survey/surveyedit.css @@ -171,3 +171,13 @@ li.newAnswer { width:15em; margin-top:0.5em; } + +#warnings-outer { + margin: 5px; + padding: 0 5px; + border: 1px solid; + color: red; +} +#warnings { + color: red; +}