To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 3c / 3cb3c42447393d4203d371cda0ccf19d942248be.svn-base @ 1298:4f746d8966dd
History | View | Annotate | Download (3.39 KB)
| 1 | 1295:622f24f53b42 | Chris | <%= error_messages_for 'custom_field' %> |
|---|---|---|---|
| 2 | |||
| 3 | <div class="box tabular"> |
||
| 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>
|
||
| 6 | |||
| 7 | <% if @custom_field.format_in? 'list', 'user', 'version' %> |
||
| 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> |
||
| 14 | <% end %> |
||
| 15 | |||
| 16 | <% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %> |
||
| 17 | <p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label> |
||
| 18 | <%= f.text_field :min_length, :size => 5, :no_label => true %> - |
||
| 19 | <%= f.text_field :max_length, :size => 5, :no_label => true %><br />(<%=l(:text_min_max_length_info)%>)</p> |
||
| 20 | <p><%= f.text_field :regexp, :size => 50 %><br />(<%=l(:text_regexp_info)%>)</p> |
||
| 21 | <% end %> |
||
| 22 | |||
| 23 | <% if @custom_field.format_in? 'list' %> |
||
| 24 | <p> |
||
| 25 | <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %>
|
||
| 26 | <em class="info"><%= l(:text_custom_field_possible_values_info) %></em> |
||
| 27 | </p> |
||
| 28 | <% end %> |
||
| 29 | |||
| 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> |
||
| 41 | <% end %> |
||
| 42 | |||
| 43 | <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %> |
||
| 44 | </div> |
||
| 45 | |||
| 46 | <div class="box tabular"> |
||
| 47 | <% case @custom_field.class.name |
||
| 48 | when "IssueCustomField" %> |
||
| 49 | |||
| 50 | <fieldset><legend><%=l(:label_tracker_plural)%></legend> |
||
| 51 | <% Tracker.sorted.all.each do |tracker| %> |
||
| 52 | <%= check_box_tag "custom_field[tracker_ids][]", |
||
| 53 | tracker.id, |
||
| 54 | (@custom_field.trackers.include? tracker), |
||
| 55 | :id => "custom_field_tracker_ids_#{tracker.id}" %>
|
||
| 56 | <label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>"> |
||
| 57 | <%= h(tracker.name) %> |
||
| 58 | </label> |
||
| 59 | <% end %> |
||
| 60 | <%= hidden_field_tag "custom_field[tracker_ids][]", '' %> |
||
| 61 | </fieldset> |
||
| 62 | |
||
| 63 | <p><%= f.check_box :is_required %></p> |
||
| 64 | <p><%= f.check_box :is_for_all %></p> |
||
| 65 | <p><%= f.check_box :is_filter %></p> |
||
| 66 | <p><%= f.check_box :searchable %></p> |
||
| 67 | |||
| 68 | <% when "UserCustomField" %> |
||
| 69 | <p><%= f.check_box :is_required %></p> |
||
| 70 | <p><%= f.check_box :visible %></p> |
||
| 71 | <p><%= f.check_box :editable %></p> |
||
| 72 | <p><%= f.check_box :is_filter %></p> |
||
| 73 | |||
| 74 | <% when "ProjectCustomField" %> |
||
| 75 | <p><%= f.check_box :is_required %></p> |
||
| 76 | <p><%= f.check_box :visible %></p> |
||
| 77 | <p><%= f.check_box :searchable %></p> |
||
| 78 | <p><%= f.check_box :is_filter %></p> |
||
| 79 | |||
| 80 | <% when "VersionCustomField" %> |
||
| 81 | <p><%= f.check_box :is_required %></p> |
||
| 82 | <p><%= f.check_box :is_filter %></p> |
||
| 83 | |||
| 84 | <% when "GroupCustomField" %> |
||
| 85 | <p><%= f.check_box :is_required %></p> |
||
| 86 | <p><%= f.check_box :is_filter %></p> |
||
| 87 | |||
| 88 | <% when "TimeEntryCustomField" %> |
||
| 89 | <p><%= f.check_box :is_required %></p> |
||
| 90 | <p><%= f.check_box :is_filter %></p> |
||
| 91 | |||
| 92 | <% else %> |
||
| 93 | <p><%= f.check_box :is_required %></p> |
||
| 94 | |||
| 95 | <% end %> |
||
| 96 | <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
|
||
| 97 | </div> |
||
| 98 | |||
| 99 | <% include_calendar_headers_tags %> |