Skip to content

Commit

Permalink
Fixed issue #5194: Impossible to create a new survey when interface l…
Browse files Browse the repository at this point in the history
…anguage is set to Catalan - patch provided by jpasquier

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@10144 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed May 29, 2011
1 parent c02e4a9 commit 261f8ea
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions admin/editsurveysettings.php
Expand Up @@ -29,12 +29,12 @@
//New survey, set the defaults
$esrow = array();
$esrow['active'] = 'N';
$esrow['allowjumps'] = 'N';
$esrow['allowjumps'] = 'N';
$esrow['format'] = 'G'; //Group-by-group mode
$esrow['template'] = $defaulttemplate;
$esrow['allowsave'] = 'Y';
$esrow['allowprev'] = 'N';
$esrow['nokeyboard'] = 'N';
$esrow['nokeyboard'] = 'N';
$esrow['printanswers'] = 'N';
$esrow['publicstatistics'] = 'N';
$esrow['publicgraphs'] = 'N';
Expand Down Expand Up @@ -311,7 +311,7 @@
. "</select></li>\n";

//Navigation Delay
if (!isset($esrow['navigationdelay']))
if (!isset($esrow['navigationdelay']))
{
$esrow['navigationdelay']=0;
}
Expand Down Expand Up @@ -872,7 +872,7 @@
$editsurvey .= ">".$clang->gT("No")."</option>\n"
. "</select></li>\n";

// Allow editing answers after completion
// Allow editing answers after completion
$editsurvey .= "<li><label for=''>".$clang->gT("Allow editing answers after completion?")."</label>\n"
. "<select id='alloweditaftercompletion' name='alloweditaftercompletion' onchange=\"javascript: if (document.getElementById('private').value == 'Y') {alert('".$clang->gT("This option can't be set if Anonymous answers are used","js")."'); this.value='N';}\">\n"
. "<option value='Y'";
Expand Down Expand Up @@ -1040,17 +1040,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";
}
}
}
Expand Down

0 comments on commit 261f8ea

Please sign in to comment.