From: paul Date: Tue, 19 Jul 2016 16:34:00 +0000 (+0000) Subject: limit note trail to used + 3 fields X-Git-Url: https://git.plutz.net/?p=confetti;a=commitdiff_plain;h=ef6500444e74092cf8ec5dda12b7ce20e3f4234f limit note trail to used + 3 fields svn path=/trunk/; revision=126 --- diff --git a/static/therapy.css b/static/therapy.css index f7dc3be..16528a4 100644 --- a/static/therapy.css +++ b/static/therapy.css @@ -1,5 +1,16 @@ .trailbtn:checked + fieldset.trailbox { display: block;} +.trailbtn:checked + .trailbox + .trailbtn { + display: block; + height: 2.25em; padding: 0 3ex; + font-size: 1em; font-weight: normal; + color: #000; background-color: #FDD; + border: 1px solid #000; + border-radius: 4px; +} +.trailbtn:checked + .trailbox + .trailbtn[type=submit]:before {content: none;} + + * { box-sizing: border-box; } body { overflow: scroll; diff --git a/templates/text_therapy.sh b/templates/text_therapy.sh index bda1231..a2735b2 100755 --- a/templates/text_therapy.sh +++ b/templates/text_therapy.sh @@ -24,3 +24,4 @@ item_name[number]="Nr." item_name[signature]="Un­ter­schrift" item_name[weekly]="p. Woche" item_name[notes]="Notizen" +item_name[trailsave]="Speichern für weitere Felder" diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index 6addbed..84f9cbe 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -64,24 +64,32 @@ t_session(){ unset sigcheck fi -cat < - - -
- - $( for n in {1..10}; do t_session_note $session_n $n; done ) - - -
-EOF + cat <<-EOF + + + +
+ + $(n=1; + while [ -n "${tpy[session${session_n}_note${n}]+x}" ]; do + if [ -n "${tpy[session${session_n}_note${n}]}" ]; then + x=$n + fi + n=$(($n + 1)) + done + for n in $(seq 1 $((${x:-0} + 3)) ); do t_session_note $session_n $n; done + ) + + +
+ EOF } therapy_sessions(){ @@ -92,15 +100,15 @@ therapy_sessions(){ sid=session$n -cat < - - - -EOF + cat <<-EOF +
+ + +
+ EOF } unset c0 c1 c2 c3 c4 c5 c6 c7