/**
  * Generates the html code of a checkbox/radio field
  *
  * @param Field $field
  *
  * @return string
  */
 private static function getRadioCheckHtml($field)
 {
     //Errors
     if ($field->error()) {
         $field->errorLabel->addClass('text-danger');
     }
     $html = $field->input->toHtml();
     $html = $field->label->toHtml($html . ' ') . $field->errorLabel;
     $html = Element::div(true)->class($field->input->attr('type'))->toHtml($html);
     //Help block
     if ($help = $field->get('help')) {
         $html .= Element::span(true)->class('help-block')->toHtml($help);
     }
     return $html;
 }