Fixed checkboxes name field (fixes #34)

This commit is contained in:
Djamil Legato
2015-08-07 14:42:59 -07:00
parent ca7b723822
commit fbe7b66972
2 changed files with 6 additions and 2 deletions

View File

@@ -84,7 +84,7 @@
formValues = {};
for (var key in values) { if (values.hasOwnProperty(key)) {
formValues[name + '[' + key + ']'] = values[key] ? '1' : '0';
formValues[key] = values[key] ? '1' : '0';
}
}
@@ -96,5 +96,9 @@
this.el.find('input').on('change', function () { eh.call(self, self.value()); });
};
CheckboxesField.prototype.getFieldName = function() {
return this.el.data('grav-array-name');
};
root.Checkboxes = CheckboxesField;
})();