##// END OF EJS Templates
Bulk edit form lacks estimated time field (#5156)....
Jean-Philippe Lang -
r14908:33720d5fbe75
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,207 +1,215
1 1 <h2><%= @copy ? l(:button_copy) : l(:label_bulk_edit_selected_issues) %></h2>
2 2
3 3 <% if @saved_issues && @unsaved_issues.present? %>
4 4 <div id="errorExplanation">
5 5 <span>
6 6 <%= l(:notice_failed_to_save_issues,
7 7 :count => @unsaved_issues.size,
8 8 :total => @saved_issues.size,
9 9 :ids => @unsaved_issues.map {|i| "##{i.id}"}.join(', ')) %>
10 10 </span>
11 11 <ul>
12 12 <% bulk_edit_error_messages(@unsaved_issues).each do |message| %>
13 13 <li><%= message %></li>
14 14 <% end %>
15 15 </ul>
16 16 </div>
17 17 <% end %>
18 18
19 19 <ul id="bulk-selection">
20 20 <% @issues.each do |issue| %>
21 21 <%= content_tag 'li', link_to_issue(issue) %>
22 22 <% end %>
23 23 </ul>
24 24
25 25 <%= form_tag(bulk_update_issues_path, :id => 'bulk_edit_form') do %>
26 26 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id, :id => nil)}.join("\n").html_safe %>
27 27 <div class="box tabular">
28 28 <fieldset class="attributes">
29 29 <legend><%= l(:label_change_properties) %></legend>
30 30
31 31 <div class="splitcontentleft">
32 32 <% if @allowed_projects.present? %>
33 33 <p>
34 34 <label for="issue_project_id"><%= l(:field_project) %></label>
35 35 <%= select_tag('issue[project_id]',
36 36 project_tree_options_for_select(@allowed_projects,
37 37 :include_blank => ((!@copy || (@projects & @allowed_projects == @projects)) ? l(:label_no_change_option) : false),
38 38 :selected => @target_project),
39 39 :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
40 40 </p>
41 41 <% end %>
42 42 <p>
43 43 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
44 44 <%= select_tag('issue[tracker_id]',
45 45 content_tag('option', l(:label_no_change_option), :value => '') +
46 46 options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id])) %>
47 47 </p>
48 48 <% if @available_statuses.any? %>
49 49 <p>
50 50 <label for='issue_status_id'><%= l(:field_status) %></label>
51 51 <%= select_tag('issue[status_id]',
52 52 content_tag('option', l(:label_no_change_option), :value => '') +
53 53 options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id])) %>
54 54 </p>
55 55 <% end %>
56 56
57 57 <% if @safe_attributes.include?('priority_id') -%>
58 58 <p>
59 59 <label for='issue_priority_id'><%= l(:field_priority) %></label>
60 60 <%= select_tag('issue[priority_id]',
61 61 content_tag('option', l(:label_no_change_option), :value => '') +
62 62 options_from_collection_for_select(IssuePriority.active, :id, :name, @issue_params[:priority_id])) %>
63 63 </p>
64 64 <% end %>
65 65
66 66 <% if @safe_attributes.include?('assigned_to_id') -%>
67 67 <p>
68 68 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
69 69 <%= select_tag('issue[assigned_to_id]',
70 70 content_tag('option', l(:label_no_change_option), :value => '') +
71 71 content_tag('option', l(:label_nobody), :value => 'none', :selected => (@issue_params[:assigned_to_id] == 'none')) +
72 72 principals_options_for_select(@assignables, @issue_params[:assigned_to_id])) %>
73 73 </p>
74 74 <% end %>
75 75
76 76 <% if @safe_attributes.include?('category_id') -%>
77 77 <p>
78 78 <label for='issue_category_id'><%= l(:field_category) %></label>
79 79 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
80 80 content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:category_id] == 'none')) +
81 81 options_from_collection_for_select(@categories, :id, :name, @issue_params[:category_id])) %>
82 82 </p>
83 83 <% end %>
84 84
85 85 <% if @safe_attributes.include?('fixed_version_id') -%>
86 86 <p>
87 87 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
88 88 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
89 89 content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:fixed_version_id] == 'none')) +
90 90 version_options_for_select(@versions.sort, @issue_params[:fixed_version_id])) %>
91 91 </p>
92 92 <% end %>
93 93
94 94 <% @custom_fields.each do |custom_field| %>
95 95 <p>
96 96 <label><%= custom_field.name %></label>
97 97 <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
98 98 </p>
99 99 <% end %>
100 100
101 101 <% if @copy && Setting.link_copied_issue == 'ask' %>
102 102 <p>
103 103 <label for='link_copy'><%= l(:label_link_copied_issue) %></label>
104 104 <%= hidden_field_tag 'link_copy', '0' %>
105 105 <%= check_box_tag 'link_copy', '1', params[:link_copy] != 0 %>
106 106 </p>
107 107 <% end %>
108 108
109 109 <% if @copy && @attachments_present %>
110 110 <%= hidden_field_tag 'copy_attachments', '0' %>
111 111 <p>
112 112 <label for='copy_attachments'><%= l(:label_copy_attachments) %></label>
113 113 <%= check_box_tag 'copy_attachments', '1', params[:copy_attachments] != '0' %>
114 114 </p>
115 115 <% end %>
116 116
117 117 <% if @copy && @subtasks_present %>
118 118 <%= hidden_field_tag 'copy_subtasks', '0' %>
119 119 <p>
120 120 <label for='copy_subtasks'><%= l(:label_copy_subtasks) %></label>
121 121 <%= check_box_tag 'copy_subtasks', '1', params[:copy_subtasks] != '0' %>
122 122 </p>
123 123 <% end %>
124 124
125 125 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
126 126 </div>
127 127
128 128 <div class="splitcontentright">
129 129 <% if @safe_attributes.include?('is_private') %>
130 130 <p>
131 131 <label for='issue_is_private'><%= l(:field_is_private) %></label>
132 132 <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
133 133 content_tag('option', l(:general_text_Yes), :value => '1', :selected => (@issue_params[:is_private] == '1')) +
134 134 content_tag('option', l(:general_text_No), :value => '0', :selected => (@issue_params[:is_private] == '0'))) %>
135 135 </p>
136 136 <% end %>
137 137
138 138 <% if @safe_attributes.include?('parent_issue_id') && @project %>
139 139 <p>
140 140 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
141 141 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10, :value => @issue_params[:parent_issue_id] %>
142 142 <label class="inline"><%= check_box_tag 'issue[parent_issue_id]', 'none', (@issue_params[:parent_issue_id] == 'none'), :id => nil, :data => {:disables => '#issue_parent_issue_id'} %><%= l(:button_clear) %></label>
143 143 </p>
144 144 <%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => Setting.cross_project_subtasks)}')" %>
145 145 <% end %>
146 146
147 147 <% if @safe_attributes.include?('start_date') %>
148 148 <p>
149 149 <label for='issue_start_date'><%= l(:field_start_date) %></label>
150 150 <%= text_field_tag 'issue[start_date]', '', :value => @issue_params[:start_date], :size => 10 %><%= calendar_for('issue_start_date') %>
151 151 <label class="inline"><%= check_box_tag 'issue[start_date]', 'none', (@issue_params[:start_date] == 'none'), :id => nil, :data => {:disables => '#issue_start_date'} %><%= l(:button_clear) %></label>
152 152 </p>
153 153 <% end %>
154 154
155 155 <% if @safe_attributes.include?('due_date') %>
156 156 <p>
157 157 <label for='issue_due_date'><%= l(:field_due_date) %></label>
158 158 <%= text_field_tag 'issue[due_date]', '', :value => @issue_params[:due_date], :size => 10 %><%= calendar_for('issue_due_date') %>
159 159 <label class="inline"><%= check_box_tag 'issue[due_date]', 'none', (@issue_params[:due_date] == 'none'), :id => nil, :data => {:disables => '#issue_due_date'} %><%= l(:button_clear) %></label>
160 160 </p>
161 161 <% end %>
162 162
163 <% if @safe_attributes.include?('estimated_hours') %>
164 <p>
165 <label for='issue_estimated_hours'><%= l(:field_estimated_hours) %></label>
166 <%= text_field_tag 'issue[estimated_hours]', '', :value => @issue_params[:estimated_hours], :size => 10 %>
167 <label class="inline"><%= check_box_tag 'issue[estimated_hours]', 'none', (@issue_params[:estimated_hours] == 'none'), :id => nil, :data => {:disables => '#issue_estimated_hours'} %><%= l(:button_clear) %></label>
168 </p>
169 <% end %>
170
163 171 <% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
164 172 <p>
165 173 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
166 174 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }, @issue_params[:done_ratio]) %>
167 175 </p>
168 176 <% end %>
169 177 </div>
170 178 </fieldset>
171 179
172 180 <fieldset>
173 181 <legend><%= l(:field_notes) %></legend>
174 182 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
175 183 <%= wikitoolbar_for 'notes' %>
176 184 </fieldset>
177 185 </div>
178 186
179 187 <p>
180 188 <% if @copy %>
181 189 <%= hidden_field_tag 'copy', '1' %>
182 190 <%= submit_tag l(:button_copy) %>
183 191 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
184 192 <% elsif @target_project %>
185 193 <%= submit_tag l(:button_move) %>
186 194 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
187 195 <% else %>
188 196 <%= submit_tag l(:button_submit) %>
189 197 <% end %>
190 198 </p>
191 199
192 200 <% end %>
193 201
194 202 <%= javascript_tag do %>
195 203 $(window).load(function(){
196 204 $(document).on('change', 'input[data-disables]', function(){
197 205 if ($(this).prop('checked')){
198 206 $($(this).data('disables')).attr('disabled', true).val('');
199 207 } else {
200 208 $($(this).data('disables')).attr('disabled', false);
201 209 }
202 210 });
203 211 });
204 212 $(document).ready(function(){
205 213 $('input[data-disables]').trigger('change');
206 214 });
207 215 <% end %>
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now