Skip to content

Commit

Permalink
fix delete button on torrent view
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiloutre committed Oct 12, 2017
1 parent 0cb3c55 commit 3f6ca84
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions templates/site/torrents/view.jet.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ <h1 style="text-align: center;" class="torrent-hr">{{Torrent.Name}}</h1>
{{ if User.ID > 0}}
<a id="reportPopup" href="#" class="form-input">{{ T("report_btn") }}</a>
{{ if User.HasAdmin()}}
<a href="/mod/torrent/delete?id={{ Torrent.ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;">{{ T("delete") }}</a>
<form method="POST" action="/mod/torrent/delete">
<input type="hidden" name="id" value="{{ Torrent.ID }}">
<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>
<a href="/mod/torrent?id={{ Torrent.ID }}" class="form-input btn-orange">{{ T("edit") }}</a>
{{ else if User.CurrentUserIdentical(Torrent.UploaderID) }}
<a href="/torrent/delete?id={{ Torrent.ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;">{{ T("delete") }}</a>
<form method="POST" action="/torrent/delete">
<input type="hidden" name="id" value="{{ Torrent.ID }}">
<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>
<a href="/torrent?id={{ Torrent.ID }}" class="form-input btn-orange">{{ T("edit") }}</a>
{{end}}
{{end}}
Expand Down

0 comments on commit 3f6ca84

Please sign in to comment.