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/user/torrent_edit.html
akuma06 c8c3dc1980 New User Edit Panel
User can edit torrents
* delete torrents
+ New translation string for mod panel and user edit torrent panel
+ Improvement of messages util with implementation of T (no need to get
Tfunc now, messages util do that for you)
+ Use of @ElegantMonkey GetCategories to generate select of categories
in search and forms
2017-05-23 01:26:09 +02:00

54 lignes
No EOL
2,7 Kio
HTML
Brut Annotations Historique

Ce fichier contient des caractères Unicode ambigus.

Ce fichier contient des caractères Unicode qui peuvent être confondus avec d'autres caractères. Si vous pensez que c'est intentionnel, vous pouvez ignorer cet avertissement. Utilisez le bouton Échappe pour les dévoiler.

{{define "title"}}Torrent Edit{{end}}
{{define "content"}}
<div class="blockBody">
{{with .Upload}}
<form enctype="multipart/form-data" role="upload" method="POST">
{{ range (index $.FormInfos "infos")}}
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
{{end}}
{{ range (index $.FormErrors "errors")}}
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
{{end}}
<div class="form-group">
<label for="name">{{call $.T "name"}}</label>
<input type="text" name="name" class="form-control" placeholder="{{call $.T "file_name"}}" value="{{.Name}}" required>
</div>
<div class="form-group">
<label for="c">{{call $.T "category"}}</label>
<select name="c" class="form-control input-sm">
<option value="">{{call $.T "select_a_torrent_category"}}</option>
{{ range $name_cat, $id_cat := (GetCategories false) }}
<option value="{{ $id_cat }}" {{if eq $.Upload.Category $id_cat }}selected{{end}}>{{call $.T $name_cat }}</option>
{{ end }}
</select>
</div>
<div class="form-group">
<input type="checkbox" name="remake" id="remake" >
<label for="remake">{{call $.T "mark_as_remake"}}</label>
</div>
<div class="form-group">
<label for="website_link">{{call $.T "website_link"}}</label>
<input name="website_link" id="website_link" class="form-control" type="text" value="{{.WebsiteLink}}">
</div>
<div class="form-group">
<label for="desc">{{call $.T "torrent_description"}}</label>
<p class="help-block">{{call $.T "description_markdown_notice"}}</p>
<textarea name="desc" class="form-control torrent-desc" rows="10">{{.Description}}</textarea>
</div>
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
<br>
<br>
</form>
{{end}}
</div>
{{end}}
{{define "js_footer"}}
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/uploadPage.js"}}"></script>
<script type="text/javascript" charset="utf-8" src="https://cdnjs.cloudflare.com/ajax/libs/markdown.js/0.5.0/markdown.min.js"></script>
<script type="text/javascript" charset="utf-8" src="https://cdnjs.cloudflare.com/ajax/libs/to-markdown/3.0.4/to-markdown.js"></script>
<script type="text/javascript" charset="utf-8" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-markdown/2.10.0/js/bootstrap-markdown.js"></script>
<script>
$(".torrent-desc").markdown({resize: "both"})
</script>
{{end}}