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/upload.html
akuma06 2773fe200d Golint friendly (#747)
* Making the code Golint friendly

* No exported variables when not needed
* Same for functions
* Simplifying Templates variables with a form basic template variable
and a modelList basic template variable

* Adapted templates to new template variables

* use of .Models instead of model list
* use of .Form instead of modelform

* Small fix

* Small fix 2

Forgot $.Form

* Reverting templateDir as a var
2017-05-25 21:54:58 +02:00

47 lignes
2 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"}}Upload magnet{{end}}
{{define "content"}}
{{with .Form}}
<div style="text-align: left;" class="box">
<form enctype="multipart/form-data" role="upload" method="POST">
{{ 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}}
<h3>{{call $.T "name"}}</h3>
<input type="text" name="name" id="name" class="form-input up-input" placeholder="{{call $.T "file_name"}}" value="{{.Name}}" autofocus required>
<h3>{{call $.T "torrent_file"}}</h3>
<input type="file" name="torrent" id="torrent" class="up-input" accept=".torrent">
<p>{{call $.T "uploading_file_prefills_fields"}}</p>
<h3>{{call $.T "magnet_link"}}</h3>
<input type="text" name="magnet" id="magnet" class="form-input up-input" placeholder="{{call $.T "magnet_link"}}" value="{{.Magnet}}">
<p>{{ call $.T "please_include_our_tracker" }}</p>
<h3>{{call $.T "category"}}</h3>
<select name="c" id="c" class="form-input up-input" required>
<option value="">{{call $.T "select_a_torrent_category"}}</option>
{{ range $name_cat, $id_cat := (GetCategories false) }}
<option value="{{ $id_cat }}" {{if eq $.Form.Category $id_cat }}selected{{end}}>{{call $.T $name_cat }}</option>
{{ end }}
</select>
<p>
<input type="checkbox" name="remake" id="remake" >
<label for="remake">{{call $.T "mark_as_remake"}}</label>
</p>
<h3>{{call $.T "website_link"}}</h3>
<input name="website_link" id="website_link" class="form-input up-input" type="text" value="{{.WebsiteLink}}">
<h3>{{call $.T "torrent_description"}}</h3>
<p>{{call $.T "description_markdown_notice"}}</p>
<textarea name="desc" id="desc" class="form-input up-input" style="height: 10rem;">{{.Description}}</textarea>
{{block "captcha" (makeCaptchaData .CaptchaID $.T)}}{{end}}
<button type="submit" class="form-input up-btn">{{call $.T "upload"}}</button>
</form>
</div>
{{end}}
{{end}}