diff --git a/app/views/organizations/new.html.erb b/app/views/organizations/new.html.erb
index ea7fbbb30..e12bf3849 100644
--- a/app/views/organizations/new.html.erb
+++ b/app/views/organizations/new.html.erb
@@ -30,14 +30,15 @@
-
+
(打钩为公开,不打钩则不公开,若不公开,仅组织成员可见该组织。)
-
+
(打钩为允许游客下载文件)
+
diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb
index 9ec118bec..b9b2f9b4c 100644
--- a/app/views/organizations/setting.html.erb
+++ b/app/views/organizations/setting.html.erb
@@ -63,11 +63,12 @@
公开 :
- class="ml3" />
+ class="ml3" />
下载支持 :
- class="ml3" />
+ name="organization[allow_guest_download]" <%= @organization.allow_guest_download ? 'checked': ''%> class="ml3" />
允许游客下载
+ <%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %>
保存
<% end %>
@@ -187,4 +188,13 @@
$("#apply_hint").text("子域名命名不规范,只能包含字母、数字和下划线,请重新输入");
}
}
+
+// $(document).ready(function(){
+// if ( $("#is_public").attr("checked") != true){
+// alert($(this).attr("checked"));
+// $("#allow_download").attr("checked", false);
+// $("#allow_download").attr("disabled", true);
+// $("#allow_down_hint").html("");
+// }
+// });
\ No newline at end of file
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index f982d92f6..8fba6770a 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1135,3 +1135,16 @@ function chooseSendType(res_id,res_ids, user_id, send_type){
}
lastSendType = sendType;
}
+
+function disable_down(source, des, hint){
+ if (source.attr("checked")){
+ des.attr("disabled", false);
+ hint.html("");
+ }
+ else{
+ des.attr("checked", false);
+ des.attr("disabled", true);
+ hint.html("(私有组织不允许游客下载资源)");
+
+ }
+}