diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb
index 6d4af4b3..44c2ee1c 100644
--- a/app/views/libraries/_form.html.erb
+++ b/app/views/libraries/_form.html.erb
@@ -6,20 +6,25 @@
标题
- <%= f.text_field :title, placeholder: '例如:软件工程教学案例', class: 'greyInput winput-240-35 mr20 fl' %>
+
+ <%= f.text_field :title, placeholder: '例如:软件工程教学案例', class: 'greyInput winput-240-35 mr20 fl' %>
+ 请输入标题
+
简明扼要介绍文档&视频所包含的主要的内容
<%= render partial: 'attachments/from_libraries', locals: { container: @library } %>
+
请上传附件
描述
-
+
<%= f.text_area :content %>
+
请输入描述内容
@@ -85,17 +90,23 @@
var content = $("textarea[name='library[content]']").val();
if (!title || title.length == 0) {
- alert('请输入标题');
+ $("#title_notice").removeClass("none");
return
+ }else{
+ $("#title_notice").addClass("none");
}
if (!content || content.length == 0) {
- alert('请输入描述');
+ $("#des_notice").removeClass("none");
return
+ }else{
+ $("#des_notice").addClass("none");
}
if($('.attachments_fields .attachment').length == 0){
- alert('请上传附件');
+ $("#file_notice").removeClass("none");
return
+ }else{
+ $("#file_notice").addClass("none");
}
$('.library-form-container form').submit();
@@ -109,7 +120,7 @@
var message = '<%= flash[:message] %>';
if (message.length > 0) {
- alert(message);
+ sure_confirm_box("提示",450,200,message);
}
})
\ No newline at end of file