Merge pull request '#271 Identifier non editable' (#272) from 271_Identifier_non-editable into master

Reviewed-on: SGD-Nord/konova#272
pull/273/head
mpeltriaux 2 years ago
commit 7585551beb

@ -30,11 +30,12 @@ class AbstractCompensationForm(BaseForm):
label=_("Identifier"), label=_("Identifier"),
label_suffix="", label_suffix="",
max_length=255, max_length=255,
help_text=_("Generated automatically"), help_text=_("Generated automatically - not editable"),
widget=GenerateInput( widget=GenerateInput(
attrs={ attrs={
"class": "form-control", "class": "form-control",
"url": None, # Needs to be set in inheriting constructors "url": None, # Needs to be set in inheriting constructors
"readonly": True,
} }
) )
) )

@ -29,11 +29,12 @@ class NewInterventionForm(BaseForm):
label=_("Identifier"), label=_("Identifier"),
label_suffix="", label_suffix="",
max_length=255, max_length=255,
help_text=_("Generated automatically"), help_text=_("Generated automatically - not editable"),
widget=GenerateInput( widget=GenerateInput(
attrs={ attrs={
"class": "form-control", "class": "form-control",
"url": reverse_lazy("intervention:new-id"), "url": reverse_lazy("intervention:new-id"),
"readonly": True,
} }
) )
) )

Binary file not shown.

@ -365,8 +365,8 @@ msgstr "Kennung"
#: compensation/forms/compensation.py:33 intervention/forms/intervention.py:32 #: compensation/forms/compensation.py:33 intervention/forms/intervention.py:32
#: user/forms/user.py:77 #: user/forms/user.py:77
msgid "Generated automatically" msgid "Generated automatically - not editable"
msgstr "Automatisch generiert" msgstr "Automatisch generiert - nicht bearbeitbar"
#: compensation/forms/compensation.py:42 compensation/tables/compensation.py:28 #: compensation/forms/compensation.py:42 compensation/tables/compensation.py:28
#: compensation/tables/eco_account.py:28 #: compensation/tables/eco_account.py:28

@ -74,7 +74,7 @@ class UserAPITokenForm(BaseForm):
label_suffix="", label_suffix="",
max_length=255, max_length=255,
required=True, required=True,
help_text=_("Generated automatically"), help_text=_("Generated automatically - not editable"),
widget=GenerateInput( widget=GenerateInput(
attrs={ attrs={
"class": "form-control", "class": "form-control",

Loading…
Cancel
Save