]> git.plutz.net Git - confetti/blobdiff - templates/prescriptions.css.sh
issuer field on prescription document
[confetti] / templates / prescriptions.css.sh
index cd8776022919766104447414412910a87be7c885..3810eeb9fe2a63964f00bcf782a97cc1ae597727 100755 (executable)
 # You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
-. ${0%/*}/attendees.css.sh
+. ${0%/*}/cards.css.sh
 
 cat <<EOF
 /**/
+body {padding-bottom: 3em; }
+
+.trailbtn { display: none; }
+.trailbtn + .trailbox { display: none; }
+.trailbtn:checked + .trailbox { display: inline-block; }
+.trailbtn:checked + .trailbox + .trailbtn { display: block; }
+.trailbtn:checked + .trailbox + .trailbtn:before {
+   display: block; content: '+';
+   width: 3ex; text-align: center;
+   margin-top: .25em; padding: .25em 0;
+   background-color: #FFF;
+   border-width: 1px; border-style: solid;
+}
+.trailbtn:checked + .trailbox + .trailbtn:checked,
+.trailbtn:checked { display: none; }
 
 .prescription {
   display: inline-block;
   width: 96%; max-width: 460px;
   color: #800;
-  background-color: #CFF;
+  background-color: #DDD;
   margin: 1em -1% 0 2%; padding: 0;
   border: 1px solid #888;
   overflow: hidden;
+  vertical-align: top;
 }
+form.prescription { padding-top: 1ex;}
 
 .newprescription {
   display: block;
@@ -50,26 +67,6 @@ cat <<EOF
   font-size: .75em;
 }
 
-.prescription table {display: block; width: 100%; border-collapse: collapse;}
-.prescription table tbody {width: 100%; margin: 0 auto;}
-.prescription table tr {display: table-row; width: 100%; margin: 0 auto;}
-.prescription table tr th,
-.prescription table tr td {
-  display: table-cell;
-  text-align: left;
-  padding: .25ex 1ex;
-  border-left: 1px solid red;
-}
-.prescription table tr th { padding: .25em 1ex; border-bottom: 1px solid red;}
-.prescription table tr th:nth-of-type(1),
-.prescription table tr td:nth-of-type(1) { border-left: none;}
-
-td.private  {background-color: #BFB;}
-td.selfpaid {background-color: #FFB;}
-td.compulsory.doctor {background-color: #BBF;}
-td.compulsory.dentist {background-color: #FBB;}
-td.altpractition { background-color: #FBF;}
-
 .prescription fieldset {
   display: inline-block;
   margin: 0; padding: 1ex;
@@ -137,6 +134,40 @@ td.altpractition { background-color: #FBF;}
 
 /* ======== Specific ========== */
 
+.prescription label.presctype,
+.prescription input[name=presctype] + label {
+  font-size: medium;
+  width: 22%;
+  margin: 0; margin-right: -.5ex;
+  vertical-align: top;
+  padding: .25em .5ex .25em 3ex;
+  height: 2.5em;
+  border-top: 1px solid #DDD;
+}
+.prescription label.presctype {
+  text-align: right;
+  font-weight: bold;
+  font-size: .875em;
+  padding-right: 1ex;
+  padding-left: 0;
+}
+
+input[name=presctype][value\$=private]:checked  ~ fieldset,
+  input[name=presctype][value\$=private] + label,
+  .prescription.private { background-color: #CFC;}
+input[name=presctype][value\$=selfpaid]:checked  ~ fieldset,
+  input[name=presctype][value\$=selfpaid]         + label,
+  .prescription.selfpaid { background-color: #FFC;}
+input[name=presctype][value=doctor_compulsory]:checked  ~ fieldset,
+  input[name=presctype][value=doctor_compulsory]  + label,
+  .prescription.doctor.compulsory { background-color: #CFF;}
+input[name=presctype][value=dentist_compulsory]:checked  ~ fieldset,
+  input[name=presctype][value=dentist_compulsory] + label,
+  .prescription.dentist.compulsory { background-color: #FCC;}
+input[name=presctype][value^=altpractition]:checked  ~ fieldset,
+  input[name=presctype][value^=altpractition]     + label,
+  .prescription.altpractition { background-color: #FCF;}
+
 .prescription .baseinfo { width: 60%;}
 
   .baseinfo label[for=insurance],
@@ -176,7 +207,7 @@ td.altpractition { background-color: #FBF;}
 .prescription :checked + label[for=prescreviewed] {
   font-weight: normal;
   text-decoration: none;
-  background-color: #CFF;
+  background-color: transparent;
 }
 
 .prescription .catalogue { width: 100%; }
@@ -198,19 +229,16 @@ td.altpractition { background-color: #FBF;}
 .prescription .description { width: 100%; position: relative;}
   .description * { margin-right: -.625ex; vertical-align: top; }
   .description label {vertical-align: bottom;}
-  .description label[for=quantity1],
-  .description label[for=remidy1],
-  .description label[for=quantity_weekly1] {display: none;}
 
   .description label[for=quantity] { width: 20%;}
-  .description #quantity,
-  .description #quantity1 { width: 20%;  height: 3em; text-align: center;}
   .description label[for=remidy] { width: 60%; }
-  .description #remidy,
-  .description #remidy1 { width: 60%; height: 3em;}
   .description label[for=quantity_weekly] { width: 20%;}
+  .description #quantity,
+  .description .quantity { width: 20%;  height: 3em; text-align: center;}
+  .description #remidy,
+  .description .remidy { width: 60%; height: 3em;}
   .description #quantity_weekly,
-  .description #quantity_weekly1 { width: 20%; height: 3em; text-align: center;}
+  .description .quantity_weekly { width: 20%; height: 3em; text-align: center;}
 
   .description .indicator_codes {display: inline-block; width: 20%; padding: 0; padding-top: 1.5ex;}
   .description label[for=indicator],
@@ -223,6 +251,44 @@ td.altpractition { background-color: #FBF;}
   .description #indicator_reading { width: 100%; display: block;}
   .description #indicator_reading { height: 4em;}
 
+  .description .issuer { display: inline-block; width: 50%; padding: 0; padding-top: 0; margin-left: 50%;}
+  .description .issuer label:first-of-type {
+     display: block;
+     position: relative;
+     width: 50%; left: -50%; top: 2.25em;
+     font-size: 1em;
+     text-align: right;
+     padding-right: 1ex;
+   }
+  .description .issuer input[type=radio] + label:before { content: none; }
+  .description .issuer input[type=radio] { display: none; }
+  .description .issuer input[type=radio] + label {
+    display: inline-block;
+    width: 50%;
+    padding: .25ex 0; margin: 0;
+    text-align: center;
+    border: 1px solid black;
+  }
+  .description .issuer input[type=radio]:checked + label {
+    font-weight: bold;
+    background-color: #FFF;
+    border-width: 1px;
+    border-bottom: 1px solid #FFF;
+  }
+  .description .issuer input[type=radio] + label + input + label + select,
+  .description .issuer input[type=radio] + label + select + input { display: none; }
+  .description .issuer input[type=radio]:checked + label + input + label + select,
+  .description .issuer input[type=radio]:checked + label + select + input {
+    display: block; width: 100%;
+    border: 1px solid black;
+    background-color: #FFF;
+    border-width: 0 1px 1px 1px;
+    padding: .25ex .5ex;
+    margin-top: -1px;
+  }
+  .description .issuer input[type=radio]:checked + label + input + label + select option { display: block;}
+  .description span#issuer { width: 100%; height: 3em; padding: 1ex 2ex;}
+
 .prescription .controls { width: 100%; }
   .controls a.button,
   .controls button[value=save],