##// END OF EJS Templates
Merged r12897....
Jean-Philippe Lang -
r12623:8b9a2ff871b3
parent child
Show More
@@ -1,114 +1,114
1 1 <%= error_messages_for 'custom_field' %>
2 2
3 3 <div class="splitcontentleft">
4 4 <div class="box tabular">
5 <p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
5 6 <p><%= f.text_field :name, :required => true %></p>
6 7 <p><%= f.text_area :description, :rows => 7 %></p>
7 <p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
8 8
9 9 <% if @custom_field.format.multiple_supported %>
10 10 <p>
11 11 <%= f.check_box :multiple %>
12 12 <% if !@custom_field.new_record? && @custom_field.multiple %>
13 13 <em class="info"><%= l(:text_turning_multiple_off) %></em>
14 14 <% end %>
15 15 </p>
16 16 <% end %>
17 17
18 18 <%= render_custom_field_format_partial f, @custom_field %>
19 19
20 20 <%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
21 21 </div>
22 22 <p><%= submit_tag l(:button_save) %></p>
23 23 </div>
24 24
25 25 <div class="splitcontentright">
26 26 <div class="box tabular">
27 27 <% case @custom_field.class.name
28 28 when "IssueCustomField" %>
29 29 <p><%= f.check_box :is_required %></p>
30 30 <p><%= f.check_box :is_for_all, :data => {:disables => '#custom_field_project_ids input'} %></p>
31 31 <p><%= f.check_box :is_filter %></p>
32 32 <% if @custom_field.format.searchable_supported %>
33 33 <p><%= f.check_box :searchable %></p>
34 34 <% end %>
35 35 <p>
36 36 <label><%= l(:field_visible) %></label>
37 37 <label class="block">
38 38 <%= radio_button_tag 'custom_field[visible]', 1, @custom_field.visible?, :id => 'custom_field_visible_on',
39 39 :data => {:disables => '.custom_field_role input'} %>
40 40 <%= l(:label_visibility_public) %>
41 41 </label>
42 42 <label class="block">
43 43 <%= radio_button_tag 'custom_field[visible]', 0, !@custom_field.visible?, :id => 'custom_field_visible_off',
44 44 :data => {:enables => '.custom_field_role input'} %>
45 45 <%= l(:label_visibility_roles) %>:
46 46 </label>
47 47 <% Role.givable.sorted.each do |role| %>
48 48 <label class="block custom_field_role" style="padding-left:2em;">
49 49 <%= check_box_tag 'custom_field[role_ids][]', role.id, @custom_field.roles.include?(role), :id => nil %>
50 50 <%= role.name %>
51 51 </label>
52 52 <% end %>
53 53 <%= hidden_field_tag 'custom_field[role_ids][]', '' %>
54 54 </p>
55 55
56 56 <% when "UserCustomField" %>
57 57 <p><%= f.check_box :is_required %></p>
58 58 <p><%= f.check_box :visible %></p>
59 59 <p><%= f.check_box :editable %></p>
60 60 <p><%= f.check_box :is_filter %></p>
61 61
62 62 <% when "ProjectCustomField" %>
63 63 <p><%= f.check_box :is_required %></p>
64 64 <p><%= f.check_box :visible %></p>
65 65 <% if @custom_field.format.searchable_supported %>
66 66 <p><%= f.check_box :searchable %></p>
67 67 <% end %>
68 68 <p><%= f.check_box :is_filter %></p>
69 69
70 70 <% when "VersionCustomField" %>
71 71 <p><%= f.check_box :is_required %></p>
72 72 <p><%= f.check_box :is_filter %></p>
73 73
74 74 <% when "GroupCustomField" %>
75 75 <p><%= f.check_box :is_required %></p>
76 76 <p><%= f.check_box :is_filter %></p>
77 77
78 78 <% when "TimeEntryCustomField" %>
79 79 <p><%= f.check_box :is_required %></p>
80 80 <p><%= f.check_box :is_filter %></p>
81 81
82 82 <% else %>
83 83 <p><%= f.check_box :is_required %></p>
84 84
85 85 <% end %>
86 86 <%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
87 87 </div>
88 88
89 89 <% if @custom_field.is_a?(IssueCustomField) %>
90 90 <fieldset class="box" id="custom_field_tracker_ids"><legend><%=l(:label_tracker_plural)%></legend>
91 91 <% Tracker.sorted.each do |tracker| %>
92 92 <%= check_box_tag "custom_field[tracker_ids][]",
93 93 tracker.id,
94 94 (@custom_field.trackers.include? tracker),
95 95 :id => "custom_field_tracker_ids_#{tracker.id}" %>
96 96 <label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>">
97 97 <%= h(tracker.name) %>
98 98 </label>
99 99 <% end %>
100 100 <%= hidden_field_tag "custom_field[tracker_ids][]", '' %>
101 101 <p><%= check_all_links 'custom_field_tracker_ids' %></p>
102 102 </fieldset>
103 103
104 104 <fieldset class="box" id="custom_field_project_ids"><legend><%= l(:label_project_plural) %></legend>
105 105 <%= render_project_nested_lists(Project.all) do |p|
106 106 content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, @custom_field.projects.to_a.include?(p), :id => nil) + ' ' + h(p))
107 107 end %>
108 108 <%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %>
109 109 <p><%= check_all_links 'custom_field_project_ids' %></p>
110 110 </fieldset>
111 111 <% end %>
112 112 </div>
113 113
114 114 <% include_calendar_headers_tags %>
General Comments 0
You need to be logged in to leave comments. Login now