Commit 1f024db1 authored by Dave Griffiths's avatar Dave Griffiths

added birth year/age calc

parent dda0e415
......@@ -1216,7 +1216,14 @@
(mspinner-other 'tribe tribes-list (lambda (v) (entity-set-value! "tribe" "varchar" (spinner-choice tribes-list v)) '()))
(mspinner-other 'sub-tribe subtribe-list (lambda (v) (entity-set-value! "subtribe" "varchar" (spinner-choice subtribe-list v)) '()))
(horiz
(medit-text 'age "numeric" (lambda (v) (entity-set-value! "age" "int" (string->number v)) '()))
(medit-text 'birth-year "numeric" (lambda (v)
(entity-set-value! "birth-year" "int" (string->number v))
(list (update-widget 'text-view (get-id "age") 'text
(string-append
"= "
(number->string (- date-year (string->number v)))
(mtext-lookup 'years-old))))))
(mtext 'age)
(mspinner 'gender gender-list (lambda (v) (entity-set-value! "gender" "varchar" (spinner-choice gender-list v)) '())))
(horiz
(mspinner 'literate yesno-list (lambda (v) (entity-set-value! "literate" "varchar" (spinner-choice yesno-list v)) '()))
......@@ -1241,7 +1248,7 @@
(mupdate 'edit-text 'details-first-name "first-name")
(mupdate 'edit-text 'details-family "family")
(mupdate 'image-view 'photo "photo")
(mupdate 'edit-text 'age "age")
(mupdate 'edit-text 'birth-year "birth-year")
(mupdate-spinner 'gender "gender" gender-list)
(mupdate-spinner 'literate "literate" yesno-list)
(mupdate-spinner 'education "education" education-list)
......
......@@ -6,6 +6,8 @@
(list 'no (list "No" ))
(list 'not-answered (list "Unanswered" ))
(list 'not-set (list "Not set" ))
(list 'years-old (list " years old"))
(list 'birth-year (list "Birth year"))
(list 'agree-record (list "Record"))
(list 'agree-playback (list "Play"))
(list 'photo-agree-record (list "Record"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment