From 3c5d95ce99f96705e9779ef1459dd18993cb4a71 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 30 Aug 2022 22:14:33 -0700 Subject: [PATCH] gitweb: Use generic form template for create/edit repository Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- .../gitweb/templates/gitweb_create_edit.html | 23 ------------------- plinth/modules/gitweb/views.py | 4 ++-- 2 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 plinth/modules/gitweb/templates/gitweb_create_edit.html diff --git a/plinth/modules/gitweb/templates/gitweb_create_edit.html b/plinth/modules/gitweb/templates/gitweb_create_edit.html deleted file mode 100644 index 2e08d5ebf..000000000 --- a/plinth/modules/gitweb/templates/gitweb_create_edit.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "base.html" %} -{% comment %} -# SPDX-License-Identifier: AGPL-3.0-or-later -{% endcomment %} - -{% load bootstrap %} -{% load i18n %} -{% load static %} - -{% block content %} - -

{{ title }}

- -
- {% csrf_token %} - - {{ form|bootstrap }} - - -
- -{% endblock %} diff --git a/plinth/modules/gitweb/views.py b/plinth/modules/gitweb/views.py index 6404649be..a963fcb8d 100644 --- a/plinth/modules/gitweb/views.py +++ b/plinth/modules/gitweb/views.py @@ -42,7 +42,7 @@ class CreateRepoView(SuccessMessageMixin, FormView): form_class = CreateRepoForm prefix = 'gitweb' - template_name = 'gitweb_create_edit.html' + template_name = 'form.html' success_url = reverse_lazy('gitweb:index') success_message = _('Repository created.') @@ -81,7 +81,7 @@ class EditRepoView(SuccessMessageMixin, FormView): form_class = EditRepoForm prefix = 'gitweb' - template_name = 'gitweb_create_edit.html' + template_name = 'form.html' success_url = reverse_lazy('gitweb:index') success_message = _('Repository edited.')