apostrophe-schemas
Advanced tools
Comparing version 0.5.77 to 0.5.78
{ | ||
"version": "0.5.77", | ||
"version": "0.5.78", | ||
"name": "apostrophe-schemas", | ||
@@ -4,0 +4,0 @@ "description": "Schemas for easy editing of properties in Apostrophe objects", |
@@ -353,3 +353,7 @@ /* globals: async, apos, _, aposPages, async, $ */ | ||
boolean: function(data, name, $field, $el, field, callback) { | ||
data[name] = $field.val(); | ||
if (field.checkbox) { | ||
data[name] = $field.prop('checked'); | ||
} else { | ||
data[name] = $field.val(); | ||
} | ||
// Seems odd but sometimes used to mandate an "I agree" box | ||
@@ -576,3 +580,7 @@ if (field.required && !data[name]) { | ||
boolean: function(data, name, $field, $el, field, callback) { | ||
$field.val(data[name] ? '1' : '0'); | ||
if (field.checkbox) { | ||
$field.prop('checked', data[name]); | ||
} else { | ||
$field.val(data[name] ? '1' : '0'); | ||
} | ||
return apos.afterYield(callback); | ||
@@ -579,0 +587,0 @@ }, |
Sorry, the diff of this file is not supported yet
116382
1639