From 27abfdd15714895894565124bcc660b9d6774494 Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Fri, 19 Jun 2015 15:29:19 -0400 Subject: Add 'flag' data type --- themes/okadmin/public/js/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'themes/okadmin/public') diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index d58cb2a..4be0afc 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -181,6 +181,17 @@ var OKAdmin = function(){ $(el).append(normalizedInput) }) + // Modify flags checkboxes such that unchecked ones return "false" + // instead of nothing + $('.property .flag').each(function(i, el) { + var input = el.querySelector('input') + var checked = !!input.checked + if (!checked) { + $(input).attr('value', 'false') + input.checked = true + } + }) + $("ol").each(function(){ $("li", this).each(function(index){ $(this).find("input,textarea").each(function(){ -- cgit v1.2.3-70-g09d2