* 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

@@ -31,7 +31,8 @@ class ShareInterventionModalForm(BaseModalForm):
required=False,
widget=TextToClipboardInput(
attrs={
"readonly": True
"readonly": True,
"class": "form-control",
}
)
)
@@ -109,6 +110,7 @@ class NewRevocationModalForm(BaseModalForm):
attrs={
"type": "date",
"data-provide": "datepicker",
"class": "form-control",
},
format="%d.%m.%Y"
)
@@ -120,7 +122,7 @@ class NewRevocationModalForm(BaseModalForm):
help_text=_("Must be smaller than 15 Mb"),
widget=forms.FileInput(
attrs={
"class": "w-75"
"class": "form-control-file"
}
)
)
@@ -134,13 +136,11 @@ class NewRevocationModalForm(BaseModalForm):
attrs={
"cols": 30,
"rows": 5,
"class": "form-control",
}
)
)
# Define w-100 for all form fields
full_width_fields = True
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.form_title = _("Add revocation")
@@ -274,6 +274,11 @@ class NewDeductionModalForm(BaseModalForm):
label=_("Surface"),
label_suffix="",
help_text=_("in m²"),
widget=forms.NumberInput(
attrs={
"class": "form-control",
}
)
)
intervention = forms.ModelChoiceField(
label=_("Intervention"),
@@ -289,9 +294,6 @@ class NewDeductionModalForm(BaseModalForm):
),
)
# Define w-100 for all form fields
full_width_fields = True
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.form_title = _("New Deduction")