Feature #25381 ยป project_selector_on_log_time_edit_form.patch
| app/views/timelog/_form.html.erb | ||
|---|---|---|
| 10 | 10 | <% else %> | 
| 11 | 11 | <p><%= f.select :project_id, project_tree_options_for_select(Project.allowed_to(:log_time).to_a, :selected => @time_entry.project, :include_blank => true) %></p> | 
| 12 | 12 | <% end %> | 
| 13 | <% else %> | |
| 14 | <p><%= f.select :project_id, project_tree_options_for_select(Project.allowed_to(:log_time).to_a, :selected => @time_entry.project, :include_blank => true) %></p> | |
| 13 | 15 | <% end %> | 
| 14 | 16 | <p> | 
| 15 | 17 | <%= f.text_field :issue_id, :size => 6 %> | 
| ... | ... | |
| 38 | 40 | }); | 
| 39 | 41 | }); | 
| 40 | 42 | }); | 
| 43 | <% else %> | |
| 44 |   $(document).ready(function(){ | |
| 45 |     $('#time_entry_project_id, #time_entry_issue_id').change(function(){ | |
| 46 |       $.ajax({ | |
| 47 | url: '<%= escape_javascript new_time_entry_path(:format => 'js') %>', | |
| 48 | type: 'post', | |
| 49 |         data: $('.edit_time_entry').serialize().replace('&_method=patch','') | |
| 50 | }); | |
| 51 | }); | |
| 52 | }); | |
| 41 | 53 | <% end %> | 
| 42 | 54 | |
| 43 | 55 |   observeAutocompleteField('time_entry_issue_id', '<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (@project ? nil : 'all'))%>', { |