summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-03 08:03:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-03 08:03:25 +0000
commit1acf1d6bf74d09a6819666f347f3a75c35876a90 (patch)
tree4801c1c97572ff497ae7d4195f24c018ce892d11 /app/views/projects
parent08664b37429c2fd2a802cca635cbb7de0df1025f (diff)
downloadredmine-1acf1d6bf74d09a6819666f347f3a75c35876a90.tar.gz
redmine-1acf1d6bf74d09a6819666f347f3a75c35876a90.zip
Adds a warning for when a user with inherited permissions disables inheritance (#5605).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11310 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_form.html.erb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index eb74c5251..c259c9039 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -73,3 +73,17 @@
<%= javascript_include_tag 'project_identifier' %>
<% end %>
<% end %>
+
+<% if @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
+ <%= javascript_tag do %>
+ $(document).ready(function() {
+ $("#project_inherit_members").change(function(){
+ if (!$(this).is(':checked')) {
+ if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
+ $("#project_inherit_members").attr("checked", true);
+ }
+ }
+ });
+ });
+ <% end %>
+<% end %>