diff options
author | senator <senator> | 2009-09-23 13:52:59 +0000 |
---|---|---|
committer | senator <senator> | 2009-09-23 13:52:59 +0000 |
commit | 280c124b7fc384bff6ae0284ae030232711b3598 (patch) | |
tree | 16c413b27b5e17d2c024f9a3db93dc2b26f01a95 /server/xml/macros/boelgefront-1.0.xml | |
parent | 4278ad11a380615c10751d731c72659e86e2a266 (diff) |
added informeret samtykke to ref_forunders
Diffstat (limited to 'server/xml/macros/boelgefront-1.0.xml')
-rw-r--r-- | server/xml/macros/boelgefront-1.0.xml | 72 |
1 files changed, 67 insertions, 5 deletions
diff --git a/server/xml/macros/boelgefront-1.0.xml b/server/xml/macros/boelgefront-1.0.xml index f198167..7628f41 100644 --- a/server/xml/macros/boelgefront-1.0.xml +++ b/server/xml/macros/boelgefront-1.0.xml @@ -1,25 +1,87 @@ <?xml version='1.0' encoding='UTF-8'?> <macro name="boelgefront" version="1.0"> - <resume language="pracro">Bølgefront: ${boelgefront}</resume> + <resume language="lua"> + out = '' + out = out .. 'Bølgefront: ' .. getValue('boelgefront') .. '\n' + if ( getValue('boelgefront') == 'Udført' ) + then + out = out .. 'Aberration: ' .. getValue('boelgefront.aberration') .. ' my\n' + out = out .. 'Pupilstørrelse: ' .. getValue('boelgefront.pupilstoerrelse') .. ' mm\n' + end + return out + </resume> <queries> </queries> <maps> </maps> <scripts> + <script language="lua" name="extras_check"> + if ( getValue('boelgefront') == 'Udført' ) + then + enable('extras') + else + disable('extras') + end + return true + </script> + <script language="lua" name="gt0.1lt0.5"> + if(value == '') + then + return false + end + + value = string.gsub(value, ',', '.') + if(tonumber(value) >= 0.1 and tonumber(value) <= 0.5) + then + return true + else + return false + end + </script> + <script language="lua" name="gt2lt9"> + if(value == '') + then + return false + end + + value = string.gsub(value, ',', '.') + if(tonumber(value) >= 2 and tonumber(value) <= 9) + then + return true + else + return false + end + </script> </scripts> <widgets caption="Bølgefront" layout="vbox"> - <altcombobox name="boelgefront" value="Ikke udført" layout="vbox"> + <altcombobox name="boelgefront" value="Ikke udført" layout="vbox" script="extras_check"> <item caption="Udført" value="Udført"/> <item caption="Ikke udført" value="Ikke udført"/> - <altitem caption="Andet" value="andet" innerwidget="boelgefront_andet"> + <altitem caption="Andet" value="andet" innerwidget="boelgefront.andet"> <frame layout="hbox"> <label caption="Andet:"/> - <lineedit name="boelgefront_andet"/> + <lineedit name="boelgefront.andet"/> </frame> </altitem> </altcombobox> - + + <frame name="extras" layout="hbox"> + <frame layout="vbox"> + <label caption="Aberration:"/> + <label caption="Pupilstørrelse:"/> + </frame> + <frame layout="vbox"> + <lineedit name="boelgefront.aberration" script="gt0.1lt0.5" regexp="\d{1,2},\d{2}"/> + <lineedit name="boelgefront.pupilstoerrelse" script="gt2lt9" regexp="\d{1,2},\d{1}"/> + </frame> + <frame layout="vbox"> + <label caption="my"/> + <label caption="mm"/> + </frame> + <spacer/> + </frame> + <frame layout="hbox"> <spacer/> <button caption="Gem" action="commit"/> |