@@ -1,94 +1,99 | |||
|
1 | 1 | <%= error_messages_for 'custom_field' %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular"> |
|
4 | 4 | <p><%= f.text_field :name, :required => true %></p> |
|
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 | 8 | <p> |
|
9 | 9 | <%= f.check_box :multiple %> |
|
10 | 10 | <% if !@custom_field.new_record? && @custom_field.multiple %> |
|
11 | 11 | <em class="info"><%= l(:text_turning_multiple_off) %></em> |
|
12 | 12 | <% end %> |
|
13 | 13 | </p> |
|
14 | 14 | <% end %> |
|
15 | 15 | |
|
16 | 16 | <% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %> |
|
17 | 17 | <p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label> |
|
18 | 18 | <%= f.text_field :min_length, :size => 5, :no_label => true %> - |
|
19 | 19 | <%= f.text_field :max_length, :size => 5, :no_label => true %><br />(<%=l(:text_min_max_length_info)%>)</p> |
|
20 | 20 | <p><%= f.text_field :regexp, :size => 50 %><br />(<%=l(:text_regexp_info)%>)</p> |
|
21 | 21 | <% end %> |
|
22 | 22 | |
|
23 | 23 | <% if @custom_field.format_in? 'list' %> |
|
24 | 24 | <p> |
|
25 | 25 | <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %> |
|
26 | 26 | <em class="info"><%= l(:text_custom_field_possible_values_info) %></em> |
|
27 | 27 | </p> |
|
28 | 28 | <% end %> |
|
29 | 29 | |
|
30 | 30 | <% case @custom_field.field_format %> |
|
31 | 31 | <% when 'bool' %> |
|
32 | 32 | <p><%= f.check_box(:default_value) %></p> |
|
33 | 33 | <% when 'text' %> |
|
34 | 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') %> | |
|
35 | 38 | <% when 'user', 'version' %> |
|
36 | 39 | <% else %> |
|
37 | 40 | <p><%= f.text_field(:default_value) %></p> |
|
38 | 41 | <% end %> |
|
39 | 42 | |
|
40 | 43 | <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %> |
|
41 | 44 | </div> |
|
42 | 45 | |
|
43 | 46 | <div class="box tabular"> |
|
44 | 47 | <% case @custom_field.class.name |
|
45 | 48 | when "IssueCustomField" %> |
|
46 | 49 | |
|
47 | 50 | <fieldset><legend><%=l(:label_tracker_plural)%></legend> |
|
48 | 51 | <% Tracker.sorted.all.each do |tracker| %> |
|
49 | 52 | <%= check_box_tag "custom_field[tracker_ids][]", |
|
50 | 53 | tracker.id, |
|
51 | 54 | (@custom_field.trackers.include? tracker), |
|
52 | 55 | :id => "custom_field_tracker_ids_#{tracker.id}" %> |
|
53 | 56 | <label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>"> |
|
54 | 57 | <%= h(tracker.name) %> |
|
55 | 58 | </label> |
|
56 | 59 | <% end %> |
|
57 | 60 | <%= hidden_field_tag "custom_field[tracker_ids][]", '' %> |
|
58 | 61 | </fieldset> |
|
59 | 62 | |
|
60 | 63 | <p><%= f.check_box :is_required %></p> |
|
61 | 64 | <p><%= f.check_box :is_for_all %></p> |
|
62 | 65 | <p><%= f.check_box :is_filter %></p> |
|
63 | 66 | <p><%= f.check_box :searchable %></p> |
|
64 | 67 | |
|
65 | 68 | <% when "UserCustomField" %> |
|
66 | 69 | <p><%= f.check_box :is_required %></p> |
|
67 | 70 | <p><%= f.check_box :visible %></p> |
|
68 | 71 | <p><%= f.check_box :editable %></p> |
|
69 | 72 | <p><%= f.check_box :is_filter %></p> |
|
70 | 73 | |
|
71 | 74 | <% when "ProjectCustomField" %> |
|
72 | 75 | <p><%= f.check_box :is_required %></p> |
|
73 | 76 | <p><%= f.check_box :visible %></p> |
|
74 | 77 | <p><%= f.check_box :searchable %></p> |
|
75 | 78 | <p><%= f.check_box :is_filter %></p> |
|
76 | 79 | |
|
77 | 80 | <% when "VersionCustomField" %> |
|
78 | 81 | <p><%= f.check_box :is_required %></p> |
|
79 | 82 | <p><%= f.check_box :is_filter %></p> |
|
80 | 83 | |
|
81 | 84 | <% when "GroupCustomField" %> |
|
82 | 85 | <p><%= f.check_box :is_required %></p> |
|
83 | 86 | <p><%= f.check_box :is_filter %></p> |
|
84 | 87 | |
|
85 | 88 | <% when "TimeEntryCustomField" %> |
|
86 | 89 | <p><%= f.check_box :is_required %></p> |
|
87 | 90 | <p><%= f.check_box :is_filter %></p> |
|
88 | 91 | |
|
89 | 92 | <% else %> |
|
90 | 93 | <p><%= f.check_box :is_required %></p> |
|
91 | 94 | |
|
92 | 95 | <% end %> |
|
93 | 96 | <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %> |
|
94 | 97 | </div> |
|
98 | ||
|
99 | <% include_calendar_headers_tags %> |
General Comments 0
You need to be logged in to leave comments.
Login now