manager: enable title overriding in import template (#45082)

This commit is contained in:
Valentin Deniaud 2020-08-24 14:41:42 +02:00
parent 621a5e978f
commit bd4b8b8eef
2 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,10 @@
{% extends "authentic2/manager/form.html" %}
{% load gadjo i18n %}
{% block page-title %}{{ title }}{% endblock %}
{% block appbar %}
<h2>{% trans "Site Import" %}</h2>
<h2>{{ title }}</h2>
{% endblock %}
{% block content %}

View File

@ -716,10 +716,11 @@ class SiteExport(View):
site_export = SiteExport.as_view()
class SiteImportView(MediaMixin, FormView):
class SiteImportView(MediaMixin, TitleMixin, FormView):
form_class = forms.SiteImportForm
template_name = 'authentic2/manager/site_import.html'
template_name = 'authentic2/manager/import_form.html'
success_url = reverse_lazy('a2-manager-homepage')
title = _('Site Import')
def form_valid(self, form):
try: