add_maxlength_to_textfields_in_the_project_form.patch

Adds a maxlength attribute to textfields in the project form - Felix Schäfer, 2010-07-08 17:29

Download (1.08 KB)

View differences:

app/views/projects/_form.rhtml
2 2

  
3 3
<div class="box">
4 4
<!--[form:project]-->
5
<p><%= f.text_field :name, :required => true %><br /><em><%= l(:text_caracters_maximum, 30) %></em></p>
5
<p><%= f.text_field :name, :required => true, :maxlength => 30 %><br /><em><%= l(:text_caracters_maximum, 30) %></em></p>
6 6

  
7 7
<% unless @project.allowed_parents.compact.empty? %>
8 8
    <p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p>
9 9
<% end %>
10 10

  
11 11
<p><%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %></p>
12
<p><%= f.text_field :identifier, :required => true, :disabled => @project.identifier_frozen? %>
12
<p><%= f.text_field :identifier, :required => true, :disabled => @project.identifier_frozen?, :maxlength => 20 %>
13 13
<% unless @project.identifier_frozen? %>
14 14
<br /><em><%= l(:text_length_between, :min => 1, :max => 20) %> <%= l(:text_project_identifier_info) %></em>
15 15
<% end %></p>