From 1ecb456a3c517fcbbcbc3ceb49e975ab98936e06 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 20 Mar 2017 22:23:52 -0400 Subject: [PATCH] Support 1 and -1 in onewayCheck field (closes #3910) --- modules/ui/fields/check.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ui/fields/check.js b/modules/ui/fields/check.js index e660d6aaa..4c38222aa 100644 --- a/modules/ui/fields/check.js +++ b/modules/ui/fields/check.js @@ -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)