diff --git a/application/config.php b/application/config.php index 47b3aac0..eae9a582 100755 --- a/application/config.php +++ b/application/config.php @@ -272,7 +272,7 @@ return [ //自动检测更新 'checkupdate' => false, //版本号 - 'version' => '1.0.0.20180911_beta', + 'version' => '1.0.0.20181031_beta', //API接口地址 'api_url' => 'https://api.fastadmin.net', ], diff --git a/extend/fast/Form.php b/extend/fast/Form.php index f7fe1fbc..f9f4e748 100644 --- a/extend/fast/Form.php +++ b/extend/fast/Form.php @@ -213,7 +213,7 @@ class FormBuilder if (!in_array($type, $this->skipValueTypes)) { $value = $this->getValueAttribute($name, $value); - $options['class'] = isset($options['class']) ? $options['class'] . ' form-control' : 'form-control'; + $options['class'] = isset($options['class']) ? $options['class'] . (stripos($options['class'], 'form-control') !== false ? '' : ' form-control') : 'form-control'; } $merge = compact('type', 'value', 'id'); @@ -317,7 +317,7 @@ class FormBuilder unset($options['size']); - $options['class'] = isset($options['class']) ? $options['class'] . ' form-control' : 'form-control'; + $options['class'] = isset($options['class']) ? $options['class'] . (stripos($options['class'], 'form-control') !== false ? '' : ' form-control') : 'form-control'; $options = $this->attributes($options); return '' . $this->escape($value) . ''; @@ -389,7 +389,7 @@ class FormBuilder foreach ($list as $value => $display) { $html[] = $this->getSelectOption($display, $value, $selected); } - $options['class'] = isset($options['class']) ? $options['class'] . ' form-control' : 'form-control'; + $options['class'] = isset($options['class']) ? $options['class'] . (stripos($options['class'], 'form-control') !== false ? '' : ' form-control') : 'form-control'; $options = $this->attributes($options); $list = implode('', $html);