Get the checkbox
@param  {Boolean} checked - add a X or not to the checkbox
@return {String} Composited checkbox string
971610
function getCheckbox(checked) {
  return checked ? utils.chalk.green(utils.figures.radioOn) : utils.figures.radioOff;
}
941578
public function setChecked(bool $checked = true) : FormElement
    {
        if (true === $checked) {
            $this->attributes['checked'] = 'checked';
        } else {
            unset($this->attributes['checked']);
        }
        return $this;
    }
1237721
function() {
        var value = '';
        this.$group.each(function(index, element) {
            if (element.checked) {
                value = $(element).val();
                return false;
            }
        });
        return value;
    }
29795
public function setChecked($checked = true)
    {
        $this->clearCache();
        $this->checked = (bool)$checked;
        return $this;
    }
653733
function getInputValue(inputElement) {
    if (inputElement.type) {
        if (inputElement.type.toUpperCase() == 'CHECKBOX' ||
            inputElement.type.toUpperCase() == 'RADIO')
        {
            return (inputElement.checked ? 'on' : 'off');
        }
    }
    if (inputElement.value == null) {
        throw new SeleniumError("This element has no value; is it really a form field?");
    }
    return inputElement.value;
}
1322069
function checkboxVal( name ) {
  log( "Pong-Form", "checkboxVal: "+name);
  var result = '[';
  var first = true;
  for ( var i = 0; i < checkboxVals.length; i++ ) {
    if ( checkboxVals[i].name == name  ) {
      if ( $( "#"+checkboxVals[i].id ).is(':checked') ) {
        if ( ! first ) { result += ','; }
        result += "'"+checkboxVals[i].val+"'";
        log( "Pong-Form", " val= "+checkboxVals[i].val);

        first = false;
      }
    }
  }
  result += ']';
  return result;
}
1317376
function () {
            var _this = this;
            return typeof this.value === 'boolean' ? {
                checked: this.value,
                onChange: function (e) { return _this.set(Boolean(e.target.checked)); }
            } : {
                value: this.value,
                onChange: function (e) { return _this.set(e.target.value); }
            };
        }
514904
public static function form_checkbox($data = '', $value = '', $checked = false, $extra = '')
    {
        $defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);

        if (is_array($data) && array_key_exists('checked', $data)) {
            $checked = $data['checked'];

            if ($checked == false) {
                unset($data['checked']);
            } else {
                $data['checked'] = 'checked';
            }
        }

        if ($checked == true) {
            $defaults['checked'] = 'checked';
        } else {
            unset($defaults['checked']);
        }

        return "<input ".self::_parse_form_attributes($data, $defaults).$extra." />\n";
    }
262470
function createEnablerCheckbox (api, title, isEnabled, appendTo, callback) {
    var container = document.getElementById(appendTo);

    var label = document.createElement('label');
    label.classList.add('topcoat-checkbox');

    var checkbox = document.createElement('input');
    checkbox.type = 'checkbox';
    checkbox.value = api;
    checkbox.checked = isEnabled;
    label.htmlFor = checkbox.id = 'enable_' + api;

    checkbox.onchange = function (e) {
        e.preventDefault();
        callback(e);
    };

    var div = document.createElement('div');
    div.classList.add('topcoat-checkbox__checkmark');

    var text = document.createElement('span');
    text.innerText = title;

    label.appendChild(checkbox);
    label.appendChild(div);
    label.appendChild(text);

    container.appendChild(label);
}
865979
function () {
            var possibleVals = result(this, 'possibleVals');
            var key;
            var i = 0;
            var possibleVal;
            var $checkbox;
            var isSelected;
            var $inputWrapper = this.getInputWrapper().empty();

            for (key in possibleVals) {
                if (possibleVals.hasOwnProperty(key)) {
                    possibleVal = this._parsePossibleVal(possibleVals, key);
                    isSelected = this.isSelected(possibleVal.value);
                    $checkbox = this._renderInput(possibleVal, isSelected, i);
                    $inputWrapper.append($checkbox);
                    i++;
                }
            }
            return this;
        }
909140
public function append($obj, $check = true)
    {
        if ( $check && $this->findIndexById( $obj->id ) >= 0) return $this;
        $this->elements[] = $obj;
        return $this;
    }
