diff 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
line wrap: on
line diff
--- a/app/views/custom_fields/_form.html.erb	Fri Jun 14 09:07:32 2013 +0100
+++ b/app/views/custom_fields/_form.html.erb	Fri Jun 14 09:28:30 2013 +0100
@@ -5,7 +5,12 @@
 <p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
 
 <% if @custom_field.format_in? 'list', 'user', 'version' %>
-<p><%= f.check_box :multiple, :disabled => @custom_field.multiple && !@custom_field.new_record? %></p>
+<p>
+  <%= f.check_box :multiple %>
+  <% if !@custom_field.new_record? && @custom_field.multiple %>
+  <em class="info"><%= l(:text_turning_multiple_off) %></em>
+  <% end %>
+</p>
 <% end %>
 
 <% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %>
@@ -22,8 +27,17 @@
 </p>
 <% end %>
 
-<% unless @custom_field.format_in? 'user', 'version' %>
-<p><%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %></p>
+<% case @custom_field.field_format %>
+<% when 'bool' %>
+  <p><%= f.check_box(:default_value) %></p>
+<% when 'text' %>
+  <p><%= f.text_area(:default_value, :rows => 8) %></p>
+<% when 'date' %>
+  <p><%= f.text_field(:default_value, :size => 10) %></p>
+  <%= calendar_for('custom_field_default_value') %>
+<% when 'user', 'version' %>
+<% else %>
+  <p><%= f.text_field(:default_value) %></p>
 <% end %>
 
 <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
@@ -73,6 +87,7 @@
 
 <% when "TimeEntryCustomField" %>
     <p><%= f.check_box :is_required %></p>
+    <p><%= f.check_box :is_filter %></p>
 
 <% else %>
     <p><%= f.check_box :is_required %></p>
@@ -80,3 +95,5 @@
 <% end %>
 <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
 </div>
+
+<% include_calendar_headers_tags %>