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 authored and James Valleroy committed 2022-09-03 17:28:38 -04:00
1 parent ac5683cf4d
commit 3c5d95ce99
2 files changed
+2 -25

No files matched your search

@@ -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 %}
+2 -2
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.')