2017-06-02 20:10:36 +02:00
{{define "title"}}{{ call $.T "torrent_edit_panel" }}{{end}}
2017-05-10 06:43:53 +02:00
{{define "content"}}
2017-06-02 20:10:36 +02:00
< div class = "results box" >
< h3 id = "torrents" > {{ call $.T "torrent_edit_panel" }}< / h3 >
2017-05-25 21:54:58 +02:00
{{with .Form}}
2017-06-02 22:35:42 +02:00
< form style = "text-align:left;padding-left:10px;padding-right:10px;" enctype = "multipart/form-data" role = "upload" method = "POST" >
2017-05-29 17:07:18 +02:00
{{ block "csrf_field" $ }}{{end}}
2017-05-10 23:53:25 +02:00
{{ range (index $.FormInfos "infos")}}
2017-06-02 22:35:42 +02:00
< p class = "success-text" > {{ . }}< / p >
2017-05-10 23:53:25 +02:00
{{end}}
{{ range (index $.FormErrors "errors")}}
2017-06-02 22:35:42 +02:00
< p class = "error-text" > {{ . }}< / p >
2017-05-10 23:53:25 +02:00
{{end}}
< div class = "form-group" >
2017-05-21 00:38:28 +02:00
< label for = "name" > {{call $.T "name"}}< / label >
2017-06-02 22:35:42 +02:00
< input type = "text" name = "name" class = "form-input up-input" placeholder = "{{call $.T " file_name " } } " value = "{{.Name}}" required >
2017-05-10 23:53:25 +02:00
< / div >
< div class = "form-group" >
2017-05-21 00:38:28 +02:00
< label for = "c" > {{call $.T "category"}}< / label >
2017-06-02 22:35:42 +02:00
< select name = "c" class = "form-input up-input" >
2017-05-21 00:38:28 +02:00
< option value = "" > {{call $.T "select_a_torrent_category"}}< / option >
2017-06-17 04:24:30 +02:00
{{ range $name_cat, $id_cat := (GetCategories false true) }}
2017-05-25 21:54:58 +02:00
< option value = "{{ $id_cat }}" { { if eq $ . Form . Category $ id_cat } } selected { { end } } > {{call $.T $name_cat }}< / option >
2017-05-17 07:33:06 +02:00
{{ end }}
2017-05-10 23:53:25 +02:00
< / select >
< / div >
2017-06-12 01:14:26 +02:00
< div class = "form-group" >
< label for = "language" > {{ call $.T "torrent_language" }}< / label >
2017-06-23 12:55:33 +02:00
< select name = "language" id = "language" class = "form-input up-input" required >
2017-06-12 01:14:26 +02:00
< option value = "" > {{call $.T "select_a_torrent_language"}}< / option >
< option value = "other" { { if eq $ . Form . Language " other " } } selected { { end } } > {{call $.T "language_other_name"}}< / option >
< option value = "multiple" { { if eq $ . Form . Language " multiple " } } selected { { end } } > {{call $.T "language_multiple_name"}}< / option >
{{ range $_, $language := (GetTorrentLanguages) }}
< option value = "{{ $language }}" { { if eq $ . Form . Language $ language } } selected { { end } } >
{{LanguageName $language $.T}}
< / option >
{{ end }}
< / select >
< / div >
2017-05-10 23:53:25 +02:00
< div class = "form-group" >
2017-05-21 00:38:28 +02:00
< label for = "Status" > {{call $.T "torrent_status"}}< / label >
2017-06-02 22:35:42 +02:00
< select name = "status" class = "form-input up-input" >
2017-05-25 02:19:05 +02:00
< option value = "5" { { if eq . Status 5 } } selected { { end } } > {{ call $.T "torrent_status_blocked" }}< / option >
2017-05-21 00:38:28 +02:00
< option value = "1" { { if eq . Status 1 } } selected { { end } } > {{call $.T "torrent_status_normal"}}< / option >
< option value = "2" { { if eq . Status 2 } } selected { { end } } > {{call $.T "torrent_status_remake"}}< / option >
< option value = "3" { { if eq . Status 3 } } selected { { end } } > {{call $.T "trusted"}}< / option >
2017-05-11 01:46:50 +02:00
< option value = "4" { { if eq . Status 4 } } selected { { end } } > A+< / option >
2017-05-10 23:53:25 +02:00
< / select >
< / div >
2017-05-27 20:33:40 +02:00
{{ if $.User }}
< p >
< input type = "checkbox" name = "hidden" id = "hidden" { { if . Hidden } } checked { { end } } >
< label for = "hidden" > {{call $.T "mark_as_hidden"}}< / label >
< / p >
{{ end }}
2017-05-21 04:10:59 +02:00
< div class = "form-group" >
< label for = "website_link" > {{call $.T "website_link"}}< / label >
2017-06-02 22:35:42 +02:00
< input name = "website_link" id = "website_link" class = "form-input up-input" type = "text" value = "{{.WebsiteLink}}" >
2017-05-21 04:10:59 +02:00
< / div >
2017-05-10 23:53:25 +02:00
< div class = "form-group" >
2017-05-21 00:38:28 +02:00
< label for = "desc" > {{call $.T "torrent_description"}}< / label >
< p class = "help-block" > {{call $.T "description_markdown_notice"}}< / p >
2017-06-02 22:35:42 +02:00
< textarea name = "desc" class = "form-input up-input" rows = "10" > {{.Description}}< / textarea >
2017-05-10 23:53:25 +02:00
< / div >
2017-06-04 02:28:33 +02:00
< button type = "submit" class = "form-input up-input btn-green" > {{call $.T "save_changes"}}< / button >
2017-05-10 23:53:25 +02:00
< / form >
2017-06-02 20:10:36 +02:00
< / div >
2017-05-10 23:53:25 +02:00
{{end}}
2017-05-11 01:46:50 +02:00
{{end}}