WIP: CompensationAction using jstree

This commit is contained in:
2022-02-11 14:13:42 +01:00
parent 925d5f5070
commit 23790bca8d
10 changed files with 126 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
from django import forms
from django.urls import reverse
class DummyFilterInput(forms.HiddenInput):
@@ -30,3 +31,17 @@ class GenerateInput(forms.TextInput):
"""
template_name = "konova/widgets/generate-content-input.html"
class TreeSelectMultiple(forms.SelectMultiple):
""" Provides multiple selection of parent-child data
"""
template_name = "konova/widgets/checkbox-tree-select-base.html"
url = None
def __init__(self, *args, **kwargs):
self.url = kwargs.pop("url", None)
if self.url:
self.url = reverse(self.url)
super().__init__(*args, **kwargs)