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

This commit is contained in:
lizanle 2015-09-19 12:49:25 +08:00
parent acbbd0d7be
commit 604e7ca56d
1 changed files with 7 additions and 2 deletions

View File

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