/* * Copyright (c) 2012-2014 Kaarle Ritvanen * See LICENSE file for license details */ define(["aconf/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"); if (value) this.field.attr("checked", "true"); }, get: function() { return this.field.is(":checked"); } }); });