/*
* Copyright (c) 2012-2014 Kaarle Ritvanen
* See LICENSE file for license details
*/
define(["acf2/widget/field", "jquery"], function(Base, $) {
return Base.extend({
staticRender: function(value, meta) {
return $("
").text(value ? "Yes" : "No");
},
statusEl: function() { return this.el.parent(); },
render: function(value, meta) {
this.field.attr({type: "checkbox", checked: value});
},
get: function() { return this.field.is(":checked"); }
});
});
|