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 / b2 / b276250e954ac8b398b0737a04404d7c1ed1df94.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (3.03 KB)
| 1 | 1296:038ba2d95de8 | 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><%= f.check_box :multiple, :disabled => @custom_field.multiple && !@custom_field.new_record? %></p> |
||
| 9 | <% end %> |
||
| 10 | |||
| 11 | <% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %> |
||
| 12 | <p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label> |
||
| 13 | <%= f.text_field :min_length, :size => 5, :no_label => true %> - |
||
| 14 | <%= f.text_field :max_length, :size => 5, :no_label => true %><br />(<%=l(:text_min_max_length_info)%>)</p> |
||
| 15 | <p><%= f.text_field :regexp, :size => 50 %><br />(<%=l(:text_regexp_info)%>)</p> |
||
| 16 | <% end %> |
||
| 17 | |||
| 18 | <% if @custom_field.format_in? 'list' %> |
||
| 19 | <p> |
||
| 20 | <%= 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> |
||
| 22 | </p> |
||
| 23 | <% end %> |
||
| 24 | |||
| 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> |
||
| 27 | <% end %> |
||
| 28 | |||
| 29 | <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %> |
||
| 30 | </div> |
||
| 31 | |||
| 32 | <div class="box tabular"> |
||
| 33 | <% case @custom_field.class.name |
||
| 34 | when "IssueCustomField" %> |
||
| 35 | |||
| 36 | <fieldset><legend><%=l(:label_tracker_plural)%></legend> |
||
| 37 | <% Tracker.sorted.all.each do |tracker| %> |
||
| 38 | <%= check_box_tag "custom_field[tracker_ids][]", |
||
| 39 | tracker.id, |
||
| 40 | (@custom_field.trackers.include? tracker), |
||
| 41 | :id => "custom_field_tracker_ids_#{tracker.id}" %>
|
||
| 42 | <label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>"> |
||
| 43 | <%= h(tracker.name) %> |
||
| 44 | </label> |
||
| 45 | <% end %> |
||
| 46 | <%= hidden_field_tag "custom_field[tracker_ids][]", '' %> |
||
| 47 | </fieldset> |
||
| 48 | |
||
| 49 | <p><%= f.check_box :is_required %></p> |
||
| 50 | <p><%= f.check_box :is_for_all %></p> |
||
| 51 | <p><%= f.check_box :is_filter %></p> |
||
| 52 | <p><%= f.check_box :searchable %></p> |
||
| 53 | |||
| 54 | <% when "UserCustomField" %> |
||
| 55 | <p><%= f.check_box :is_required %></p> |
||
| 56 | <p><%= f.check_box :visible %></p> |
||
| 57 | <p><%= f.check_box :editable %></p> |
||
| 58 | <p><%= f.check_box :is_filter %></p> |
||
| 59 | |||
| 60 | <% when "ProjectCustomField" %> |
||
| 61 | <p><%= f.check_box :is_required %></p> |
||
| 62 | <p><%= f.check_box :visible %></p> |
||
| 63 | <p><%= f.check_box :searchable %></p> |
||
| 64 | <p><%= f.check_box :is_filter %></p> |
||
| 65 | |||
| 66 | <% when "VersionCustomField" %> |
||
| 67 | <p><%= f.check_box :is_required %></p> |
||
| 68 | <p><%= f.check_box :is_filter %></p> |
||
| 69 | |||
| 70 | <% when "GroupCustomField" %> |
||
| 71 | <p><%= f.check_box :is_required %></p> |
||
| 72 | <p><%= f.check_box :is_filter %></p> |
||
| 73 | |||
| 74 | <% when "TimeEntryCustomField" %> |
||
| 75 | <p><%= f.check_box :is_required %></p> |
||
| 76 | |||
| 77 | <% else %> |
||
| 78 | <p><%= f.check_box :is_required %></p> |
||
| 79 | |||
| 80 | <% end %> |
||
| 81 | <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
|
||
| 82 | </div> |