Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit fa488a2

Browse files
committed
chore: correct styling, add message display
1 parent 07fab30 commit fa488a2

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

br/templates/backend/reports_list.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h3>{{ page_title }}</h3>
1616
{% for message in messages %}
1717
<div class="row">
1818
<div class="col-sm-12">
19-
<div class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %} alert-dismissable">
19+
<div class="alert {% if message.tags %}{{ message.tags|lower }}{% endif %} alert-dismissable fade show" role="alert">
2020
{{ message|safe }}
2121
<button class="btn-close" type="button" data-bs-dismss="alert" aria-label="Close"></button>
2222
</div>
@@ -84,12 +84,13 @@ <h3>{{ page_title }}</h3>
8484
</tr>
8585
</thead>
8686
<form action="{% url 'br:rep_delete' %}" id="delete_form" method="post">
87+
{% csrf_token %}
8788
<tbody>
8889
{% for report in reports %}
8990
<tr>
9091
<td>
9192
<div class="form-check">
92-
<input type="checkbox" name="reports" value="{{ report.pk }}" class="reports form-check-input" data-delete-checkbox="true">
93+
<input type="checkbox" name="{{ delete_form.reports.name }}" value="{{ report.pk }}" class="reports form-check-input" data-delete-checkbox="true">
9394
</div>
9495
</td>
9596
<td>

br/templates/backend/user_list.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,31 @@ <h3>{{ page_title }}</h3>
88
</div>
99
</div>
1010
</div>
11+
{% if messages %}
12+
{% for message in messages %}
13+
<div class="row">
14+
<div class="col-sm-12">
15+
<div class="alert {% if message.tags %}{{ message.tags|lower }}{% endif %} alert-dismissable fade show" role="alert">
16+
{{ message|safe }}
17+
<button class="btn-close" type="button" data-bs-dismss="alert" aria-label="Close"></button>
18+
</div>
19+
</div>
20+
</div>
21+
{% endfor %}
22+
{% endif %}
1123
<div class="row">
1224
<div class="col">
1325
<div class="card border-light mb-3">
1426
<div class="card-body">
1527
<div class="row g-3">
1628
<div class="col">
17-
<a href="{% url 'users:user_create' %}" class="btn btn-success mt-3">
29+
<a href="{% url 'users:user_create' %}" class="btn btn-success">
1830
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" width="20" height="20">
1931
<path fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clip-rule="evenodd" />
2032
</svg>
2133
Add new user
2234
</a>
23-
<button type="button" class="btn btn-danger invisible mt-3" id="delete_btn" data-bs-toggle="modal" data-bs-target="#deleteConfirmModal">Delete Selected</button>
35+
<button type="button" class="btn btn-danger invisible" id="delete_btn" data-bs-toggle="modal" data-bs-target="#deleteConfirmModal">Delete Selected</button>
2436
</div>
2537
</div>
2638
</div>

0 commit comments

Comments
 (0)