improved styling for prescription sheets
[confetti] / templates / edit_prescription.sh
1 # Copyright 2016 Paul Hänsch
2 #
3 # This file is part of Confetti.
4
5 # Confetti is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Confetti is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
17
18 check(){ [ "$1" = "$2" ] && printf checked}
19
20 cat <<END_HTML
21 <form class="prescription" action="?action=update_prescription" method="POST">
22 <input type="hidden" name="prescription" value="${mpx[prescription]}">
23
24 <fieldset class="baseinfo">
25 <label for="insurance">$(l10n insurance)</label>
26 <input id="insurance" name="insurance" value="${mpx[insurance]}" placeholder="$(l10n insurance)">
27 <br>
28 <label for="name">$(l10n name)</label>
29 <label for="bday">$(l10n bday)</label>
30 <br>
31 <textarea id="name" name="name" placeholder="$(l10n name)">${mpx[name]}</textarea>
32 <input id="bday" name="bday" value="${mpx[bday]}" placeholder="$(l10n bday)">
33
34 <br>
35 <label for="date">$(l10n date)</label>
36 <input id="date" name="date" value="${mpx[date]}" placeholder="$(l10n date)">
37 </fieldset>
38
39 <fieldset class="misc">
40 <h1>$(l10n therapy_prescription)</h1>
41
42 <label for="addcontrib">$(l10n addcontrib)</label>
43 <input id="addcontrib" name="addcontrib" value="${mpx[addcontrib]}" placeholder="$(l10n addcontrib)">
44 <input type="checkbox" id="contribconfirm" name="contribconfirm" value="true" ${mpx[contribconfirm]:+checked}>
45 <label for="contribconfirm">$(l10n contribconfirm)</label>
46 </fieldset>
47
48 <fieldset class="catalogue">
49 <h2>$(l10n prescription_by_catalogue)</h2>
50 <input type="radio" id="prescfirst" name="prescno" value="first" $(check "$mpx[prescno]" first)>
51 <label for="prescfirst">$(l10n prescfirst)</label>
52 <br>
53 <input type="radio" id="prescfollow1" name="prescno" value="follow1" $(check "$mpx[prescno]" follow1)>
54 <label for="prescfollow1">$(l10n prescfollow1)</label>
55 <br>
56 <input type="radio" id="prescfollow2" name="prescno" value="follow2" $(check "$mpx[prescno]" follow2)>
57 <label for="prescfollow2">$(l10n prescfollow2)</label>
58 <br>
59 <input type="radio" id="presccontinual" name="prescno" value="continual" $(check "$mpx[prescno]" continual)>
60 <label for="presccontinual">$(l10n presccontinual)</label>
61 <br>
62 <input type="radio" id="prescother" name="prescno" value="other" $(check "$mpx[prescno]" other)>
63 <label for="prescother">$(l10n prescother)</label>
64
65 <br>
66 <input type="checkbox" id="grouptherapy" name="grouptherapy" value="true" ${mpx[grouptherapy]:+checked}>
67 <label for="grouptherapy">$(l10n grouptherapy)</label>
68 <br>
69 <input type="checkbox" id="housecall" name="housecall" value="true" ${mpx[housecall]:+checked}>
70 <label for="housecall">$(l10n housecall)</label>
71 <br>
72 <input type="checkbox" id="report" name="report" value="true" ${mpx[report]:+checked}>
73 <label for="report">$(l10n report)</label>
74 </fieldset>
75
76 <fieldset class="description">
77 <label for="quantity">$(l10n quantity)</label>
78 <label for="remidy">$(l10n remidy)</label>
79 <label for="quantity_weekly">$(l10n quantity_weekly)</label>
80 <input id="quantity" name="quantity" value="${mpx[quantity]}" placeholder="$(l10n quantity)">
81 <textarea id="remidy" name="remidy" placeholder="$(l10n remidy)">${mpx[remidy]}</textarea>
82 <input id="quantity_weekly" name="quantity_weekly" value="${mpx[quantity_weekly]}" placeholder="$(l10n quantity_weekly)">
83
84 <label for="quantity1">$(l10n quantity)</label>
85 <label for="remidy1">$(l10n remidy)</label>
86 <label for="quantity_weekly1">$(l10n quantity_weekly)</label>
87 <input id="quantity1" name="quantity1" value="${mpx[quantity1]}" placeholder="$(l10n quantity)">
88 <textarea id="remidy1" name="remidy1" placeholder="$(l10n remidy)">${mpx[remidy1]}</textarea>
89 <input id="quantity_weekly1" name="quantity_weekly1" value="${mpx[quantity_weekly1]}" placeholder="$(l10n quantity_weekly)">
90
91 <br>
92 <label for="indicator">$(l10n indicator)</label>
93 <input id="indicator" name="indicator" value="${mpx[indicator]}" placeholder="$(l10n indicator)">
94 <br>
95 <label for="icd10">$(l10n icd10)</label>
96 <input id="icd10" name="icd10" value="${mpx[icd10]}" placeholder="$(l10n icd10)">
97 </fieldset>
98
99 <input type="checkbox" id="prescreviewed" name="prescreviewed" value="true" ${mpx[prescreviewed]:+checked}>
100 <label for="prescreviewed">$(l10n prescreviewed)</label>
101
102 <fieldset class="controls">
103 <button type="submit" name="action" value="save">$(l10n save)</button>
104 <button type="submit" name="action" value="cancel">$(l10n cancel)</button>
105 <button type="submit" name="action" value="delete">$(l10n delete)</button>
106 </fieldset>
107
108 </form>
109 END_HTML