Skip to content

Commit

Permalink
STL: add "Assistance for" question to dvr_case
Browse files Browse the repository at this point in the history
  • Loading branch information
nursix committed Nov 13, 2015
1 parent f804ccf commit a1b14af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
c1e1d47 (2015-11-13 11:36:38)
nursix-1.1.0-devel-3083-gf804ccf (2015-11-13 12:11:39)
1 change: 1 addition & 0 deletions controllers/dvr.py
Expand Up @@ -75,6 +75,7 @@ def prep(r):
crud_form = S3SQLCustomForm(
"dvr_case.reference",
"dvr_case.case_type_id",
"dvr_case.beneficiary",
"dvr_case.organisation_id",
"dvr_case.site_id",
"dvr_case.date",
Expand Down
13 changes: 13 additions & 0 deletions modules/s3db/dvr.py
Expand Up @@ -129,6 +129,11 @@ def model(self):
(1, T("Low")),
)

# Case beneficiary options
case_beneficiary_opts = {"INDIVIDUAL": T("Individual"),
"HOUSEHOLD": T("Household"),
}

SITE = current.deployment_settings.get_org_site_label()
permitted_facilities = current.auth.permitted_facilities(redirect_on_error=False)

Expand Down Expand Up @@ -156,6 +161,14 @@ def model(self):
},
),
),
Field("beneficiary",
default = "INDIVIDUAL",
label = T("Assistance for"),
represent = S3Represent(options=case_beneficiary_opts),
requires = IS_IN_SET(case_beneficiary_opts,
zero = None,
),
),
s3_date(label = T("Registration Date"),
default = "now",
empty = False,
Expand Down

0 comments on commit a1b14af

Please sign in to comment.