From d949cd7866446e30ca3c14926358fc91f1535ded Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 28 May 2024 16:27:09 +0200 Subject: ✏️ geo, document form: fix label for "Site" when configuration is checked (refs #5890) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/forms_common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ishtar_common/forms_common.py') diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 5b2c83f93..6d6e411e3 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -2253,14 +2253,14 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): if kwargs.get("user", None): self.user = kwargs.pop("user") self.is_instancied = bool(kwargs.get("instance", False)) - super(DocumentForm, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) fields = OrderedDict() for related_key in models.Document.RELATED_MODELS_ALT: model = models.Document._meta.get_field(related_key).related_model fields[related_key] = widgets.Select2MultipleField( model=model, remote=True, - label=model._meta.verbose_name_plural, + label=model.get_label_for_model_plural(), required=False, style="width: 100%", ) @@ -3175,7 +3175,7 @@ class GISForm(forms.ModelForm, CustomForm, ManageOldType): fields[related_key] = widgets.Select2MultipleField( model=model, remote=True, - label=model._meta.verbose_name_plural, + label=model.get_label_for_model_plural(), required=False, style="width: 100%", ) -- cgit v1.2.3