From 7f8a4dbe8724599bd4b4c626a5564c6e25de8938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 17 Jul 2019 19:54:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/libraries/_form.html.erb | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb index 9904f602..e102e8d4 100644 --- a/app/views/libraries/_form.html.erb +++ b/app/views/libraries/_form.html.erb @@ -23,6 +23,7 @@ <%= f.text_field :author_name, placeholder: '请输入姓名', class: 'greyInput winput-300-35 mr20 fl winput150', width: '163', size: 30 %>
请输入姓名
+ 字数不能超过10个字请输入作者单位名称
@@ -151,13 +152,13 @@ $("#title_notice").addClass("none"); } - if (!title || title.length >10) { - $("#title_notice").removeClass("none"); - $("#title_notice").html("字数不能超过10个字"); - return - }else{ - $("#title_notice").addClass("none"); - } + // if (!title || title.length >10) { + // $("#title_notice").removeClass("none"); + // $("#title_notice").html("字数不能超过10个字"); + // return + // }else{ + // $("#title_notice").addClass("none"); + // } if (!content || content.length == 0) { @@ -166,13 +167,24 @@ }else{ $("#des_notice").addClass("none"); } + + if (!author_name || author_name.length == 0) { $("#author_name_notice").removeClass("none"); return }else{ $("#author_name_notice").addClass("none"); } - if (!author_school_name || author_school_name.length == 0) { + + if (!author_name || author_name.length >10) { + $("#title_author_name").removeClass("none"); + return + }else{ + $("#title_author_name").addClass("none"); + } + + + if (!author_school_name || author_school_name.length == 0) { $("#author_school_name_notice").removeClass("none"); return }else{