Skip to content

Commit

Permalink
Hot fix case/get.html: replace input buttons with links
Browse files Browse the repository at this point in the history
somewhere along the way these buttons broke but they are not
really needed. We just need to load the URL and not pass it
through jQuery for no reason.
  • Loading branch information
atodorov committed Sep 18, 2017
1 parent 955ec54 commit 64c9a37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions tcms/static/js/testcase_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,6 @@ Nitrate.TestCases.Details.on_load = function() {
]
});

jQ('#btn_edit,#btn_clone').bind('click', function() {
window.location.href = jQ(this).data('link');
});

jQ('.js-del-button').bind('click', function(event) {
var params = jQ(event.target).data('params');
deleConfirm(params.attachmentId, params.source, params.sourceId);
Expand Down
8 changes: 6 additions & 2 deletions tcms/templates/case/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@
{% endif %}
<div class="control">
{% if perms.testcases.change_testcase %}
<span id="id_buttons" ><input id="btn_edit" type="button" value="Edit" data-link="{% url "testcases-edit" test_case.case_id %}?from_plan={{ test_plan.plan_id }}"/></span>
<strong>
<a href="{% url "testcases-edit" test_case.case_id %}?from_plan={{ test_plan.plan_id }}">EDIT</a> |
</strong>
{% endif %}
{% if perms.testcases.add_testcaseplan %}
<span id=""><input type="button" id="btn_clone" value="Clone case" data-link="{% url "testcases-clone" %}?from_plan={{ test_plan.plan_id }}&case={{ test_case.case_id }}"/></span>
<strong>
<a href="{% url "testcases-clone" %}?from_plan={{ test_plan.plan_id }}&case={{ test_case.case_id }}">CLONE</a>
</strong>
{% endif %}
{% if test_plan %}
<span class="right-action">
Expand Down

0 comments on commit 64c9a37

Please sign in to comment.