diff --git a/backend/static/js/Options.js b/backend/static/js/Options.js index 30ccdf8..454355b 100644 --- a/backend/static/js/Options.js +++ b/backend/static/js/Options.js @@ -28,6 +28,33 @@ export class BooleanOption { } } +export class CheckboxOption { + constructor(checkbox, callable, defaultValue) { + this.checkbox = checkbox; + this.callable = callable; + this.defaultValue = defaultValue || false; + } + + get() { + return this.checkbox.filter(":checked").val() + } + + set(value) { + this.checkbox.filter("[value=" + value + "]").prop("checked", true) + } + + call(value) { + this.callable(value) + } + + selector() { + return this.checkbox + } + + default() { + return this.defaultValue + } +} export class Options { constructor(options) { this.options = options diff --git a/pdf/templates/pdf/requests/list.html b/pdf/templates/pdf/requests/list.html index f9070e0..6345e8b 100644 --- a/pdf/templates/pdf/requests/list.html +++ b/pdf/templates/pdf/requests/list.html @@ -1,6 +1,7 @@ {% extends "base/frame.html" %} {% load i18n %} {% load types %} +{% load static %} {% block title %} {% trans "PDF Requests" %} {% endblock %} {% block header %} {% trans "PDF Requests" %} {% endblock %} @@ -8,12 +9,14 @@ {% block extra_head %} + + {% endblock %} {% block framed_body %}