mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-04 06:39:38 +00:00
The cancel operation in the issue edit mode doesn't work (#21579).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16361 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
331c1f674d
commit
299c3de64e
@ -69,7 +69,7 @@
|
||||
<%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' %>
|
||||
| <%= link_to l(:button_cancel), {}, :onclick => "$('#update').hide(); return false;" %>
|
||||
| <%= link_to l(:button_cancel), issue_path(id: @issue.id), :onclick => params[:action] == 'show' ? "$('#update').hide(); return false;" : '' %>
|
||||
|
||||
<%= hidden_field_tag 'prev_issue_id', @prev_issue_id if @prev_issue_id %>
|
||||
<%= hidden_field_tag 'next_issue_id', @next_issue_id if @next_issue_id %>
|
||||
|
||||
@ -4852,4 +4852,20 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
User.add_to_project(user, Project.find(2), Role.find_by_name('Manager'))
|
||||
user
|
||||
end
|
||||
|
||||
def test_cancel_edit_link_for_issue_show_action_should_have_onclick_action
|
||||
@request.session[:user_id] = 1
|
||||
|
||||
get :show, :id => 1
|
||||
assert_response :success
|
||||
assert_select 'a[href=?][onclick=?]', "/issues/1", "$('#update').hide(); return false;", :text => 'Cancel'
|
||||
end
|
||||
|
||||
def test_cancel_edit_link_for_issue_edit_action_should_not_have_onclick_action
|
||||
@request.session[:user_id] = 1
|
||||
|
||||
get :edit, :id => 1
|
||||
assert_response :success
|
||||
assert_select 'a[href=?][onclick=?]', "/issues/1", "", :text => 'Cancel'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user