]> git.plutz.net Git - confetti/blobdiff - templates/edit_prescription.sh
merge from cgilite
[confetti] / templates / edit_prescription.sh
diff --git a/templates/edit_prescription.sh b/templates/edit_prescription.sh
deleted file mode 100755 (executable)
index b7a9af4..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 2016 Paul Hänsch
-#
-# This file is part of Confetti.
-# 
-# Confetti is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-# 
-# Confetti is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-# 
-# You should have received a copy of the GNU Affero General Public License
-# along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
-
-check(){ [ "$1" = "$2" ] && printf checked}
-[ -z $mpx[presctype] ] && mpx[presctype]=doctor_compulsory
-
-cat <<END_HTML
-<form class="prescription" action="?action=update_prescription" method="POST">
-<input type="hidden" name="prescription" value="${mpx[prescription]}">
-
-<label class=presctype>$(l10n doctor):</label>
-<input type=radio name=presctype id=doctor_selfpaid value=doctor_selfpaid $(check "$mpx[presctype]" doctor_selfpaid)>
-<label for=doctor_selfpaid>$(l10n selfpaid)</label>
-<input type=radio name=presctype id=doctor_private value=doctor_private $(check "$mpx[presctype]" doctor_private)>
-<label for=doctor_private>$(l10n private)</label>
-<input type=radio name=presctype id=doctor_compulsory value=doctor_compulsory $(check "$mpx[presctype]" doctor_compulsory)>
-<label for=doctor_compulsory>$(l10n compulsory)</label>
-<br>
-
-<label class=presctype>$(l10n dentist):</label>
-<input type=radio name=presctype id=dentist_selfpaid value=dentist_selfpaid $(check "$mpx[presctype]" dentist_selfpaid)>
-<label for=dentist_selfpaid>$(l10n selfpaid)</label>
-<input type=radio name=presctype id=dentist_private value=dentist_private $(check "$mpx[presctype]" dentist_private)>
-<label for=dentist_private>$(l10n private)</label>
-<input type=radio name=presctype id=dentist_compulsory value=dentist_compulsory $(check "$mpx[presctype]" dentist_compulsory)>
-<label for=dentist_compulsory>$(l10n compulsory)</label>
-<br>
-
-<label class=presctype>$(l10n noprescription):</label>
-<input type=radio name=presctype id=noprescription_selfpaid value=noprescription_selfpaid $(check "$mpx[presctype]" noprescription_selfpaid)>
-<label for=noprescription_selfpaid>$(l10n selfpaid)</label>
-<br>
-
-<label class=presctype>$(l10n altpractition):</label>
-<input type=radio name=presctype id=altpractition_selfpaid value=altpractition_selfpaid $(check "$mpx[presctype]" altpractition_selfpaid)>
-<label for=altpractition_selfpaid>$(l10n selfpaid)</label>
-<input type=radio name=presctype id=altpractition_private value=altpractition_private $(check "$mpx[presctype]" altpractition_private)>
-<label for=altpractition_private>$(l10n private)</label>
-<br>
-
-<fieldset class="baseinfo">
-<label for="insurance">$(l10n insurance)</label>
-<input id="insurance" name="insurance" value="${mpx[insurance]}" placeholder="$(l10n insurance)">
-<br>
-<label for="name">$(l10n name)</label>
-<label for="bday">$(l10n bday)</label>
-<br>
-<textarea id="name" name="name" placeholder="$(l10n name)">${mpx[name]}</textarea>
-<input id="bday" name="bday" value="${mpx[bday]}" placeholder="$(l10n bday)">
-
-<br>
-<label for="date">$(l10n date)</label>
-<input id="date" name="date" value="${mpx[date]}" placeholder="$(l10n date)">
-</fieldset>
-
-<fieldset class="misc">
-<h1 id="${mpx[prescription]}">$(l10n therapy_prescription)</h1>
-
-<label for="addcontrib">$(l10n addcontrib)</label>
-<input id="addcontrib" name="addcontrib" value="${mpx[addcontrib]}" placeholder="$(l10n addcontrib)">
-<label for="contribconfirm">$(l10n contribconfirm)</label>
-<input id="contribconfirm" name="contribconfirm" value="${mpx[contribconfirm]}" placeholder="$(l10n contribconfirm)">
-<input type="checkbox" id="contribreceipt" name="contribreceipt" value="true" ${mpx[contribreceipt]:+checked}>
-<label for="contribreceipt">$(l10n contribreceipt)</label>
-</fieldset>
-
-<input type="checkbox" id="prescreviewed" name="prescreviewed" value="true" ${mpx[prescreviewed]:+checked}>
-<label for="prescreviewed">$(l10n prescreviewed)</label>
-
-<fieldset class="catalogue">
-<h2>$(l10n prescription_by_catalogue)</h2>
-<input type="radio" id="prescfirst" name="prescno" value="first" $(check "$mpx[prescno]" first)>
-<label for="prescfirst">$(l10n prescfirst)</label>
-<br>
-<input type="radio" id="prescfollow1" name="prescno" value="follow1" $(check "$mpx[prescno]" follow1)>
-<label for="prescfollow1">$(l10n prescfollow1)</label>
-<br>
-<input type="radio" id="prescfollow2" name="prescno" value="follow2" $(check "$mpx[prescno]" follow2)>
-<label for="prescfollow2">$(l10n prescfollow2)</label>
-<br>
-<input type="radio" id="prescother" name="prescno" value="other" $(check "$mpx[prescno]" other)>
-<label for="prescother">$(l10n prescother)</label>
-<br>
-<input type="radio" id="presccontinual" name="prescno" value="continual" $(check "$mpx[prescno]" continual)>
-<label for="presccontinual">$(l10n presccontinual)</label>
-
-<br>
-<input type="checkbox" id="grouptherapy" name="grouptherapy" value="true" ${mpx[grouptherapy]:+checked}>
-<label for="grouptherapy">$(l10n grouptherapy)</label>
-<br>
-<input type="checkbox" id="housecall" name="housecall" value="true" ${mpx[housecall]:+checked}>
-<label for="housecall">$(l10n housecall)</label>
-<br>
-<input type="checkbox" id="report" name="report" value="true" ${mpx[report]:+checked}>
-<label for="report">$(l10n report)</label>
-</fieldset>
-
-<fieldset class="description">
-<label for="quantity">$(l10n quantity)</label>
-<label for="remidy">$(l10n remidy)</label>
-<label for="quantity_weekly">$(l10n quantity_weekly)</label>
-<p>
-<input id="quantity" name="quantity" value="${mpx[quantity]}" placeholder="$(l10n quantity)">
-<textarea id="remidy" name="remidy" placeholder="$(l10n remidy)">${mpx[remidy]}</textarea>
-<input id="quantity_weekly" name="quantity_weekly" value="${mpx[quantity_weekly]}" placeholder="$(l10n quantity_weekly)">
-</p>
-
-$( 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 class="trailbtn" type="checkbox" checked="checked" />'
-  else
-    printf '<input class="trailbtn" type="checkbox" />'
-  fi
-  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">
-    </p>
-  ' "$(l10n quantity)" "${mpx[quantity$n]}" \
-    "$(l10n remidy)" "${mpx[remidy$n]}" \
-    "$(l10n quantity_weekly)" "${mpx[quantity_weekly$n]}"
-done )
-
-<br>
-<p class="indicator_codes">
-<label for="indicator">$(l10n indicator)</label>
-<input id="indicator" name="indicator" value="${mpx[indicator]}" placeholder="$(l10n indicator)">
-<br>
-<label for="icd10">$(l10n icd10)</label>
-<input id="icd10" name="icd10" value="${mpx[icd10]}" placeholder="$(l10n icd10)">
-</p>
-<br>
-<p class="indicator_reading">
-<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">
-<button type="submit" name="action" value="save">$(l10n save)</button>
-<button type="submit" name="action" value="cancel">$(l10n cancel)</button>
-<button type="submit" name="action" value="delete">$(l10n delete)</button>
-</fieldset>
-
-</form>
-END_HTML