summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-06 11:41:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-06 11:41:37 +0000
commit062b003debb2271f6392757df0c4ed2e088c1e64 (patch)
tree3bfb48548f7555b9d9b8084235e00f1b834ef2a2 /app/views/projects
parentd2785d680d0d0a86fc42bfdca47435f5ec892b9c (diff)
downloadredmine-062b003debb2271f6392757df0c4ed2e088c1e64.tar.gz
redmine-062b003debb2271f6392757df0c4ed2e088c1e64.zip
Generate project identifier automatically with JavaScript (#9225).
Based on Jan Schulz-Hofen's patch. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11129 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_form.html.erb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index d7b7554f9..27328d638 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -9,7 +9,7 @@
<% end %>
<p><%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %></p>
-<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen? %>
+<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<% unless @project.identifier_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p>
@@ -62,3 +62,9 @@
<% end %>
<% end %>
<!--[eoform:project]-->
+
+<% unless @project.identifier_frozen? %>
+ <% content_for :header_tags do %>
+ <%= javascript_include_tag 'project_identifier' %>
+ <% end %>
+<% end %>