Compensation control
* removes CompensationControl model * adds comment field to CompensationAction * adds max length of 200 for comment fields in forms * adds rendering of error messages in case of invalid form input * adds/updates translations
This commit is contained in:
@@ -178,9 +178,10 @@ class NewDeadlineModalForm(BaseModalForm):
|
||||
)
|
||||
comment = forms.CharField(
|
||||
required=False,
|
||||
max_length=200,
|
||||
label=_("Comment"),
|
||||
label_suffix=_(""),
|
||||
help_text=_("Additional comment"),
|
||||
help_text=_("Additional comment, maximum {} letters").format(200),
|
||||
widget=forms.Textarea(
|
||||
attrs={
|
||||
"cols": 30,
|
||||
@@ -239,9 +240,10 @@ class NewActionModalForm(BaseModalForm):
|
||||
)
|
||||
comment = forms.CharField(
|
||||
required=False,
|
||||
max_length=200,
|
||||
label=_("Comment"),
|
||||
label_suffix=_(""),
|
||||
help_text=_("Additional comment"),
|
||||
help_text=_("Additional comment, maximum {} letters").format(200),
|
||||
widget=forms.Textarea(
|
||||
attrs={
|
||||
"cols": 30,
|
||||
@@ -265,6 +267,7 @@ class NewActionModalForm(BaseModalForm):
|
||||
action_type=self.cleaned_data["action_type"],
|
||||
amount=self.cleaned_data["amount"],
|
||||
unit=self.cleaned_data["unit"],
|
||||
comment=self.cleaned_data["comment"],
|
||||
created=user_action,
|
||||
)
|
||||
self.instance.actions.add(comp_action)
|
||||
|
||||
Reference in New Issue
Block a user