diff --git a/router/modpanel.go b/router/modpanel.go index f6ccb54e..1e3db789 100644 --- a/router/modpanel.go +++ b/router/modpanel.go @@ -242,6 +242,7 @@ func TorrentEditModPanel(w http.ResponseWriter, r *http.Request) { uploadForm.Name = torrentJson.Name uploadForm.Category = torrentJson.Category + "_" + torrentJson.SubCategory uploadForm.Status = torrentJson.Status + uploadForm.WebsiteLink = string(torrentJson.WebsiteLink) uploadForm.Description = string(torrentJson.Description) htv := PanelTorrentEdVbs{uploadForm, NewPanelSearchForm(), T, currentUser, form.NewErrors(), form.NewInfos(), r.URL} err := panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv) @@ -266,6 +267,7 @@ func TorrentPostEditModPanel(w http.ResponseWriter, r *http.Request) { torrent.Category = uploadForm.CategoryID torrent.SubCategory = uploadForm.SubCategoryID torrent.Status = uploadForm.Status + torrent.WebsiteLink = uploadForm.WebsiteLink torrent.Description = uploadForm.Description torrent.Uploader = nil // GORM will create a new user otherwise (wtf?!) db.ORM.Save(&torrent) diff --git a/router/upload.go b/router/upload.go index e4ce3c0e..74ce5abc 100644 --- a/router/upload.go +++ b/router/upload.go @@ -241,6 +241,7 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error { func (f *UploadForm) ExtractEditInfo(r *http.Request) error { f.Name = r.FormValue(UploadFormName) f.Category = r.FormValue(UploadFormCategory) + f.WebsiteLink = r.FormValue(UploadFormWebsiteLink) f.Description = r.FormValue(UploadFormDescription) f.Status, _ = strconv.Atoi(r.FormValue(UploadFormStatus)) diff --git a/templates/_badgemenu.html b/templates/_badgemenu.html index 0995cb0a..e906f2a0 100644 --- a/templates/_badgemenu.html +++ b/templates/_badgemenu.html @@ -3,26 +3,26 @@ diff --git a/templates/admin/paneltorrentedit.html b/templates/admin/paneltorrentedit.html index 83cca2d8..79d4f520 100644 --- a/templates/admin/paneltorrentedit.html +++ b/templates/admin/paneltorrentedit.html @@ -64,6 +64,10 @@ +
+ + +

{{call $.T "description_markdown_notice"}}

diff --git a/templates/upload.html b/templates/upload.html index 7915211b..953c00d4 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -68,15 +68,15 @@
+
+ + +

{{call $.T "description_markdown_notice"}}

-
- - -
{{block "captcha" (makeCaptchaData .CaptchaID $.T)}}{{end}}