summaryrefslogtreecommitdiff
path: root/server/xml/macros/B.2.1.3.xml
diff options
context:
space:
mode:
authordeva <deva>2009-02-12 14:37:14 +0000
committerdeva <deva>2009-02-12 14:37:14 +0000
commit8064990a976bdc65bc798ba6aab978533485eb2d (patch)
treefb768a7c45db84d078da666b8bb17af280e07796 /server/xml/macros/B.2.1.3.xml
parent01741251d16bfb23a99f315fd1970597938ae5ce (diff)
Made changes according to new formatlanguage attribute on metawidget.
Diffstat (limited to 'server/xml/macros/B.2.1.3.xml')
-rw-r--r--server/xml/macros/B.2.1.3.xml9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/xml/macros/B.2.1.3.xml b/server/xml/macros/B.2.1.3.xml
index b279bfe..9272594 100644
--- a/server/xml/macros/B.2.1.3.xml
+++ b/server/xml/macros/B.2.1.3.xml
@@ -14,6 +14,10 @@ ${current_eye_disease}</resume>
<queries>
</queries>
<maps>
+ <map name="now">
+ -- Set date to now if no other data available within last 24 hours.
+ return os.time(), os.time() - 24*60*60, 'system'
+ </map>
</maps>
<scripts>
</scripts>
@@ -24,11 +28,12 @@ ${current_eye_disease}</resume>
innerwidget="aktuelle_entry">
<metawidget name="aktuelle_entry" layout="hbox"
- format="${date} - På ${eye} øje er der observeret ${observeret}. Symptomerne er opstået ${when} og er efterfølgende ${then}">
+ formatlanguage="lua"
+ format="return os.date('%e. %b %Y', tonumber(getValue('date'))) .. ' - På ' .. getValue('eye')..' øje er der observeret '..getValue('observeret')..'. Symptomerne er opstået ' .. getValue('when')..' og er efterfølgende '..getValue('then')">
<frame layout="vbox">
<label caption="Dato:"/>
- <datetime name="date" fuzziness="3"/>
+ <datetime name="date" fuzziness="3" map="now"/>
<label caption=""/>
</frame>