1036494
function getInputValue() {
      var input = _this.getInput();

      if (!input) {
        return null;
      }

      switch (innerParams.input) {
        case 'checkbox':
          return input.checked ? 1 : 0;

        case 'radio':
          return input.checked ? input.value : null;

        case 'file':
          return input.files.length ? input.files[0] : null;

        default:
          return innerParams.inputAutoTrim ? input.value.trim() : input.value;
      }
    }
908285
function () {
            var allCheckboxes = $("li input[type='checkbox']:enabled", this.$ul),
                visibleCheckboxes = allCheckboxes.filter(":visible"),
                allCheckboxesCount = allCheckboxes.length,
                visibleCheckboxesCount = visibleCheckboxes.length;

            visibleCheckboxes.prop('checked', true);
            $("li:not(.divider):not(.disabled)", this.$ul).filter(":visible").addClass(this.options.selectedClass);

            if (allCheckboxesCount === visibleCheckboxesCount) {
                $("option:enabled", this.$select).prop('selected', true);
            }
            else {
                var values = visibleCheckboxes.map(function() { return $(this).val() }).get();
                $("option:enabled", this.$select).filter(function(index){ return $.inArray($(this).val(), values) !== -1; }).prop('selected', true);
            }
        }
116650
def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
      bootstrap = form_bootstrap.scoped(options.delete(:bootstrap))
      return super if bootstrap.disabled

      help_text = draw_help(bootstrap.help)
      errors    = draw_errors(method)

      add_css_class!(options, "form-check-input")
      add_css_class!(options, "is-invalid") if errors.present?

      label_text = nil
      if (custom_text = bootstrap.label[:text]).present?
        label_text = custom_text
      end

      fieldset_css_class = "form-group"
      fieldset_css_class += " row" if bootstrap.horizontal?
      fieldset_css_class += " #{bootstrap.inline_margin_class}" if bootstrap.inline?

      content_tag(:fieldset, class: fieldset_css_class) do
        draw_control_column(bootstrap, offset: true) do
          if bootstrap.custom_control
            content_tag(:div, class: "custom-control custom-checkbox") do
              add_css_class!(options, "custom-control-input")
              remove_css_class!(options, "form-check-input")
              concat super(method, options, checked_value, unchecked_value)
              concat label(method, label_text, class: "custom-control-label")
              concat errors     if errors.present?
              concat help_text  if help_text.present?
            end
          else
            content_tag(:div, class: "form-check") do
              concat super(method, options, checked_value, unchecked_value)
              concat label(method, label_text, class: "form-check-label")
              concat errors     if errors.present?
              concat help_text  if help_text.present?
            end
          end
        end
      end
    end
863934
function getValType(el) {
        var ret = el.tagName.toLowerCase()
        return ret === "input" && /checkbox|radio/.test(el.type) ? "checked" : ret
    }
819387
function (justVisible, triggerOnSelectAll) {
            var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
            var allCheckboxes = $("li input[type='checkbox']:enabled", this.$ul);
            var visibleCheckboxes = allCheckboxes.filter(":visible");
            var allCheckboxesCount = allCheckboxes.length;
            var visibleCheckboxesCount = visibleCheckboxes.length;

            if(justVisible) {
                visibleCheckboxes.prop('checked', true);
                $("li:not(.divider):not(.disabled)", this.$ul).filter(":visible").addClass(this.options.selectedClass);
            }
            else {
                allCheckboxes.prop('checked', true);
                $("li:not(.divider):not(.disabled)", this.$ul).addClass(this.options.selectedClass);
            }

            if (allCheckboxesCount === visibleCheckboxesCount || justVisible === false) {
                $("option:enabled", this.$select).prop('selected', true);
            }
            else {
                var values = visibleCheckboxes.map(function() {
                    return $(this).val();
                }).get();

                $("option:enabled", this.$select).filter(function(index) {
                    return $.inArray($(this).val(), values) !== -1;
                }).prop('selected', true);
            }

            if (triggerOnSelectAll) {
                this.options.onSelectAll();
            }
        }
582981
public function setChecked(array $checked)
    {
        foreach ($this->checkboxes as $checkbox) {
            /* @var $checkbox Checkbox */
            $checkbox->setChecked(in_array($checkbox->getName(), $checked));
        }

        return $this;
    }