View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05194 | Bug reports | Survey editing | public | 2011-05-24 14:45 | 2011-06-01 23:43 |
Reporter | Assigned To | c_schmitz | |||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.91 | ||||
Fixed in Version | 1.91+ | ||||
Summary | 05194: Impossible to create a new survey when interface language is set to catalan | ||||
Description | On our LimeSurvey install, which has catalan set as default language, whenever a user try to save a new survey, a javascript error shows up and stop the user to submit the form. The error says that there is an unterminated string literal | ||||
Steps To Reproduce | Set interface language to catalan | ||||
Additional Information | The problem comes from the javascript associated with the submit button. <button onclick='if (isEmpty(document.getElementById("surveyls_title"), "Error: Ha d\'introduir un títol per aquesta enquesta.")) .... To solve the problem, the onclick code must be enclosed with double quote " I join a patch that modify the editsurveyadmin.php file to correct this issue. | ||||
Tags | No tags attached. | ||||
Attached Files | editsurveyadmin.patch (2,630 bytes)
Index: admin/editsurveysettings.php =================================================================== --- admin/editsurveysettings.php (révision 10117) +++ admin/editsurveysettings.php (copie de travail) @@ -1035,17 +1035,17 @@ // The external button to submit Survey edit changes if ($action == "newsurvey") { - $cond = "if (isEmpty(document.getElementById(\"surveyls_title\"), \"" . $clang->gT("Error: You have to enter a title for this survey.", 'js') . "\"))"; - $editsurvey .= "<p><button onclick='$cond {document.getElementById(\"addnewsurvey\").submit();}' class='standardbtn' >" . $clang->gT("Save") . "</button></p>\n"; + $cond = "if (isEmpty(document.getElementById('surveyls_title'), '" . $clang->gT("Error: You have to enter a title for this survey.", 'js') . "'))"; + $editsurvey .= "<p><button onclick=\"$cond {document.getElementById('addnewsurvey').submit();}\" class='standardbtn' >" . $clang->gT("Save") . "</button></p>\n"; } elseif ($action == "editsurveysettings") { - $cond = "if (UpdateLanguageIDs(mylangs,\"" . $clang->gT("All questions, answers, etc for removed languages will be lost. Are you sure?", "js") . "\"))"; + $cond = "if (UpdateLanguageIDs(mylangs,'" . $clang->gT("All questions, answers, etc for removed languages will be lost. Are you sure?", "js") . "'))"; if (bHasSurveyPermission($surveyid,'surveysettings','update')) { - $editsurvey .= "<p><button onclick='$cond {document.getElementById(\"addnewsurvey\").submit();}' class='standardbtn' >" . $clang->gT("Save") . "</button></p>\n"; + $editsurvey .= "<p><button onclick=\"$cond {document.getElementById('addnewsurvey').submit();}\" class='standardbtn' >" . $clang->gT("Save") . "</button></p>\n"; } if (bHasSurveyPermission($surveyid,'surveylocale','read')) { - $editsurvey .= "<p><button onclick='$cond {document.getElementById(\"surveysettingsaction\").value = \"updatesurveysettingsandeditlocalesettings\"; document.getElementById(\"addnewsurvey\").submit();}' class='standardbtn' >" . $clang->gT("Save & edit survey text elements") . " >></button></p>\n"; + $editsurvey .= "<p><button onclick=\"$cond {document.getElementById('surveysettingsaction').value = 'updatesurveysettingsandeditlocalesettings'; document.getElementById('addnewsurvey').submit();}\" class='standardbtn' >" . $clang->gT("Save & edit survey text elements") . " >></button></p>\n"; } } } | ||||
Bug heat | 2 | ||||
Complete LimeSurvey version number (& build) | 10089 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MySQL 5 | ||||
Server OS (if known) | Linux | ||||
Webserver software & version (if known) | Apache 2 | ||||
PHP Version | 5.2.17 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-05-24 14:45 |
|
New Issue | |
2011-05-24 14:45 |
|
File Added: editsurveyadmin.patch | |
2011-05-24 14:54 |
|
Issue Monitored: user10199 | |
2011-05-24 14:54 |
|
Issue End Monitor: user10199 | |
2011-05-25 12:32 | c_schmitz | Assigned To | => c_schmitz |
2011-05-25 12:32 | c_schmitz | Status | new => assigned |
2011-05-29 08:53 | c_schmitz | Note Added: 15154 | |
2011-05-29 08:53 | c_schmitz | Status | assigned => resolved |
2011-05-29 08:53 | c_schmitz | Fixed in Version | => 1.91+ |
2011-05-29 08:53 | c_schmitz | Resolution | open => fixed |
2011-06-01 23:43 | c_schmitz | Note Added: 15230 | |
2011-06-01 23:43 | c_schmitz | Status | resolved => closed |
2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |