]> git.plutz.net Git - confetti/blobdiff - templates/therapy.html.sh
reduced latency, sticky note in therapy view
[confetti] / templates / therapy.html.sh
index eb93553fae7d3ca3163d4165b913f47aefdbc017..0c91487cee322764b670f06608a124cf98d7f1fe 100755 (executable)
@@ -125,56 +125,65 @@ case "$tpy[color]" in
 esac
 
 cat <<EOF
-  <h1>$(l10n therapy)</h1>
+<h1>$(l10n therapy)</h1>
 
-  <div class="patient">
-    <h2>$client_name</h2>
-    <a href="?p=prescriptions&amp;client=${id%%.*}.vcf">&lt; $(l10n prescriptionlist)</a>
-  </div>
+<div class="patient">
+  <h2>$client_name</h2>
+  <a href="?p=prescriptions&amp;client=${id%%.*}.vcf">&lt; $(l10n prescriptionlist)</a>
+</div>
 
-  <div class="prescription">
-    <h2>$(l10n therapy_prescription)</h2>
-    <span class="insurance">${mpx[insurance]}</span>
-    <span class="date"><label>$(l10n date):</label>${mpx[date]}</span>
-
-    <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">
-      $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \
-                                       || printf %s "$(l10n prescreview)" )
-    </label>
-
-         ${mpx[prescno]:+<span class="prescno">$(l10n presc${mpx[prescno]})</span>}
-    ${mpx[grouptherapy]:+<span class="catalogue">$(l10n grouptherapy)</span>}
-       ${mpx[housecall]:+<span class="catalogue">$(l10n housecall)</span>}
-          ${mpx[report]:+<span class="catalogue">$(l10n report)</span>}
-
-    <ul>
-      ${mpx[remidy]:+ <li>${mpx[quantity]}  ${mpx[remidy]}  ${mpx[quantity_weekly]:+($mpx[quantity_weekly] $(l10n weekly))}</li>}
-      ${mpx[remidy1]:+<li>${mpx[quantity1]} ${mpx[remidy1]} ${mpx[quantity_weekly1]:+($mpx[quantity_weekly1] $(l10n weekly))}</li>}
-    </ul>
-
-    ${mpx[indicator]:+<span class="indicator"><label>$(l10n indicator):</label>${mpx[indicator]}</span>}
-        ${mpx[icd10]:+<span class="icd10">    <label>$(l10n icd10):</label>${mpx[icd10]}</span>}
-
-    ${mpx[addcontrib]:+
-    <label class='checkbox ${mpx[contribconfirm]:+checked}' for="addcontrib">
-      $([ -n "${mpx[contribconfirm]}" ] && printf %s "$(l10n contribconfirm)" ${mpx[contribconfirm]} \
-                                        || printf %s "$(l10n addcontrib)" )
-    </label>
-    }
-  </div>
+<div class="prescription">
+  <h2>$(l10n therapy_prescription)</h2>
+  <span class="insurance">${mpx[insurance]}</span>
+  <span class="date"><label>$(l10n date):</label>${mpx[date]}</span>
+
+  <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">
+    $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \
+                                     || printf %s "$(l10n prescreview)" )
+  </label>
+
+       ${mpx[prescno]:+<span class="prescno">$(l10n presc${mpx[prescno]})</span>}
+  ${mpx[grouptherapy]:+<span class="catalogue">$(l10n grouptherapy)</span>}
+     ${mpx[housecall]:+<span class="catalogue">$(l10n housecall)</span>}
+        ${mpx[report]:+<span class="catalogue">$(l10n report)</span>}
+
+  <ul>
+    ${mpx[remidy]:+ <li>${mpx[quantity]}  ${mpx[remidy]}  ${mpx[quantity_weekly]:+($mpx[quantity_weekly] $(l10n weekly))}</li>}
+    ${mpx[remidy1]:+<li>${mpx[quantity1]} ${mpx[remidy1]} ${mpx[quantity_weekly1]:+($mpx[quantity_weekly1] $(l10n weekly))}</li>}
+  </ul>
+
+  ${mpx[indicator]:+<span class="indicator"><label>$(l10n indicator):</label>${mpx[indicator]}</span>}
+      ${mpx[icd10]:+<span class="icd10">    <label>$(l10n icd10):</label>${mpx[icd10]}</span>}
+
+  ${mpx[addcontrib]:+
+  <label class='checkbox ${mpx[contribconfirm]:+checked}' for="addcontrib">
+    $([ -n "${mpx[contribconfirm]}" ] && printf %s "$(l10n contribconfirm)" ${mpx[contribconfirm]} \
+                                      || printf %s "$(l10n addcontrib)" )
+  </label>
+  }
+</div>
 
 <form method="POST" action="?action=update_therapy">
   <input type="hidden" name="id" value="${id}">
 
+  <input class="stickynote" type="checkbox" name="c_stickynote" id="show_stickynote">
+  <fieldset class="stickynote">
+    <label for="show_stickynote">$(l10n notes)</label>
+    <textarea name="stickynote">${tpy[stickynote]}</textarea>
+    <button type=submit>$(l10n save)</button>
+  </fieldset>
+
   <label class="tab heading">
     <span class=no>$(l10n number)</span><!--
  --><span class=date>$(l10n date)</span><!--
  --><span class=therapist>$(l10n therapist)</span><!--
  --><span class=signature>$(l10n signature)</span>
   </label>
+EOF
 
-  $(therapy_sessions)
+therapy_sessions
 
+cat <<EOF
   <fieldset class=color>
     <input class=color type=radio name=color onclick="javascript:setcol('#000')" value="#000" id=c000 $c0><label for=c000></label>
     <input class=color type=radio name=color onclick="javascript:setcol('#00A')" value="#00A" id=c001 $c1><label for=c001></label>