Commit 36b788e0 by Chif Gergő

request: Make template look similar to other tables on request page

Added a new panel with the header: Request fields. The field form now in the table last line.
parent 10b9ae7d
...@@ -3,16 +3,23 @@ ...@@ -3,16 +3,23 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
<div class="table-responsive"> <div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="no-margin"><i class="fa fa-phone"></i> {% trans "Request fields" %}</h3>
</div>
<div class="panel-body">
<div class="table-responsive">
<div class="table-container"> <div class="table-container">
<table class="table table-bordered table-striped table-hover" > <table class="text-center table table-bordered table-striped table-hover" >
<thead> <thead class"align-center">
<tr> <tr>
<th>{% trans "Fieldname" %}</th> <th class="text-center">{% trans "Fieldname" %}</th>
<th>{% trans "Type" %}</th> <th class="text-center">{% trans "Type" %}</th>
<th>{% trans "Choices" %}</th> <th class="text-center">{% trans "Choices" %}</th>
<th>{% trans "Required" %}</th> <th class="text-center">{% trans "Required" %}</th>
<th>{% trans "Delete" %}</th> <th class="text-center">{% trans "Delete" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -39,6 +46,10 @@ ...@@ -39,6 +46,10 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div> <!-- .table-responsive -->
</div> <!-- .panel-body -->
</div>
</div>
</div>
{% endblock %} {% endblock %}
...@@ -49,7 +49,6 @@ from django.urls import reverse_lazy ...@@ -49,7 +49,6 @@ from django.urls import reverse_lazy
class RequestFieldFormView(LoginRequiredMixin, CreateView): class RequestFieldFormView(LoginRequiredMixin, CreateView):
template_name = 'request/_request-field-form.html'
model = RequestField model = RequestField
form_class = RequestFieldModelForm form_class = RequestFieldModelForm
success_url = reverse_lazy('request.views.field-list') success_url = reverse_lazy('request.views.field-list')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment