Skip to content

Commit

Permalink
Fixed some Javascript notices in the code tht checks if Other input f…
Browse files Browse the repository at this point in the history
…ields have been filled conforming to other_comment_mandatory attribute

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@7090 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Thibault Le Meur committed Jun 12, 2009
1 parent 2b81910 commit aefa500
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions qanda.php
Expand Up @@ -1405,8 +1405,9 @@ function do_list_dropdown($ia)
. "\t\t\t\t\t\treturn false;\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t\telse {\n"
. "\t\t\t\t\t\tresult=oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\treturn result;\n"
. "\t\t\t\t\t\tif(typeof oldonsubmitOther_{$ia[0]} == 'function') {\n"
. "\t\t\t\t\t\t\treturn oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\t}\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t}\n"
. "\t\t\t\tdocument.limesurvey.onsubmit = ensureOther_{$ia[0]};\n"
Expand Down Expand Up @@ -1587,8 +1588,9 @@ function do_list_flexible_dropdown($ia)
. "\t\t\t\t\t\treturn false;\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t\telse {\n"
. "\t\t\t\t\t\tresult=oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\treturn result;\n"
. "\t\t\t\t\t\tif(typeof oldonsubmitOther_{$ia[0]} == 'function') {\n"
. "\t\t\t\t\t\t\treturn oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\t}\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t}\n"
. "\t\t\t\tdocument.limesurvey.onsubmit = ensureOther_{$ia[0]};\n"
Expand Down Expand Up @@ -1805,8 +1807,9 @@ function do_list_radio($ia)
. "\t\t\t\t\t\treturn false;\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t\telse {\n"
. "\t\t\t\t\t\tresult=oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\treturn result;\n"
. "\t\t\t\t\t\tif(typeof oldonsubmitOther_{$ia[0]} == 'function') {\n"
. "\t\t\t\t\t\t\treturn oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\t}\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t}\n"
. "\t\t\t\tdocument.limesurvey.onsubmit = ensureOther_{$ia[0]};\n"
Expand Down Expand Up @@ -2027,8 +2030,9 @@ function do_list_flexible_radio($ia)
. "\t\t\t\t\t\treturn false;\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t\telse {\n"
. "\t\t\t\t\t\tresult=oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\treturn result;\n"
. "\t\t\t\t\t\tif(typeof oldonsubmitOther_{$ia[0]} == 'function') {\n"
. "\t\t\t\t\t\t\treturn oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\t}\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t}\n"
. "\t\t\t\tdocument.limesurvey.onsubmit = ensureOther_{$ia[0]};\n"
Expand Down Expand Up @@ -2806,8 +2810,9 @@ function excludeAllOthers$ia[1](value, doconditioncheck)
. "\t\t\t\t\tothercboxval=document.getElementById('answer".$myfname."cbox').checked;\n"
. "\t\t\t\t\totherval=document.getElementById('answer".$myfname."').value;\n"
. "\t\t\t\t\tif (otherval != '' || othercboxval != true) {\n"
. "\t\t\t\t\t\tresult=oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\treturn result;\n"
. "\t\t\t\t\t\tif(typeof oldonsubmitOther_{$ia[0]} == 'function') {\n"
. "\t\t\t\t\t\t\treturn oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\t}\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t\telse {\n"
. "\t\t\t\t\t\talert('".sprintf($clang->gT("You've marked the \"other\" field for question \"%s\". Please also fill in the accompanying \"other comment\" field.","js"),trim(javascript_escape($ia[3],true,true)))."');\n"
Expand Down Expand Up @@ -3114,8 +3119,9 @@ function do_multiplechoice_withcomments($ia)
. "\t\t\t\t\t\treturn false;\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t\telse {\n"
. "\t\t\t\t\t\tresult=oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\treturn result;\n"
. "\t\t\t\t\t\tif(typeof oldonsubmitOther_{$ia[0]} == 'function') {\n"
. "\t\t\t\t\t\t\treturn oldonsubmitOther_{$ia[0]}();\n"
. "\t\t\t\t\t\t}\n"
. "\t\t\t\t\t}\n"
. "\t\t\t\t}\n"
. "\t\t\t\tdocument.limesurvey.onsubmit = ensureOther_{$ia[0]};\n"
Expand Down

0 comments on commit aefa500

Please sign in to comment.