From 6cbf25e916de4d4d70daf9a924302de9ca7c20f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 16 May 2022 14:28:30 +0200 Subject: [PATCH] dialog for user settings, separate handler for special pages --- handlers/10_page.sh | 12 ------------ handlers/20_account.sh | 22 ++++++++++++++++++++++ macros/wikiform | 3 +++ pages/[wiki]/settings/#page.md | 7 +++++++ 4 files changed, 32 insertions(+), 12 deletions(-) create mode 100755 handlers/20_account.sh create mode 100644 pages/[wiki]/settings/#page.md diff --git a/handlers/10_page.sh b/handlers/10_page.sh index 70e70e7..b34aa1b 100755 --- a/handlers/10_page.sh +++ b/handlers/10_page.sh @@ -56,18 +56,6 @@ case "${PATH_INFO}" in */\[*\]/*) return 1 ;; - */"[login]") - theme_page "/[wiki]/login/" - return 0 - ;; - */"[register]") - theme_page "/[wiki]/register/" - return 0 - ;; - */"[invite]") - theme_page "/[wiki]/invite/" - return 0 - ;; */) theme_page "${PATH_INFO}" return 0 diff --git a/handlers/20_account.sh b/handlers/20_account.sh new file mode 100755 index 0000000..73edb0f --- /dev/null +++ b/handlers/20_account.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +case "${PATH_INFO}" in + */"[login]") + theme_page "/[wiki]/login/" + return 0 + ;; + */"[register]") + theme_page "/[wiki]/register/" + return 0 + ;; + */"[invite]") + theme_page "/[wiki]/invite/" + return 0 + ;; + */"[settings]") + theme_page "/[wiki]/settings/" + return 0 + ;; +esac + +return 1 diff --git a/macros/wikiform b/macros/wikiform index 7eb3f1c..ecb003b 100755 --- a/macros/wikiform +++ b/macros/wikiform @@ -15,4 +15,7 @@ case $action in invite) w_user_invite |"$_EXEC/cgilite/html-sh.sed" ;; + settings) + w_user_update |"$_EXEC/cgilite/html-sh.sed" + ;; esac diff --git a/pages/[wiki]/settings/#page.md b/pages/[wiki]/settings/#page.md new file mode 100644 index 0000000..9dd280f --- /dev/null +++ b/pages/[wiki]/settings/#page.md @@ -0,0 +1,7 @@ +%nocache + +Change Your Password +----------------- +<> + +[Return](./) -- 2.39.2