sources/saml: move labels from forms to models
This commit is contained in:
parent
721d133dc3
commit
e138076e1d
|
@ -28,11 +28,6 @@ class SAMLSourceForm(forms.ModelForm):
|
||||||
"auto_logout",
|
"auto_logout",
|
||||||
"signing_cert",
|
"signing_cert",
|
||||||
]
|
]
|
||||||
labels = {
|
|
||||||
"entity_id": "Entity ID",
|
|
||||||
"idp_url": "IDP URL",
|
|
||||||
"idp_logout_url": "IDP Logout URL",
|
|
||||||
}
|
|
||||||
widgets = {
|
widgets = {
|
||||||
"name": forms.TextInput(),
|
"name": forms.TextInput(),
|
||||||
"policies": FilteredSelectMultiple(_("policies"), False),
|
"policies": FilteredSelectMultiple(_("policies"), False),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""saml sp models"""
|
"""saml sp models"""
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.urls import reverse_lazy
|
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
|
from passbook.core.models import Source
|
||||||
|
|
||||||
|
@ -9,9 +9,11 @@ from passbook.core.models import Source
|
||||||
class SAMLSource(Source):
|
class SAMLSource(Source):
|
||||||
"""SAML2 Source"""
|
"""SAML2 Source"""
|
||||||
|
|
||||||
entity_id = models.TextField(blank=True, default=None)
|
entity_id = models.TextField(blank=True, default=None, verbose_name=_("Entity ID"))
|
||||||
idp_url = models.URLField()
|
idp_url = models.URLField(verbose_name=_("IDP URL"))
|
||||||
idp_logout_url = models.URLField(default=None, blank=True, null=True)
|
idp_logout_url = models.URLField(
|
||||||
|
default=None, blank=True, null=True, verbose_name=_("IDP Logout URL")
|
||||||
|
)
|
||||||
auto_logout = models.BooleanField(default=False)
|
auto_logout = models.BooleanField(default=False)
|
||||||
signing_cert = models.TextField()
|
signing_cert = models.TextField()
|
||||||
|
|
||||||
|
|
Reference in a new issue