Support 1 and -1 in onewayCheck field

(closes #3910)
This commit is contained in:
Bryan Housel
2017-03-20 22:23:52 -04:00
parent e7c8a8c3ec
commit 1ecb456a3c

View File

@@ -149,7 +149,11 @@ export function uiFieldCheck(field, context) {
check.tags = function(tags) {
checkImpliedYes();
value = tags[field.key];
value = tags[field.key] && tags[field.key].toLowerCase();
if (field.type === 'onewayCheck' && (value === '1' || value === '-1')) {
value = 'yes';
}
input
.property('indeterminate', field.type !== 'defaultCheck' && !value)