diff --git a/authentik/admin/templates/administration/stage_invitation/list.html b/authentik/admin/templates/administration/stage_invitation/list.html index 109c755d4..ec753169e 100644 --- a/authentik/admin/templates/administration/stage_invitation/list.html +++ b/authentik/admin/templates/administration/stage_invitation/list.html @@ -37,8 +37,9 @@
{% trans 'ID' %} | +{% trans 'Created by' %} | {% trans 'Expiry' %} | -{% trans 'Link' %} | |
---|---|---|---|---|
- {{ invitation.expiry }} + {{ invitation.invite_uuid }} | - {{ invitation.Link }} + {{ invitation.created_by }} + + | ++ + {{ invitation.expiry|default:"-" }} | diff --git a/authentik/stages/invitation/forms.py b/authentik/stages/invitation/forms.py index 0e3b2094f..5a1c74d12 100644 --- a/authentik/stages/invitation/forms.py +++ b/authentik/stages/invitation/forms.py @@ -25,8 +25,5 @@ class InvitationForm(forms.ModelForm): model = Invitation fields = ["expires", "fixed_data"] - labels = { - "fixed_data": _("Optional fixed data to enforce on user enrollment."), - } widgets = {"fixed_data": CodeMirrorWidget()} field_classes = {"fixed_data": YAMLField} diff --git a/authentik/stages/invitation/migrations/0002_auto_20201225_2143.py b/authentik/stages/invitation/migrations/0002_auto_20201225_2143.py new file mode 100644 index 000000000..fc5fa67b9 --- /dev/null +++ b/authentik/stages/invitation/migrations/0002_auto_20201225_2143.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.4 on 2020-12-25 21:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_stages_invitation", "0001_initial"), + ] + + operations = [ + migrations.AlterField( + model_name="invitation", + name="fixed_data", + field=models.JSONField(blank=True, default=dict), + ), + ] diff --git a/authentik/stages/invitation/models.py b/authentik/stages/invitation/models.py index f5f3bf510..be3982744 100644 --- a/authentik/stages/invitation/models.py +++ b/authentik/stages/invitation/models.py @@ -61,7 +61,11 @@ class Invitation(models.Model): created_by = models.ForeignKey(User, on_delete=models.CASCADE) expires = models.DateTimeField(default=None, blank=True, null=True) - fixed_data = models.JSONField(default=dict) + fixed_data = models.JSONField( + default=dict, + blank=True, + help_text=_("Optional fixed data to enforce on user enrollment."), + ) def __str__(self): return f"Invitation {self.invite_uuid.hex} created by {self.created_by}" |