]> git.plutz.net Git - confetti/blobdiff - templates/edit_prescription.sh
issuer field on prescription document
[confetti] / templates / edit_prescription.sh
index 285739aa3f9134ff76acb9b3aa625af6979108cb..b7a9af46341ab513e43430925fefe011d2bed85b 100755 (executable)
@@ -121,11 +121,11 @@ cat <<END_HTML
 
 $( for n in {0..10}; do
   if [ "$n" -eq 0 -o -n "${mpx[quantity$n]}" -o -n "${mpx[remidy$n]}" -o -n "${mpx[quantity_weekly$n]}" ]; then
-    printf '<input type="checkbox" checked="checked">'
+    printf '<input class="trailbtn" type="checkbox" checked="checked" />'
   else
-    printf '<input type="checkbox">'
+    printf '<input class="trailbtn" type="checkbox" />'
   fi
-  printf '<p>
+  printf '<p class="trailbox">
     <input class="quantity" name="quantity" placeholder="%s" value="%s">
     <textarea class="remidy" name="remidy" placeholder="%s">%s</textarea>
     <input class="quantity_weekly" name="quantity_weekly" placeholder="%s" value="%s">
@@ -135,7 +135,6 @@ $( for n in {0..10}; do
     "$(l10n quantity_weekly)" "${mpx[quantity_weekly$n]}"
 done )
 
-
 <br>
 <p class="indicator_codes">
 <label for="indicator">$(l10n indicator)</label>
@@ -149,6 +148,21 @@ done )
 <label for="indicator_reading">$(l10n indicator_reading)</label>
 <textarea id="indicator_reading" name="indicator_reading" placeholder="$(l10n indicator_reading)">${mpx[indicator_reading]}</textarea>
 </p>
+<br>
+<p class="issuer">
+  <label>$(l10n issuer)</label>
+  <input type="radio" name="issuer_select" value="list" id="issuer_select_list" checked /><label for="issuer_select_list">$(l10n issuer_from_list)</label><!--
+  --><input type="radio" name="issuer_select" value="other" id="issuer_other"><label for="issuer_other">$(l10n issuer_other)</label>
+  <select class="item" name="issuer">
+    <option value="" disabled="disabled" $([ -z "${mpx[issuer]}" ] && printf 'selected' )>$(l10n issuer)...</option>
+    $(list_prescription_issuers |while read f; do
+      [ "$f" = "$mpx[issuer]" ] \
+      && printf '<option value="%s" selected>%s</option>' "$f" "$f" \
+      || printf '<option value="%s">%s</option>' "$f" "$f"
+    done)
+  </select>
+  <input type="text" name="issuer_other" value="" placeholder="$(l10n issuer)..." />
+</p>
 </fieldset>
 
 <fieldset class="controls">