Skip to content

Commit

Permalink
Update FormHelper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
funadmin authored Jul 19, 2022
1 parent c7d653b commit 231cc74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,12 @@ public static function tags($name = '', $options = [], $value = '')
public static function color($name = '', $options = [], $value = '')
{

$id = $options['id'] ?? $name;
$label = $options['label'] ?? $name;
$id = $options['id'] ?? $name;$label = $options['label'] ?? $name;$format = $options['format'] ?? 'hex';
$str = '<div class="layui-form-item">
<label class="layui-form-label ' . self::labelRequire($options) . '">' . lang($label) . '</label>
<div class="layui-input-block">
<input ' . self::addstyle($options) . ' class="layui-input layui-input-inline' . self::addClass($options) . '" type="text" name="' . $name . '" value="' . $value . '"' . self::filter($options) . self::readonlyOrdisabled($options) . '/>
<div ' . self::addextend($options) . ' id="' . $id . '" lay-filter="colorPicker" data-name="' . $name . '"></div>
<div ' . self::addextend($options) . ' id="' . $id . '" lay-filter="colorPicker" data-name="' . $name . '" data-format = "' . $format . '" ></div>
</div>
</div>';
return $str;
Expand Down

0 comments on commit 231cc74

Please sign in to comment.