#7 New Form
* adds EditEcoAccountForm * adds placeholders for some form fields * changes comment card in detail view into rlp-grayish * adds eco account detail view comment box * removes unnecessary loading of dal scripts in view.html * refactors generated identifier for data objects (10 digits to 6 uppercase letter-digit combination) * improves generate_random_string() method by adding more options for generation of strings * adds/updates translations
This commit is contained in:
@@ -60,6 +60,7 @@ class NewInterventionForm(BaseForm):
|
||||
widget=autocomplete.ModelSelect2(
|
||||
url="codes-process-type-autocomplete",
|
||||
attrs={
|
||||
"data-placeholder": _("Click for selection"),
|
||||
}
|
||||
),
|
||||
)
|
||||
@@ -76,6 +77,7 @@ class NewInterventionForm(BaseForm):
|
||||
widget=autocomplete.ModelSelect2Multiple(
|
||||
url="codes-law-autocomplete",
|
||||
attrs={
|
||||
"data-placeholder": _("Click for selection"),
|
||||
}
|
||||
),
|
||||
)
|
||||
@@ -91,6 +93,7 @@ class NewInterventionForm(BaseForm):
|
||||
widget=autocomplete.ModelSelect2(
|
||||
url="codes-registration-office-autocomplete",
|
||||
attrs={
|
||||
"data-placeholder": _("Click for selection"),
|
||||
}
|
||||
),
|
||||
)
|
||||
@@ -106,6 +109,7 @@ class NewInterventionForm(BaseForm):
|
||||
widget=autocomplete.ModelSelect2(
|
||||
url="codes-conservation-office-autocomplete",
|
||||
attrs={
|
||||
"data-placeholder": _("Click for selection"),
|
||||
}
|
||||
),
|
||||
)
|
||||
|
||||
@@ -277,6 +277,7 @@ class NewDeductionModalForm(BaseModalForm):
|
||||
widget=forms.NumberInput(
|
||||
attrs={
|
||||
"class": "form-control",
|
||||
"placeholder": "0,00",
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -300,9 +301,6 @@ class NewDeductionModalForm(BaseModalForm):
|
||||
self.form_caption = _("Enter the information for a new deduction from a chosen eco-account")
|
||||
self.is_intervention_initially = False
|
||||
|
||||
# Add a placeholder for field 'surface' without having to define the whole widget above
|
||||
self.add_placeholder_for_field("surface", "0,00")
|
||||
|
||||
# Check for Intervention or EcoAccount
|
||||
if isinstance(self.instance, Intervention):
|
||||
# Form has been called with a given intervention
|
||||
|
||||
Reference in New Issue
Block a user