#7 New forms
* 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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user