#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:
@@ -36,7 +36,8 @@ class NewPaymentForm(BaseModalForm):
|
||||
help_text=_("in Euro"),
|
||||
widget=forms.NumberInput(
|
||||
attrs={
|
||||
"class": "form-control"
|
||||
"class": "form-control",
|
||||
"placeholder": "0,00",
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -73,7 +74,6 @@ class NewPaymentForm(BaseModalForm):
|
||||
self.intervention = self.instance
|
||||
self.form_title = _("Payment")
|
||||
self.form_caption = _("Add a payment for intervention '{}'").format(self.intervention.title)
|
||||
self.add_placeholder_for_field("amount", "0,00")
|
||||
|
||||
def is_valid(self):
|
||||
"""
|
||||
@@ -156,6 +156,7 @@ class NewStateModalForm(BaseModalForm):
|
||||
widget=forms.NumberInput(
|
||||
attrs={
|
||||
"class": "form-control",
|
||||
"placeholder": "0,00"
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -164,7 +165,6 @@ class NewStateModalForm(BaseModalForm):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.form_title = _("New state")
|
||||
self.form_caption = _("Insert data for the new state")
|
||||
self.add_placeholder_for_field("surface", "0,00")
|
||||
|
||||
def save(self, is_before_state: bool = False):
|
||||
with transaction.atomic():
|
||||
@@ -357,6 +357,7 @@ class NewActionModalForm(BaseModalForm):
|
||||
widget=forms.NumberInput(
|
||||
attrs={
|
||||
"class": "form-control",
|
||||
"placeholder": "0,00",
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -378,7 +379,6 @@ class NewActionModalForm(BaseModalForm):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.form_title = _("New action")
|
||||
self.form_caption = _("Insert data for the new action")
|
||||
self.add_placeholder_for_field("amount", "0,00")
|
||||
|
||||
def save(self):
|
||||
with transaction.atomic():
|
||||
|
||||
Reference in New Issue
Block a user