* introduces bootstrap class form-control for proper html form input rendering
* fixes bug where missing shared users for an entry resulted in a None exception
* adds GenerateInput with template in generate-content-input.html, which provides a generate button for fetching server-side content
* adds/updates translations
This commit is contained in:
2021-09-27 13:57:56 +02:00
parent 78ef1b79af
commit ea0a07890c
12 changed files with 277 additions and 193 deletions

View File

@@ -12,4 +12,21 @@ class DummyFilterInput(forms.HiddenInput):
class TextToClipboardInput(forms.TextInput):
template_name = "konova/custom_widgets/text-to-clipboard-input.html"
template_name = "konova/custom_widgets/text-to-clipboard-input.html"
class GenerateInput(forms.TextInput):
"""
Provides a form group with a button at the end, which generates new content for the input.
The url used to fetch new content can be added using the attrs like
widget=GenerateInput(
attrs={
"url": reverse_lazy("app_name:view_name")
...
}
)
"""
template_name = "konova/custom_widgets/generate-content-input.html"