diff --git a/app/views/issues/edit.js.erb b/app/views/issues/edit.js.erb index ed8fc3ca8..9ccc78ad2 100644 --- a/app/views/issues/edit.js.erb +++ b/app/views/issues/edit.js.erb @@ -1 +1,6 @@ -replaceIssueFormWith('<%= escape_javascript(render :partial => 'edit') %>'); +replaceIssueFormWith('<%= escape_javascript(render :partial => 'form') %>'); +<% if User.current.allowed_to?(:log_time, @issue.project) %> + $('#log_time').show(); +<% else %> + $('#log_time').hide(); +<% end %> diff --git a/public/javascripts/application.js b/public/javascripts/application.js index efff38da7..91da19229 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -622,13 +622,8 @@ function replaceIssueFormWith(html){ replacement.find('#'+object_id).val($(this).val()); } }); - - if ($('form.new_issue').length > 0) { - $('#all_attributes').empty(); - $('#all_attributes').prepend(replacement); - } else { - $('#issue-form').replaceWith(replacement); - } + $('#all_attributes').empty(); + $('#all_attributes').prepend(replacement); } function updateBulkEditFrom(url) {