Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
citizen-science
symbai
Commits
fcad9380
Commit
fcad9380
authored
May 12, 2014
by
Dave Griffiths
Browse files
removed residence after marriage for those not married
parent
b962245c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
21 deletions
+31
-21
android/assets/dbsync.scm
android/assets/dbsync.scm
+24
-19
android/assets/starwisp.scm
android/assets/starwisp.scm
+7
-2
No files found.
android/assets/dbsync.scm
View file @
fcad9380
...
@@ -506,25 +506,30 @@
...
@@ -506,25 +506,30 @@
(
lambda
(
c
)
(
fn
c
)))))
(
lambda
(
c
)
(
fn
c
)))))
(
define
(
mspinner-other
id
types
fn
)
(
define
(
mspinner-other
id
types
fn
)
(
horiz
(
linear-layout
(
vert
(
make-id
(
string-append
(
symbol->string
id
)
"-container"
))
(
text-view
(
symbol->id
id
)
'horizontal
(
mtext-lookup
id
)
(
layout
'fill-parent
'wrap-content
1
'centre
5
)
30
(
layout
'wrap-content
'wrap-content
1
'centre
10
))
(
list
0
0
0
0
)
(
spinner
(
make-id
(
string-append
(
symbol->string
id
)
"-spinner"
))
(
list
(
map
mtext-lookup
types
)
(
vert
(
layout
'wrap-content
'wrap-content
1
'centre
0
)
(
text-view
(
symbol->id
id
)
(
lambda
(
c
)
(
mtext-lookup
id
)
;; dont call if set to "other"
30
(
layout
'wrap-content
'wrap-content
1
'centre
10
))
(
if
(
<
c
(
-
(
length
types
)
1
))
(
spinner
(
make-id
(
string-append
(
symbol->string
id
)
"-spinner"
))
(
fn
c
)
(
map
mtext-lookup
types
)
'
()))))
(
layout
'wrap-content
'wrap-content
1
'centre
0
)
(
vert
(
lambda
(
c
)
(
mtext-scale
'other
)
;; dont call if set to "other"
(
edit-text
(
make-id
(
string-append
(
symbol->string
id
)
"-edit-text"
))
(
if
(
<
c
(
-
(
length
types
)
1
))
""
30
"normal"
(
fn
c
)
(
layout
'fill-parent
'wrap-content
1
'centre
0
)
'
()))))
(
lambda
(
t
)
(
fn
t
))))))
(
vert
(
mtext-scale
'other
)
(
edit-text
(
make-id
(
string-append
(
symbol->string
id
)
"-edit-text"
))
""
30
"normal"
(
layout
'fill-parent
'wrap-content
1
'centre
0
)
(
lambda
(
t
)
(
fn
t
)))))))
(
define
(
mspinner-other-vert
id
text-id
types
fn
)
(
define
(
mspinner-other-vert
id
text-id
types
fn
)
(
linear-layout
(
linear-layout
...
...
android/assets/starwisp.scm
View file @
fcad9380
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
(
define
tribes-list
'
(
khasi
other
))
(
define
tribes-list
'
(
khasi
other
))
(
define
subtribe-list
'
(
khynriam
pnar
bhoi
war
other
))
(
define
subtribe-list
'
(
khynriam
pnar
bhoi
war
other
))
(
define
education-list
'
(
primary
middle
high
secondary
university
))
(
define
education-list
'
(
primary
middle
high
secondary
university
))
(
define
married-list
'
(
ever-married
currently-married
currently-single
seperated
))
(
define
married-list
'
(
currently-married
currently-single
seperated
))
(
define
residence-list
'
(
birthplace
spouse-village
))
(
define
residence-list
'
(
birthplace
spouse-village
))
(
define
gender-list
'
(
male
female
))
(
define
gender-list
'
(
male
female
))
(
define
house-type-list
'
(
concrete
tin
thatched
other
))
(
define
house-type-list
'
(
concrete
tin
thatched
other
))
...
@@ -982,7 +982,12 @@
...
@@ -982,7 +982,12 @@
(
vert
(
vert
(
mspinner
'head-of-house
gender-list
(
lambda
(
v
)
(
entity-set-value!
"head-of-house"
"varchar"
(
spinner-choice
gender-list
v
))
'
()))
(
mspinner
'head-of-house
gender-list
(
lambda
(
v
)
(
entity-set-value!
"head-of-house"
"varchar"
(
spinner-choice
gender-list
v
))
'
()))
(
mspinner
'marital-status
married-list
(
lambda
(
v
)
(
entity-set-value!
"marital-status"
"varchar"
(
spinner-choice
married-list
v
))
'
()))
(
mspinner
'marital-status
married-list
(
lambda
(
v
)
(
entity-set-value!
"marital-status"
"varchar"
(
spinner-choice
married-list
v
))
'
()))
(
medit-text
'times-married
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"times-married"
"int"
v
)
'
())))
(
medit-text
'times-married
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"times-married"
"int"
v
)
(
list
(
update-widget
'linear-layout
(
get-id
"residence-after-marriage-container"
)
(
if
(
equal?
v
"0"
)
'hide
'show
)
0
)))))
(
build-person-selector
'spouse
"id-spouse"
(
list
)
spouse-request-code
)
(
build-person-selector
'spouse
"id-spouse"
(
list
)
spouse-request-code
)
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment