From 0a5b6b7beabb34646029bd58c74eebb811d6e605 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 30 Nov 2023 12:33:37 +0100 Subject: [PATCH] different redirect targets for form submit --- invoices.cgi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/invoices.cgi b/invoices.cgi index 22d3da3..35847fe 100755 --- a/invoices.cgi +++ b/invoices.cgi @@ -33,7 +33,7 @@ serverkey' >.gitignore DB3 write "$file" REDIRECT "/doc/${id}" ;; - update_invoice) + update_invoice|update_invoice_return) id="$(POST id)" file="$_DATA/${id}.kvd" seq='' if [ "$(POST tid)" = "$(transid "$file")" ] && LOCK "$file"; then DB3 open "$file" @@ -55,7 +55,11 @@ serverkey' >.gitignore else debug "TID mismatch updating $file" fi - REDIRECT "$PATH_INFO" + if [ $(POST action) = update_invoice_return ]; then + REDIRECT / + else + REDIRECT "$PATH_INFO" + fi ;; pdf_export) id="$(POST id)" file="$_DATA/${id}.kvd" tmp="$(randomid)" -- 2.39.5