Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/admin/userlist.jet.html
akuma06 d3e50b8ffd Fix User delete button (#1662)
* Fix User delete button

Fix #1652
This bug comes from the fact that @kiloutre edited how the form behave and instead of a GET request, do a POST one. However every POST request not in /api or /mod need a CSRF Token to work.

* Update userlist.jet.html

* Update index.jet.html
2017-10-15 01:34:45 +02:00

33 lignes
1 Kio
HTML

{{ extends "layouts/index_admin" }}
{{ import "layouts/partials/helpers/csrf" }}
{{block title()}}{{ T("users_list") }}{{end}}
{{ block content_body()}}
<div class="results box">
<h1>{{ T("users_list") }}</h1>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-name">{{ T("username") }}</th>
<th class="tr-actions">{{ T("actions") }}</th>
</tr>
</thead>
<tbody>
{{ range Models}}
<tr>
<td class="tr-name home-td">
<a href="/user/{{.ID}}/{{.Username }}">{{ .Username }}</a>
</td>
<td class="tr-actions home-td">
{{if .ID > 0}}
<form method="POST" action="/user/{{.ID}}/{{.Username }}/delete">
{{ yield csrf_field()}}
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</button>
</form>
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{end}}