Revision 1298:4f746d8966dd app/views/custom_fields
| app/views/custom_fields/_form.html.erb | ||
|---|---|---|
| 5 | 5 |
<p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
|
| 6 | 6 |
|
| 7 | 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 | 14 |
<% end %> |
| 10 | 15 |
|
| 11 | 16 |
<% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %> |
| ... | ... | |
| 22 | 27 |
</p> |
| 23 | 28 |
<% end %> |
| 24 | 29 |
|
| 25 |
<% unless @custom_field.format_in? 'user', 'version' %> |
|
| 26 |
<p><%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %></p> |
|
| 30 |
<% case @custom_field.field_format %> |
|
| 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 | 41 |
<% end %> |
| 28 | 42 |
|
| 29 | 43 |
<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %> |
| ... | ... | |
| 73 | 87 |
|
| 74 | 88 |
<% when "TimeEntryCustomField" %> |
| 75 | 89 |
<p><%= f.check_box :is_required %></p> |
| 90 |
<p><%= f.check_box :is_filter %></p> |
|
| 76 | 91 |
|
| 77 | 92 |
<% else %> |
| 78 | 93 |
<p><%= f.check_box :is_required %></p> |
| ... | ... | |
| 80 | 95 |
<% end %> |
| 81 | 96 |
<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
|
| 82 | 97 |
</div> |
| 98 |
|
|
| 99 |
<% include_calendar_headers_tags %> |
|
Also available in: Unified diff