]> git.plutz.net Git - lobster/commitdiff
prevent double escaping of & in htmlsafe
authorpaul <paul@plutz.net>
Fri, 15 Apr 2016 11:06:52 +0000 (11:06 +0000)
committerpaul <paul@plutz.net>
Fri, 15 Apr 2016 11:06:52 +0000 (11:06 +0000)
svn path=/trunk/; revision=101

pages/prescriptions.sh
templates/text_therapy.sh
templates/therapy.css.sh
templates/therapy.html.sh

index 2786ee3afe4f2c7259234471884fe1bf463e9212..20b2bc0080e4de6b0d60da24490eaa26d1b1c444 100755 (executable)
@@ -56,7 +56,7 @@ view_prescription(){
   mpx=()
   cat "$prescfile" |while read -r line; do
     val="${line#*:}"
-    mpx[${line%%:*}]="${val//\\n/$BR}"
+    mpx[${line%%:*}]="$(htmlsafe "${val//\\n/$BR}")"
   done
 
   . "$_EXEC/templates/view_prescription.sh"
index ad059430530020d97627d8006ee19cca0f09109c..fff9150d71b51a6b4c77bfa63fd90aa1c27eac5a 100755 (executable)
@@ -22,3 +22,4 @@ item_name[delete_session]="Therapiesitzung entfernen"
 item_name[therapist]="Therapeut"
 item_name[number]="Nr."
 item_name[signature]="Un&shy;ter&shy;schrift"
+item_name[weekly]="p. Woche"
index e3184a52656093cf18579bee2a710a81fcc7affb..b14c457e7248c65866b81e72360f98d4ede0b5f9 100755 (executable)
@@ -41,9 +41,26 @@ div.patient, div.prescription {
   margin: 0 2%;
 }
 
-div.prescription .insurance{ display: block; margin: .5ex 0 1ex 0; }
+div.prescription span {
+  display: inline-block;
+  width: 50%;
+  margin-right: -.75ex;
+}
+div.prescription span label { font-weight: bold; margin-right: 1ex;}
+div.prescription span.prescno,
+div.prescription span.catalogue {
+  width: 33%;
+  font-weight: bold;
+  margin-bottom: .5em;
+}
+
 div.prescription label.checkbox,
-div.prescription label.radio { padding-left: 1.25em; font-size: 1em;}
+div.prescription label.radio {
+  display: block;
+  padding-left: 1.25em;
+  font-size: 1em;
+  margin: .5em 0;
+}
 
 div.prescription label.checkbox:before,
 div.prescription label.radio:before {
index 7d42aff111e893f384e3b8effb3f5ebcb1b81c67..f1c42ac7f98ebe1b7e16d6527b5ab100d71b68c2 100755 (executable)
@@ -125,7 +125,7 @@ case "$tpy[color]" in
 esac
 
 cat <<EOF
-  <h1>Behandlungen</h1>
+  <h1>$(l10n therapy)</h1>
 
   <div class="patient">
     <h2>$client_name</h2>
@@ -135,16 +135,26 @@ cat <<EOF
   <div class="prescription">
     <h2>$(l10n therapy_prescription)</h2>
     <span class="insurance">${mpx[insurance]}</span>
-    <span class="date">${mpx[date]}</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]}</li>}
-      ${mpx[remidy1]:+<li>${mpx[quantity1]} ${mpx[remidy1]}</li>}
+      ${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]} \