improved styling for prescription sheets
[confetti] / templates / view_prescription.sh
index d31acca..c11bd9d 100755 (executable)
@@ -19,37 +19,39 @@ check(){ [ "$1" = "$2" ] && printf checked}
 
 cat <<END_HTML
 <div class="prescription">
-<h1>$(l10n therapy_prescription)</h1>
-
+<fieldset class="baseinfo">
 <label for="insurance">$(l10n insurance)</label>
 <span id="insurance">${mpx[insurance]}</span>
 <br>
 <label for="name">$(l10n name)</label>
-<span id="name">${mpx[name]}</span>
-<br>
 <label for="bday">$(l10n bday)</label>
+<span id="name">${mpx[name]}</span>
 <span id="bday">${mpx[bday]}</span>
 
 <br>
 <label for="date">$(l10n date)</label>
 <span id="date">${mpx[date]}</span>
+</fieldset>
 
+<fieldset class="misc">
+<h1>$(l10n therapy_prescription)</h1>
 <br>
 <label for="addcontrib">$(l10n addcontrib)</label>
 <span id="addcontrib">${mpx[addcontrib]}</span>
 <label class="checkbox ${mpx[contribconfirm]:+checked}" for="contribconfirm">$(l10n contribconfirm)</label>
+</fieldset>
 
+<fieldset class="catalogue">
 <h2>$(l10n prescription_by_catalogue)</h2>
 <label class="radio $(check "$mpx[prescno]" first)" for="prescfirst">$(l10n prescfirst)</label>
 <br>
-<input type="radio" id="prescfollow1" name="prescno" value="follow1" $(check "$mpx[prescno]" follow1)>
 <label class="radio $(check "$mpx[prescno]" follow1)" for="prescfollow1">$(l10n prescfollow1)</label>
 <br>
 <label class="radio $(check "$mpx[prescno]" follow2)" for="prescfollow2">$(l10n prescfollow2)</label>
 <br>
-<label class="radio $(check "$mpx[prescno]" other)" for="prescother">$(l10n prescother)</label>
-<br>
 <label class="radio $(check "$mpx[prescno]" continual)" for="presccontinual">$(l10n presccontinual)</label>
+<br>
+<label class="radio $(check "$mpx[prescno]" other)" for="prescother">$(l10n prescother)</label>
 
 <br>
 <label class="checkbox ${mpx[grouptherapy]:+checked}" for="grouptherapy">$(l10n grouptherapy)</label>
@@ -57,25 +59,22 @@ cat <<END_HTML
 <label class="checkbox ${mpx[housecall]:+checked}" for="housecall">$(l10n housecall)</label>
 <br>
 <label class="checkbox ${mpx[report]:+checked}" for="report">$(l10n report)</label>
+</fieldset>
+
+<fieldset class="description">
 
-<br>
-<label for="remidy">$(l10n remidy)</label>
-<span id="remidy">${mpx[remidy]}</span>
-<br>
 <label for="quantity">$(l10n quantity)</label>
-<span id="quantity">${mpx[quantity]}</span>
-<br>
+<label for="remidy">$(l10n remidy)</label>
 <label for="quantity_weekly">$(l10n quantity_weekly)</label>
+<span id="quantity">${mpx[quantity]}</span>
+<span id="remidy">${mpx[remidy]}</span>
 <span id="quantity_weekly">${mpx[quantity_weekly]}</span>
 
-<br>
-<label for="remidy1">$(l10n remidy)</label>
-<span id="remidy1">${mpx[remidy1]}</span>
-<br>
 <label for="quantity1">$(l10n quantity)</label>
-<span id="quantity1">${mpx[quantity1]}</span>
-<br>
+<label for="remidy1">$(l10n remidy)</label>
 <label for="quantity_weekly1">$(l10n quantity_weekly)</label>
+<span id="quantity1">${mpx[quantity1]}</span>
+<span id="remidy1">${mpx[remidy1]}</span>
 <span id="quantity_weekly1">${mpx[quantity_weekly1]}</span>
 
 <br>
@@ -84,12 +83,14 @@ cat <<END_HTML
 <br>
 <label for="icd10">$(l10n icd10)</label>
 <span id="icd10">${mpx[icd10]}</span>
+</fieldset>
 
-<br>
 <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">$(l10n prescreviewed)</label>
 
-<br>
+<fieldset class="controls">
 <a class="button" href="?p=prescriptions&amp;edit=${mpx[prescription]}">$(l10n edit)</a>
+<a class="button" href="?p=therapy&amp;id=${mpx[prescription]%.mpx}.tpy">$(l10n therapy)</a>
+</fieldset>
 
 </div>
 END_HTML