comparison app/views/custom_fields/_form.html.erb @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
comparison
equal deleted inserted replaced
1297:0a574315af3e 1298:4f746d8966dd
3 <div class="box tabular"> 3 <div class="box tabular">
4 <p><%= f.text_field :name, :required => true %></p> 4 <p><%= f.text_field :name, :required => true %></p>
5 <p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p> 5 <p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
6 6
7 <% if @custom_field.format_in? 'list', 'user', 'version' %> 7 <% if @custom_field.format_in? 'list', 'user', 'version' %>
8 <p><%= f.check_box :multiple, :disabled => @custom_field.multiple && !@custom_field.new_record? %></p> 8 <p>
9 <%= f.check_box :multiple %>
10 <% if !@custom_field.new_record? && @custom_field.multiple %>
11 <em class="info"><%= l(:text_turning_multiple_off) %></em>
12 <% end %>
13 </p>
9 <% end %> 14 <% end %>
10 15
11 <% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %> 16 <% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %>
12 <p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label> 17 <p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label>
13 <%= f.text_field :min_length, :size => 5, :no_label => true %> - 18 <%= f.text_field :min_length, :size => 5, :no_label => true %> -
20 <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %> 25 <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %>
21 <em class="info"><%= l(:text_custom_field_possible_values_info) %></em> 26 <em class="info"><%= l(:text_custom_field_possible_values_info) %></em>
22 </p> 27 </p>
23 <% end %> 28 <% end %>
24 29
25 <% unless @custom_field.format_in? 'user', 'version' %> 30 <% case @custom_field.field_format %>
26 <p><%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %></p> 31 <% when 'bool' %>
32 <p><%= f.check_box(:default_value) %></p>
33 <% when 'text' %>
34 <p><%= f.text_area(:default_value, :rows => 8) %></p>
35 <% when 'date' %>
36 <p><%= f.text_field(:default_value, :size => 10) %></p>
37 <%= calendar_for('custom_field_default_value') %>
38 <% when 'user', 'version' %>
39 <% else %>
40 <p><%= f.text_field(:default_value) %></p>
27 <% end %> 41 <% end %>
28 42
29 <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %> 43 <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
30 </div> 44 </div>
31 45
71 <p><%= f.check_box :is_required %></p> 85 <p><%= f.check_box :is_required %></p>
72 <p><%= f.check_box :is_filter %></p> 86 <p><%= f.check_box :is_filter %></p>
73 87
74 <% when "TimeEntryCustomField" %> 88 <% when "TimeEntryCustomField" %>
75 <p><%= f.check_box :is_required %></p> 89 <p><%= f.check_box :is_required %></p>
90 <p><%= f.check_box :is_filter %></p>
76 91
77 <% else %> 92 <% else %>
78 <p><%= f.check_box :is_required %></p> 93 <p><%= f.check_box :is_required %></p>
79 94
80 <% end %> 95 <% end %>
81 <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %> 96 <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
82 </div> 97 </div>
98
99 <% include_calendar_headers_tags %>