From 88d65c514927094e348010d31fa17fcd2a60bd69 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 6 Jan 2011 21:02:19 +0000 Subject: [PATCH] Do not show trackers and issue custom fields on project form when issue tracking is disabled (#7225). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4648 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/_form.rhtml | 19 +++++++++++++++++-- app/views/projects/new.html.erb | 12 ------------ public/javascripts/application.js | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+), 14 deletions(-) diff --git a/app/views/projects/_form.rhtml b/app/views/projects/_form.rhtml index e8045bf2c..9772a899c 100644 --- a/app/views/projects/_form.rhtml +++ b/app/views/projects/_form.rhtml @@ -23,8 +23,22 @@ <%= call_hook(:view_projects_form, :project => @project, :form => f) %> +<% if @project.new_record? %> +
<%= l(:label_module_plural) %> +<% Redmine::AccessControl.available_project_modules.each do |m| %> + +<% end %> +<%= hidden_field_tag 'project[enabled_module_names][]', '' %> +<%= javascript_tag 'observeProjectModules()' %> +
+<% end %> + +<% if @project.new_record? || @project.module_enabled?('issue_tracking') %> <% unless @trackers.empty? %> -
<%=l(:label_tracker_plural)%> +
<%=l(:label_tracker_plural)%> <% @trackers.each do |tracker| %>