diff --git a/passbook/sources/saml/forms.py b/passbook/sources/saml/forms.py index 3039da775..14e350e78 100644 --- a/passbook/sources/saml/forms.py +++ b/passbook/sources/saml/forms.py @@ -28,11 +28,6 @@ class SAMLSourceForm(forms.ModelForm): "auto_logout", "signing_cert", ] - labels = { - "entity_id": "Entity ID", - "idp_url": "IDP URL", - "idp_logout_url": "IDP Logout URL", - } widgets = { "name": forms.TextInput(), "policies": FilteredSelectMultiple(_("policies"), False), diff --git a/passbook/sources/saml/models.py b/passbook/sources/saml/models.py index c28474935..ae4cb6c6b 100644 --- a/passbook/sources/saml/models.py +++ b/passbook/sources/saml/models.py @@ -1,7 +1,7 @@ """saml sp models""" from django.db import models from django.urls import reverse_lazy -from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy as _ from passbook.core.models import Source @@ -9,9 +9,11 @@ from passbook.core.models import Source class SAMLSource(Source): """SAML2 Source""" - entity_id = models.TextField(blank=True, default=None) - idp_url = models.URLField() - idp_logout_url = models.URLField(default=None, blank=True, null=True) + entity_id = models.TextField(blank=True, default=None, verbose_name=_("Entity ID")) + idp_url = models.URLField(verbose_name=_("IDP URL")) + idp_logout_url = models.URLField( + default=None, blank=True, null=True, verbose_name=_("IDP Logout URL") + ) auto_logout = models.BooleanField(default=False) signing_cert = models.TextField()