Skip to content

Commit

Permalink
[ui] Remove Disable/Enable Plan buttons
Browse files Browse the repository at this point in the history
These buttons are backed by the deprecated ajax.py:update view
which we'd like to remove or at least not use as much as possible.

Given that enabling/disabling can be done by editting the TP and
clicking the Active checkbox I don't see a reason why we should
have these 2 buttons in a prominent place.

Plus as it is enabling and disabling doesn't keep track of history!
  • Loading branch information
atodorov committed Jul 9, 2018
1 parent 728fb36 commit 219ace6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
13 changes: 0 additions & 13 deletions tcms/static/js/testplan_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,19 +870,6 @@ Nitrate.TestPlans.Details = {
Nitrate.TestPlans.Details.reviewingCasesTabOpened = true;
}
});

// Initial the enable/disble btns
if (jQ('#btn_disable').length) {
jQ('#btn_disable').bind('click', function(e){
updateObject('testplans.testplan', plan_id, 'is_active', 'False', 'bool', reloadWindow);
});
}

if (jQ('#btn_enable').length) {
jQ('#btn_enable').bind('click', function(e) {
updateObject('testplans.testplan', plan_id, 'is_active', 'True', 'bool', reloadWindow);
});
}
},
'reopenCasesTabThen': function() {
Nitrate.TestPlans.Details.testcasesTabOpened = false;
Expand Down
5 changes: 0 additions & 5 deletions tcms/templates/plan/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
<span id="id_buttons" class="button">
<input id="btn_edit" type="button" value="Edit Plan " title="Edit test plan" data-param="{% url 'plan-edit' test_plan.plan_id %}" {% if perms.testplans.change_testplan %}{% else%}disabled{% endif %}>
<input id="btn_clone" type="button" value="Clone Plan" title="Clone this plan to other product" data-params='["{% url "plans-clone" %}", {{ test_plan.plan_id }}]' {% if perms.testplans.add_testplan %}{% else %}disabled{% endif %}>
{% if test_plan.is_active %}
<input id="btn_disable" type="button" value="Disable Plan " title="Disabled this plan" {% if not perms.testplans.change_testplan %}disabled="true"{% endif %}>
{% else %}
<input id="btn_enable" type="button" value="Enable Plan " title="Enabled this plan" {% if not perms.testplans.change_testplan %}disabled="true"{% endif %}>
{% endif %}
<input id="btn_print" type="button" value="Print Plan "
title="Print Plan"
data-params='["{% url "plans-printable" %}", {{ test_plan.pk }}]'>
Expand Down

0 comments on commit 219ace6

Please sign in to comment.