From: Marius Balteanu Date: Mon, 16 May 2022 19:38:11 +0000 (+0000) Subject: Revert changes made to issue form update in r21495 (#37053). X-Git-Tag: 5.1.0~603 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d830c892d0289c98443f4b03bc0d6ec36aade49;p=redmine.git Revert changes made to issue form update in r21495 (#37053). git-svn-id: https://svn.redmine.org/redmine/trunk@21578 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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) {