gitweb: Use generic form template for create/edit repository

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-08-30 22:14:33 -07:00 committed by James Valleroy
parent ac5683cf4d
commit 3c5d95ce99
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 2 additions and 25 deletions

View File

@ -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 %}
<h3>{{ title }}</h3>
<form class="form" method="post">
{% csrf_token %}
{{ form|bootstrap }}
<input type="submit" class="btn btn-primary"
value="{% trans "Submit" %}"/>
</form>
{% endblock %}

View File

@ -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.')