diff --git a/www/extras/wobject/Survey/administersurvey.js b/www/extras/wobject/Survey/administersurvey.js index f52f732d8..238f2efdc 100644 --- a/www/extras/wobject/Survey/administersurvey.js +++ b/www/extras/wobject/Survey/administersurvey.js @@ -86,7 +86,7 @@ YAHOO.util.Event.addListener("testB", "click", function(){Survey.Comm.callServer var b = new YAHOO.widget.Button({ type: "checkbox", label: a.answerText, id: a.Survey_answerId+'button', name: a.Survey_answerId+'button', value: a.Survey_answerId, container: a.Survey_answerId+"container", checked: false }); - b.on("click", this.buttonChanged,[b,a.Survey_questionId,q.maxAnswers,butts]); + b.on("click", this.buttonChanged,[b,a.Survey_questionId,q.maxAnswers,butts,qs.length]); b.hid = a.Survey_answerId; butts.push(b); } @@ -278,6 +278,7 @@ YAHOO.util.Event.addListener("testB", "click", function(){Survey.Comm.callServer var qid = objs[1]; var maxA = objs[2]; var butts = objs[3]; + var qsize = objs[4]; max = parseInt(max); if(maxA == 1){ for(var i in butts){ @@ -302,6 +303,9 @@ YAHOO.util.Event.addListener("testB", "click", function(){Survey.Comm.callServer document.getElementById(qid+'max').innerHTML = parseInt(max+1); document.getElementById(b.hid).value = 1; } + if(qsize == 1){ + Survey.Form.formsubmit(); + } } }(); diff --git a/www/extras/wobject/Survey/editsurvey/question.js b/www/extras/wobject/Survey/editsurvey/question.js index 49990a482..11edd7b84 100644 --- a/www/extras/wobject/Survey/editsurvey/question.js +++ b/www/extras/wobject/Survey/editsurvey/question.js @@ -27,7 +27,7 @@ Survey.QuestionTemplate = new function(){ else{ html = html + "\n"; } - html = html + "

Question custom variable name:"; + html = html + "

Question custom variable name:

"; html = html + "

Randomize answers:"; html = html+ this.makeRadio('randomizeAnswers',[{text:'Yes',value:1},{text:'No',value:0}],params.randomizeAnswers); diff --git a/www/extras/wobject/Survey/editsurvey/section.js b/www/extras/wobject/Survey/editsurvey/section.js index d95ce86a7..11d00b05b 100644 --- a/www/extras/wobject/Survey/editsurvey/section.js +++ b/www/extras/wobject/Survey/editsurvey/section.js @@ -29,6 +29,7 @@ Survey.SectionTemplate = new function(){ Yes\ No"; } + html = html + "

Section custom variable name:

"; html = html + "\

Question per Page:\