| | 29 | * Ref: Mapper stage - http://eden.sahanafoundation.org/wiki/UserGuidelinesImporter |
| | 30 | * Work around - |
| | 31 | {{{ |
| | 32 | irs_simple_type_mapping = { |
| | 33 | 1: T("Broken road"), |
| | 34 | 2: T("Broken bridge"), |
| | 35 | 3: T("Landslide"), |
| | 36 | 4: T("Building collapsed"), |
| | 37 | 5: T("People trapped"), |
| | 38 | 6: T("Power failure"), |
| | 39 | } |
| | 40 | #table.category.requires = IS_NULL_OR(IS_IN_SET(irs_incident_type_opts)) |
| | 41 | table.category.requires = IS_NULL_OR(IS_IN_SET(irs_simple_type_mapping)) |
| | 42 | table.category.represent = lambda opt: irs_simple_type_mapping.get(opt, opt) |
| | 43 | #table.category.represent = lambda opt: irs_incident_type_opts.get(opt, opt) |
| | 44 | }}} |