From 6a48f4094cf2b0757c9fb5913739dc43e3f589b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 9 Jan 2020 04:06:14 +0100 Subject: [PATCH] function and ui for adding new therapy --- therapies/index.cgi | 13 +++++++++++-- therapies/page.sh | 9 +++++---- therapies/therapy.css | 5 +++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/therapies/index.cgi b/therapies/index.cgi index 62b621d..f142d21 100755 --- a/therapies/index.cgi +++ b/therapies/index.cgi @@ -30,12 +30,21 @@ case "$_PATH" in fi return 0 ;; + /therapies/*/new) + card="${_PATH#/therapies/}" + card="${card%/new}" + uid="$(timeid)$(randomid)" + if [ -f "${_DATA}/vcard/${card}.vcf" ]; then + touch "${_DATA}/therapies/${card}.${uid}.tpy" + rm -f "${_DATA}/cache/${card}.vcf.cache" + REDIRECT "/therapies/${card}/${uid}" + fi + return 0 + ;; esac . $_EXEC/pdiread.sh . $_EXEC/therapies/l10n.sh -# . $_EXEC/cards/widgets.sh -# . $_EXEC/cards/list.sh # unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; } # upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; ' diff --git a/therapies/page.sh b/therapies/page.sh index 4c236c4..2f0136b 100755 --- a/therapies/page.sh +++ b/therapies/page.sh @@ -93,7 +93,7 @@ cat < a { display: inline-block; + text-decoration: none; border: 1px solid black; - margin: .5em .5em 0 0; padding: .25em .5em; + margin-top: .5em; padding: .25em .5em; background-color: #DDF; color: #000; } div.therapies > a.current { - background-color: #CCF; + background-color: #AAF; } div.prescription { -- 2.39.2