diff --git a/passbook/admin/templates/administration/application/list.html b/passbook/admin/templates/administration/application/list.html index 20be356fb..711f19443 100644 --- a/passbook/admin/templates/administration/application/list.html +++ b/passbook/admin/templates/administration/application/list.html @@ -12,7 +12,7 @@

{% trans "Applications" %}

{% trans "External Applications which use passbook as Identity-Provider, utilizing protocols like OAuth2 and SAML." %}
- + {% trans 'Create...' %}
diff --git a/passbook/admin/templates/administration/factor/list.html b/passbook/admin/templates/administration/factor/list.html index 9b73498da..31a0721bd 100644 --- a/passbook/admin/templates/administration/factor/list.html +++ b/passbook/admin/templates/administration/factor/list.html @@ -21,7 +21,7 @@ diff --git a/passbook/admin/templates/administration/invitation/list.html b/passbook/admin/templates/administration/invitation/list.html index 9d1442538..253c5d8fe 100644 --- a/passbook/admin/templates/administration/invitation/list.html +++ b/passbook/admin/templates/administration/invitation/list.html @@ -12,7 +12,7 @@

{% trans "Invitations" %}

{% trans "Create Invitation Links which optionally force a username or expire on a set date." %}
- + {% trans 'Create...' %}
diff --git a/passbook/admin/templates/administration/policy/list.html b/passbook/admin/templates/administration/policy/list.html index ed41d1512..b3949b593 100644 --- a/passbook/admin/templates/administration/policy/list.html +++ b/passbook/admin/templates/administration/policy/list.html @@ -20,7 +20,7 @@ diff --git a/passbook/admin/templates/administration/provider/list.html b/passbook/admin/templates/administration/provider/list.html index 43e84e7ba..0887b0000 100644 --- a/passbook/admin/templates/administration/provider/list.html +++ b/passbook/admin/templates/administration/provider/list.html @@ -21,7 +21,7 @@ diff --git a/passbook/admin/templates/administration/source/list.html b/passbook/admin/templates/administration/source/list.html index f87bd176a..b7c00ec16 100644 --- a/passbook/admin/templates/administration/source/list.html +++ b/passbook/admin/templates/administration/source/list.html @@ -17,7 +17,7 @@ diff --git a/passbook/admin/templates/generic/create.html b/passbook/admin/templates/generic/create.html index f21f2f4ff..d38a9501a 100644 --- a/passbook/admin/templates/generic/create.html +++ b/passbook/admin/templates/generic/create.html @@ -3,9 +3,9 @@ {% load i18n %} {% block above_form %} -

{% trans 'Create' %}

+

{% blocktrans with type=type %}Create {{ type }}{% endblocktrans %}

{% endblock %} {% block action %} -{% trans 'Create' %} +{% blocktrans with type=type %}Create {{ type }}{% endblocktrans %} {% endblock %} diff --git a/passbook/admin/views/applications.py b/passbook/admin/views/applications.py index bf9b5eb37..8e5f58b6d 100644 --- a/passbook/admin/views/applications.py +++ b/passbook/admin/views/applications.py @@ -30,6 +30,10 @@ class ApplicationCreateView(SuccessMessageMixin, AdminRequiredMixin, CreateView) success_url = reverse_lazy('passbook_admin:applications') success_message = _('Successfully created Application') + def get_context_data(self, **kwargs): + kwargs['type'] = 'Application' + return super().get_context_data(**kwargs) + class ApplicationUpdateView(SuccessMessageMixin, AdminRequiredMixin, UpdateView): """Update application""" diff --git a/passbook/admin/views/invitations.py b/passbook/admin/views/invitations.py index 1b957e23b..a203e05cf 100644 --- a/passbook/admin/views/invitations.py +++ b/passbook/admin/views/invitations.py @@ -27,6 +27,10 @@ class InvitationCreateView(SuccessMessageMixin, AdminRequiredMixin, CreateView): success_message = _('Successfully created Invitation') form_class = InvitationForm + def get_context_data(self, **kwargs): + kwargs['type'] = 'Invitation' + return super().get_context_data(**kwargs) + def form_valid(self, form): obj = form.save(commit=False) obj.created_by = self.request.user