protected function getHtmlAttributes($column, $value = null)
 {
     $result = parent::getHtmlAttributes($column, $value);
     if ($value) {
         $result .= "checked ";
     }
     return $result;
 }
Beispiel #2
0
 protected function getHtmlAttributes($column, $value = null)
 {
     $result = parent::getHtmlAttributes($column, $value);
     if ($length = $column->getLength()) {
         $result .= "maxlength='{$length}' ";
     }
     return $result;
 }
 protected function getHtmlAttributes($column, $value = null)
 {
     $result = parent::getHtmlAttributes($column, $value);
     if ($column->getUnsigned()) {
         $result .= "min='0' ";
     }
     if ($column->getType()->getName() == "float" || $column->getType()->getName() == "decimal") {
         $zeroDecimal = "";
         if ($precision = $column->getScale()) {
             for ($i = 1; $i < $precision; $i++) {
                 $zeroDecimal .= "0";
             }
         }
         $result .= "step='0." . $zeroDecimal . "1' ";
     }
     return $result;
 }