summaryrefslogtreecommitdiffstats
path: root/app/views/projects/_form.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-05 10:45:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-10-05 10:45:43 +0000
commit3f566d60429c979d9ef3fcea6f9feae70c2b606d (patch)
tree71fb5817ce0421ae49c947ed4c398adad886748c /app/views/projects/_form.html.erb
parent7b1b605ae8e6762f4bf76cecf32e280f75bf72c8 (diff)
downloadredmine-3f566d60429c979d9ef3fcea6f9feae70c2b606d.tar.gz
redmine-3f566d60429c979d9ef3fcea6f9feae70c2b606d.zip
Hide issue custom fields when disabling issue tracking on new project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12200 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects/_form.html.erb')
-rw-r--r--app/views/projects/_form.html.erb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index 010729d12..9077a0120 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -37,7 +37,6 @@
</label>
<% end %>
<%= hidden_field_tag 'project[enabled_module_names][]', '' %>
-<%= javascript_tag 'observeProjectModules()' %>
</fieldset>
<% end %>
@@ -87,3 +86,15 @@
});
<% end %>
<% end %>
+
+<%= javascript_tag do %>
+$(document).ready(function() {
+ $('#project_enabled_module_names_issue_tracking').on('change', function(){
+ if ($(this).attr('checked')){
+ $('#project_trackers, #project_issue_custom_fields').show();
+ } else {
+ $('#project_trackers, #project_issue_custom_fields').hide();
+ }
+ }).trigger('change');
+});
+<% end %>