diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb
index 429be7ff0..09755a80a 100644
--- a/app/views/forums/index.html.erb
+++ b/app/views/forums/index.html.erb
@@ -68,10 +68,17 @@
function check_and_submit(doc){
$("#error").html('').hide();
check_forum_name();
- if( $("textarea[name='forum[name]']").val().trim() == "" || $("textarea[name='forum[description]']").val().trim() == "" ){
- $("#error").html("名称和描述未填写正确").show();
+ if( $("textarea[name='forum[name]']").val().trim() == "" && $("textarea[name='forum[description]']").val().trim() != "" ){
+ $("#error").html("名称不能为空").show();
return;
- }else{
+ } else if( $("textarea[name='forum[description]']").val().trim() == "" && $("textarea[name='forum[name]']").val().trim() != "" ){
+ $("#error").html("描述不能为空").show();
+ return;
+ }else if($("textarea[name='forum[description]']").val().trim() == "" && $("textarea[name='forum[name]']").val().trim() == ""){
+ $("#error").html("名称和描述不能为空").show();
+ return;
+ }
+ else{
doc.parent().parent().submit();
}
}