diff --git a/static/js/lagerregal.js b/static/js/lagerregal.js index a3c6b896..4d9758b3 100644 --- a/static/js/lagerregal.js +++ b/static/js/lagerregal.js @@ -108,9 +108,13 @@ }); $('[data-timeago]').timeago(); - $('[data-toggle="popover"]').popover({ - sanitize: false, - }); $('#id_duedate').datepicker(); + + $(document).on('submit', 'form[data-confirm]', function(event) { + var msg = $(this).data('confirm'); + if (!window.confirm(msg)) { + event.preventDefault(); + } + }); }); })(); diff --git a/templates/devices/device_detail.html b/templates/devices/device_detail.html index 64db9c1e..8fcc90cb 100644 --- a/templates/devices/device_detail.html +++ b/templates/devices/device_detail.html @@ -41,29 +41,24 @@ {% if can_change_device or can_delete_device %}
  • {% endif %} {% if can_change_device %} -
  • " - data-content="
    {% csrf_token %}
    " - class="dropdown-cancel">{% trans "Move to storage" %}
  • -
  • " - data-content="
    {% csrf_token %}
    " - class="dropdown-cancel">{% trans "Archive" %}
  • -
  • {% csrf_token %}" - class="dropdown-cancel">{% trans "Trash" %}
  • +
  • +
    + {% csrf_token %} + + +
  • +
  • + + {% csrf_token %} + + +
  • +
  • + + {% csrf_token %} + + +
  • {% endif %} {% if can_change_device %}