From 1acf1d6bf74d09a6819666f347f3a75c35876a90 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 3 Feb 2013 08:03:25 +0000 Subject: [PATCH] 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 --- app/views/projects/_form.html.erb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 %> -- 2.39.5