贴吧不能新建成功的时候 也没有给出任何提示

This commit is contained in:
lizanle 2015-09-19 13:43:59 +08:00
parent 604e7ca56d
commit cddb3deb35
1 changed files with 4 additions and 6 deletions

View File

@ -49,12 +49,9 @@
}); });
}); });
function check_and_submit(doc){ function check_and_submit(doc){
$("#error").hide(); $("#error").html('').hide();
if( check_pass == false){ check_forum_name();
$("#error").html("贴吧名称已经存在").show(); if( $("input[name='forum[name]']").val().trim() == "" || $("input[name='forum[description]']").val().trim() == "" ){
return;
}
if( $("input[name='forum[name]']").val().trim == "" || $("input[name='forum[description]']").val().trim == "" || check_pass == false){
$("#error").html("名称和描述未填写正确").show(); $("#error").html("名称和描述未填写正确").show();
return; return;
}else{ }else{
@ -63,6 +60,7 @@
} }
var check_pass = true; var check_pass = true;
function check_forum_name(){ function check_forum_name(){
check_pass = true;
name = $("input[name='forum[name]']").val().trim(); name = $("input[name='forum[name]']").val().trim();
if( name != ""){ if( name != ""){
$.get( $.get(