diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index eee68c6d6d..2714347414 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -218,14 +218,13 @@ {{ block.super }} $(".slidey").change(function() { - var field = $(this).attr('field'); + var field = $(this).attr('fieldname'); var checked = $(this).prop('checked'); var data = {}; data[field] = checked; - // Update the particular field inventreePut("{% url 'api-part-detail' part.id %}", data, @@ -235,50 +234,5 @@ }, ); }); - - $('#activate-part').click(function() { - showQuestionDialog( - 'Activate Part?', - 'Are you sure you wish to reactivate {{ part.full_name }}?', - { - accept_text: 'Activate', - accept: function() { - inventreePut( - "{% url 'api-part-detail' part.id %}", - { - active: true, - }, - { - method: 'PATCH', - reloadOnSuccess: true, - } - ); - } - }, - ); - }); - - $('#deactivate-part').click(function() { - showQuestionDialog( - 'Deactivate Part?', - `Are you sure you wish to deactivate {{ part.full_name }}?
- `, - { - accept_text: 'Deactivate', - accept: function() { - inventreePut( - "{% url 'api-part-detail' part.id %}", - { - active: false, - }, - { - method: 'PATCH', - reloadOnSuccess: true, - } - ); - } - } - ); - }); {% endblock %} diff --git a/InvenTree/templates/slide.html b/InvenTree/templates/slide.html index 14afc4aa04..e2fe2e932f 100644 --- a/InvenTree/templates/slide.html +++ b/InvenTree/templates/slide.html @@ -1,3 +1,3 @@
- +
\ No newline at end of file