班级问卷:新建问卷时,如图不输入标题及描述直接点击“取消”,再点击保存或发布,却提示保存成功和发布成功

This commit is contained in:
cxt 2016-11-07 15:44:40 +08:00
parent 4c9a3b769e
commit 356fbfe792
1 changed files with 4 additions and 0 deletions

View File

@ -566,6 +566,8 @@ function insert_MCQ(quest_type,quest_id){
var forms = $("form.new_poll_question"); var forms = $("form.new_poll_question");
if($("#polls_head_edit").is(":visible")){ if($("#polls_head_edit").is(":visible")){
alert("请先保存问卷标题及问卷描述。"); alert("请先保存问卷标题及问卷描述。");
}else if($.trim($("#polls_name_h").html()) == ""){
alert("问卷标题不能为空");
}else if(forms.length > 0){ }else if(forms.length > 0){
alert("请先保存正在编辑的题目。"); alert("请先保存正在编辑的题目。");
} else { } else {
@ -585,6 +587,8 @@ function insert_MCQ(quest_type,quest_id){
var forms = $("form.new_poll_question"); var forms = $("form.new_poll_question");
if($("#polls_head_edit").is(":visible")){ if($("#polls_head_edit").is(":visible")){
alert("请先保存问卷标题及问卷描述。"); alert("请先保存问卷标题及问卷描述。");
}else if($.trim($("#polls_name_h").html()) == ""){
alert("问卷标题不能为空");
}else if(forms.length > 0){ }else if(forms.length > 0){
alert("请先保存正在编辑的题目再发布。"); alert("请先保存正在编辑的题目再发布。");
} else{ } else{