@@ -27,33 +27,12 | |||||
27 | <% case @custom_field.class.name |
|
27 | <% case @custom_field.class.name | |
28 | when "IssueCustomField" %> |
|
28 | when "IssueCustomField" %> | |
29 | <p><%= f.check_box :is_required %></p> |
|
29 | <p><%= f.check_box :is_required %></p> | |
30 | <p><%= f.check_box :is_for_all, :data => {:disables => '#custom_field_project_ids input'} %></p> |
|
|||
31 | <% if @custom_field.format.is_filter_supported %> |
|
30 | <% if @custom_field.format.is_filter_supported %> | |
32 | <p><%= f.check_box :is_filter %></p> |
|
31 | <p><%= f.check_box :is_filter %></p> | |
33 | <% end %> |
|
32 | <% end %> | |
34 | <% if @custom_field.format.searchable_supported %> |
|
33 | <% if @custom_field.format.searchable_supported %> | |
35 | <p><%= f.check_box :searchable %></p> |
|
34 | <p><%= f.check_box :searchable %></p> | |
36 | <% end %> |
|
35 | <% end %> | |
37 | <p> |
|
|||
38 | <label><%= l(:field_visible) %></label> |
|
|||
39 | <label class="block"> |
|
|||
40 | <%= radio_button_tag 'custom_field[visible]', 1, @custom_field.visible?, :id => 'custom_field_visible_on', |
|
|||
41 | :data => {:disables => '.custom_field_role input'} %> |
|
|||
42 | <%= l(:label_visibility_public) %> |
|
|||
43 | </label> |
|
|||
44 | <label class="block"> |
|
|||
45 | <%= radio_button_tag 'custom_field[visible]', 0, !@custom_field.visible?, :id => 'custom_field_visible_off', |
|
|||
46 | :data => {:enables => '.custom_field_role input'} %> |
|
|||
47 | <%= l(:label_visibility_roles) %>: |
|
|||
48 | </label> |
|
|||
49 | <% Role.givable.sorted.each do |role| %> |
|
|||
50 | <label class="block custom_field_role" style="padding-left:2em;"> |
|
|||
51 | <%= check_box_tag 'custom_field[role_ids][]', role.id, @custom_field.roles.include?(role), :id => nil %> |
|
|||
52 | <%= role.name %> |
|
|||
53 | </label> |
|
|||
54 | <% end %> |
|
|||
55 | <%= hidden_field_tag 'custom_field[role_ids][]', '' %> |
|
|||
56 | </p> |
|
|||
57 |
|
36 | |||
58 | <% when "UserCustomField" %> |
|
37 | <% when "UserCustomField" %> | |
59 | <p><%= f.check_box :is_required %></p> |
|
38 | <p><%= f.check_box :is_required %></p> | |
@@ -99,6 +78,27 when "IssueCustomField" %> | |||||
99 | </div> |
|
78 | </div> | |
100 |
|
79 | |||
101 | <% if @custom_field.is_a?(IssueCustomField) %> |
|
80 | <% if @custom_field.is_a?(IssueCustomField) %> | |
|
81 | ||||
|
82 | <fieldset class="box tabular"><legend><%= l(:field_visible) %></legend> | |||
|
83 | <label class="block"> | |||
|
84 | <%= radio_button_tag 'custom_field[visible]', 1, @custom_field.visible?, :id => 'custom_field_visible_on', | |||
|
85 | :data => {:disables => '.custom_field_role input'} %> | |||
|
86 | <%= l(:label_visibility_public) %> | |||
|
87 | </label> | |||
|
88 | <label class="block"> | |||
|
89 | <%= radio_button_tag 'custom_field[visible]', 0, !@custom_field.visible?, :id => 'custom_field_visible_off', | |||
|
90 | :data => {:enables => '.custom_field_role input'} %> | |||
|
91 | <%= l(:label_visibility_roles) %>: | |||
|
92 | </label> | |||
|
93 | <% Role.givable.sorted.each do |role| %> | |||
|
94 | <label class="block custom_field_role" style="padding-left:2em;"> | |||
|
95 | <%= check_box_tag 'custom_field[role_ids][]', role.id, @custom_field.roles.include?(role), :id => nil %> | |||
|
96 | <%= role.name %> | |||
|
97 | </label> | |||
|
98 | <% end %> | |||
|
99 | <%= hidden_field_tag 'custom_field[role_ids][]', '' %> | |||
|
100 | </fieldset> | |||
|
101 | ||||
102 | <fieldset class="box" id="custom_field_tracker_ids"><legend><%=l(:label_tracker_plural)%></legend> |
|
102 | <fieldset class="box" id="custom_field_tracker_ids"><legend><%=l(:label_tracker_plural)%></legend> | |
103 | <% Tracker.sorted.each do |tracker| %> |
|
103 | <% Tracker.sorted.each do |tracker| %> | |
104 | <%= check_box_tag "custom_field[tracker_ids][]", |
|
104 | <%= check_box_tag "custom_field[tracker_ids][]", | |
@@ -113,13 +113,17 when "IssueCustomField" %> | |||||
113 | <p><%= check_all_links 'custom_field_tracker_ids' %></p> |
|
113 | <p><%= check_all_links 'custom_field_tracker_ids' %></p> | |
114 | </fieldset> |
|
114 | </fieldset> | |
115 |
|
115 | |||
116 |
<fieldset class="box" |
|
116 | <fieldset class="box"><legend><%= l(:label_project_plural) %></legend> | |
117 | <% project_ids = @custom_field.project_ids.to_a %> |
|
117 | <p><%= f.check_box :is_for_all, :data => {:disables => '#custom_field_project_ids input'} %></p> | |
118 | <%= render_project_nested_lists(Project.all) do |p| |
|
118 | ||
119 | content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + p) |
|
119 | <div id="custom_field_project_ids"> | |
120 | end %> |
|
120 | <% project_ids = @custom_field.project_ids.to_a %> | |
121 | <%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %> |
|
121 | <%= render_project_nested_lists(Project.all) do |p| | |
122 | <p><%= check_all_links 'custom_field_project_ids' %></p> |
|
122 | content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + p) | |
|
123 | end %> | |||
|
124 | <%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %> | |||
|
125 | <p><%= check_all_links 'custom_field_project_ids' %></p> | |||
|
126 | </div> | |||
123 | </fieldset> |
|
127 | </fieldset> | |
124 | <% end %> |
|
128 | <% end %> | |
125 | </div> |
|
129 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now