mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
ac5683cf4d
commit
3c5d95ce99
@ -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 %}
|
||||
@ -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.')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user