Fixes
Cette révision appartient à :
Parent
b1c7591e8b
révision
802945384b
3 fichiers modifiés avec 4 ajouts et 2 suppressions
|
@ -200,7 +200,7 @@ func TorrentEditModPanel(w http.ResponseWriter, r *http.Request) {
|
|||
uploadForm.Magnet = string(torrentJson.Magnet)
|
||||
uploadForm.Status = torrentJson.Status
|
||||
uploadForm.Description = string(torrentJson.Description)
|
||||
htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, form.NewErrors(), form.NewInfos()}
|
||||
htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL}
|
||||
err := panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv)
|
||||
log.CheckError(err)
|
||||
|
||||
|
@ -242,7 +242,7 @@ func TorrentPostEditModPanel(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
languages.SetTranslationFromRequest(panelTorrentEd, r, "en-us")
|
||||
htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, err, infos}
|
||||
htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, err, infos, r.URL}
|
||||
_ = panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv)
|
||||
} else {
|
||||
http.Error(w, "admins only", http.StatusForbidden)
|
||||
|
|
|
@ -153,6 +153,7 @@ type PanelTorrentEdVbs struct {
|
|||
User *model.User
|
||||
FormInfos map[string][]string
|
||||
FormErrors map[string][]string
|
||||
URL *url.URL // For parsing Url in templates
|
||||
}
|
||||
|
||||
type PanelTorrentReportListVbs struct {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{define "title"}}Torrent Edit Panel{{end}}
|
||||
{{define "content"}}
|
||||
{{with .Upload}}
|
||||
<form enctype="multipart/form-data" role="upload" method="POST">
|
||||
|
|
Référencer dans un nouveau ticket