.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;
unset sigcheck
fi
-cat <<EOF
- <input type=hidden name=$sid value=exists>
- <input class="tab" type="checkbox" id=${sid}_open name="${sid}_open" value="checked" ${tpy[${sid}_open]}>
- <label class="tab" for="${sid}_open">
- <span class=no>${session_n}.</span><!--
- --><span class=date>${tpy[${sid}_date]}</span><!--
- --><input class="date" name="${sid}_date" value="${tpy[${sid}_date]}" placeholder="$(l10n date)"><!--
- --><span class=therapist>${tpy[${sid}_therapist]}</span><!--
- --><input class="therapist" name="${sid}_therapist" value="${tpy[${sid}_therapist]}" placeholder="$(l10n therapist)"><!--
- --><span class=signature><input type="checkbox" name="${sid}_sigset" value="pos" $sigcheck></span>
- </label>
- <div class=tab>
- <img class="dotmark ov" src="/therapies/${id%.tpy}_${sid}.png" alt="">
- $( for n in {1..10}; do t_session_note $session_n $n; done )
-
- <button class=delete type=submit name=delete_session value=${session_n}>$(l10n delete_session)</button>
- </div>
-EOF
+ cat <<-EOF
+ <input type=hidden name=$sid value=exists>
+ <input class="tab" type="checkbox" id=${sid}_open name="${sid}_open" value="checked" ${tpy[${sid}_open]}>
+ <label class="tab" for="${sid}_open">
+ <span class=no>${session_n}.</span><!--
+ --><span class=date>${tpy[${sid}_date]}</span><!--
+ --><input class="date" name="${sid}_date" value="${tpy[${sid}_date]}" placeholder="$(l10n date)"><!--
+ --><span class=therapist>${tpy[${sid}_therapist]}</span><!--
+ --><input class="therapist" name="${sid}_therapist" value="${tpy[${sid}_therapist]}" placeholder="$(l10n therapist)"><!--
+ --><span class=signature><input type="checkbox" name="${sid}_sigset" value="pos" $sigcheck></span>
+ </label>
+ <div class=tab>
+ <img class="dotmark ov" src="/therapies/${id%.tpy}_${sid}.png" alt="">
+ $(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
+ )
+ <button class="trailbtn" type="submit">$(l10n trailsave)</button>
+ <button class=delete type=submit name=delete_session value=${session_n}>$(l10n delete_session)</button>
+ </div>
+ EOF
}
therapy_sessions(){
sid=session$n
-cat <<EOF
- <fieldset class="tab">
- <button class=no type=submit name=new_session value=$sid>+</button><!--
- --><input class=date name=${sid}_date value="" placeholder="$(l10n date)" /><!--
- --><input class=therapist name=${sid}_therapist value="" placeholder="$(l10n therapist)" /><!--
- --><span class=signature><span></span>
- <input type=hidden name="${sid}_note1" value="">
- </fieldset>
-EOF
+ cat <<-EOF
+ <fieldset class="tab">
+ <button class=no type=submit name=new_session value=$sid>+</button><!--
+ --><input class=date name=${sid}_date value="" placeholder="$(l10n date)" /><!--
+ --><input class=therapist name=${sid}_therapist value="" placeholder="$(l10n therapist)" /><!--
+ --><span class=signature><span></span>
+ <input type=hidden name="${sid}_note1" value="">
+ </fieldset>
+ EOF
}
unset c0 c1 c2 c3 c4 c5 c6 c7