From 015242823eb4a79cf615bef6951b0af6bd0a5b01 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 7 Apr 2016 04:07:58 +0000 Subject: [PATCH] additional prescription functions svn path=/trunk/; revision=90 --- actions/update_prescription.sh | 2 +- actions/update_therapy.sh | 27 +++++++++++++- templates/edit_prescription.sh | 66 ++++++++++++++++++++++++++++++++- templates/frame.html.sh | 1 + templates/prescriptions.css.sh | 34 +++++++++++++++-- templates/text_prescriptions.sh | 9 +++++ templates/therapy.css.sh | 2 +- templates/therapy.html.sh | 1 - templates/view_client.sh | 3 +- templates/view_prescription.sh | 11 +++++- 10 files changed, 144 insertions(+), 12 deletions(-) diff --git a/actions/update_prescription.sh b/actions/update_prescription.sh index 68cb7fd..a0d9371 100755 --- a/actions/update_prescription.sh +++ b/actions/update_prescription.sh @@ -50,4 +50,4 @@ case "${_POST[action]}" in ;; esac -redirect "?p=prescriptions&client=${client}" +redirect "?p=prescriptions&client=${client}#${prescription}" diff --git a/actions/update_therapy.sh b/actions/update_therapy.sh index 43a2e1f..cc95e39 100755 --- a/actions/update_therapy.sh +++ b/actions/update_therapy.sh @@ -42,13 +42,38 @@ if [ -n "$_POST[delete_session]" ]; then elif [ -n "$_POST[new_session]" ]; then sid="$_POST[new_session]" - printf '%s:exists\n' "$sid" >>"$tempfile" identify "$_EXEC/templates/therapy_background.png" \ | sed -r 's;^.* ([0-9]+x[0-9]+) .*$;\1;' \ | read dim convert -size "$dim" xc:transparent "${tpyfile%.tpy}_${sid}.png" + + printf '%s:exists\n' "$sid" >>"$tempfile" + printf '%s_open:checked\n' "$sid" >>"$tempfile" + +elif [ -n "$_POST[dotmark.x]" -a -n "$_POST[dotmark.y]" ]; then + sed -rn 's;^(session[0-9]+)_open:checked$;\1;p' "$tempfile" \ + | sort -n \ + | tail -n1 \ + | read sid + + x="$_POST[dotmark.x]" + y="$_POST[dotmark.y]" + + case "$_POST[color]" in + c000) c="#000000";; + c001) c="#000088";; + c010) c="#008800";; + c011) c="#008888";; + c100) c="#880000";; + c101) c="#880088";; + c110) c="#888800";; + c111) c="#888888";; + esac + + convert "${tpyfile%.tpy}_${sid}.png" -fill "$c" -stroke "$c" -draw "circle $x,$y $(($x+5)),$y" "${tpyfile%.tpy}_${sid}.png" + fi mv "$tempfile" "$tpyfile" diff --git a/templates/edit_prescription.sh b/templates/edit_prescription.sh index b916258..4701ebb 100755 --- a/templates/edit_prescription.sh +++ b/templates/edit_prescription.sh @@ -21,6 +21,63 @@ cat < + + + + + + + + + + + + + + + + + + + + + + + + + +
$(l10n doctor)$(l10n dentist)$(l10n noprescription)$(l10n altpractition)
+ + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + +
+
@@ -37,7 +94,7 @@ cat <
-

$(l10n therapy_prescription)

+

$(l10n therapy_prescription)

@@ -94,11 +151,18 @@ cat <
+


+

+
+

+ + +

diff --git a/templates/frame.html.sh b/templates/frame.html.sh index 2cc13d1..5fd6e7c 100755 --- a/templates/frame.html.sh +++ b/templates/frame.html.sh @@ -26,6 +26,7 @@ cat < $(l10n p_${PAGE}) +