diff options
Diffstat (limited to 'server/xml/macros/B.2.2.3.xml')
-rw-r--r-- | server/xml/macros/B.2.2.3.xml | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/server/xml/macros/B.2.2.3.xml b/server/xml/macros/B.2.2.3.xml new file mode 100644 index 0000000..849d80f --- /dev/null +++ b/server/xml/macros/B.2.2.3.xml @@ -0,0 +1,115 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- + 20081203: Bent Bisballe Nyeng + Feltnavnene ændret så de giver mening. + --> +<!-- + 20090108: Bent Bisballe Nyeng + Højre/venstre byttet om. + --> +<macro name="B.2.2.3" version="1.0"> + <resume>Autorefraktion højre øje: ${autorefractor.right.sphere} sf, ${autorefractor.right.cyl} cyl ${autorefractor.right.axis} grader. +Autorefraktion venstre øje: ${autorefractor.left.sphere} sf, ${autorefractor.left.cyl} cyl ${autorefractor.left.axis} grader.</resume> + <queries> + </queries> + <maps> + </maps> + <scripts> + <script language="lua" name="lt20gt-25"> + if(value == '') + then + return false + end + + value = string.gsub(value, ',', '.') + if(tonumber(value) >= -25 and tonumber(value) <= 20) + then + return true + else + return false + end + </script> + <script language="lua" name="lt10gt-15"> + if(value == '') + then + return false + end + + value = string.gsub(value, ',', '.') + if(tonumber(value) >= -15 and tonumber(value) <= 10) + then + return true + else + return false + end + </script> + <script language="lua" name="lt359gt0"> + if(value == '') + then + return false + end + + value = string.gsub(value, ',', '.') + if(tonumber(value) >= 0 and tonumber(value) <= 359) + then + return true + else + return false + end + </script> + </scripts> + <window caption="Autorefraktion (B.2.2.3)" + layout="vbox"> + + <frame layout="hbox"> + + <!-- Højre øje --> + <frame caption="Højre øje" layout="hbox"> + + <frame layout="vbox"> + <label caption="Sf:"/> + <lineedit name="autorefractor.right.sphere" + regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/> + </frame> + <frame layout="vbox"> + <label caption="Cyl:"/> + <lineedit name="autorefractor.right.cyl" + regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/> + </frame> + <frame layout="vbox"> + <label caption="Grader:"/> + <lineedit name="autorefractor.right.axis" + regexp="[\d]+" script="lt359gt0" value=""/> + </frame> + + </frame> + + <!-- Venstre øje --> + <frame caption="Venstre øje" layout="hbox"> + + <frame layout="vbox"> + <label caption="Sf:"/> + <lineedit name="autorefractor.left.sphere" + regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/> + </frame> + <frame layout="vbox"> + <label caption="Cyl:"/> + <lineedit name="autorefractor.left.cyl" + regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/> + </frame> + <frame layout="vbox"> + <label caption="Grader:"/> + <lineedit name="autorefractor.left.axis" + regexp="[\d]+" script="lt359gt0" value=""/> + </frame> + </frame> + + </frame> + + <!-- Knapper --> + <frame layout="hbox"> + <spacer /> + <button caption="Gem" action="commit"/> + </frame> + </window> +</macro> |