Improve and simplify preferences page behavior

This commit is contained in:
Zed
2022-01-03 02:12:51 +01:00
parent ab51ff06c8
commit bb981df657
5 changed files with 8 additions and 12 deletions

View File

@@ -42,12 +42,6 @@ proc hiddenField*(name, value: string): VNode =
proc refererField*(path: string): VNode =
hiddenField("referer", path)
proc iconReferer*(icon, action, path: string, title=""): VNode =
buildHtml(form(`method`="get", action=action, class="icon-button")):
refererField path
button(`type`="submit"):
icon icon, title=title
proc buttonReferer*(action, text, path: string; class=""; `method`="post"): VNode =
buildHtml(form(`method`=`method`, action=action, class=class)):
refererField path