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 2, 2023
1 parent 9d5b8bc commit 171c37e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function input(string $name = '', string $type = 'text',array $options =
$disorread = $this->readonlyOrdisabled($options);
if ($type == 'hidden') {
return <<<EOF
<input type="{$type}" {$this->getDataPropAttr($name,$value,$options)} autocomplete="off" class="layui-input { $this->getClass($options)} {$disorread}/>;
<input type="{$type}" {$this->getDataPropAttr($name,$value,$options)} autocomplete="off" class="layui-input { $this->getClass($options)} {$disorread}/>
EOF;
}
$str = <<<EOF
Expand Down Expand Up @@ -1055,7 +1055,7 @@ public function upload($name = 'avatar', $options = [], $value = '')
break;
case 'images':
$li .= <<<EOF
<li><img lay-event="photos" class="layui-upload-img fl" width="150" src="{$v}"></img> <i class="layui-icon layui-icon-close" lay-event="filedelete" data-fileurl="{$v}"></i></li>;
<li><img lay-event="photos" class="layui-upload-img fl" width="150" src="{$v}"></img> <i class="layui-icon layui-icon-close" lay-event="filedelete" data-fileurl="{$v}"></i></li>
EOF;
break;
case 'image':
Expand All @@ -1070,7 +1070,7 @@ public function upload($name = 'avatar', $options = [], $value = '')
break;
case 'office':
$li .= <<<EOF
<li><img lay-event="" class="layui-upload-img fl" width="150" src="/static/backend/images/filetype/office.jpg"></img> <i class="layui-icon layui-icon-close" lay-event="filedelete" data-fileurl="{$v}"></i></li>;
<li><img lay-event="" class="layui-upload-img fl" width="150" src="/static/backend/images/filetype/office.jpg"></img> <i class="layui-icon layui-icon-close" lay-event="filedelete" data-fileurl="{$v}"></i></li>
EOF;
break;
default:
Expand Down Expand Up @@ -1103,7 +1103,7 @@ public function upload($name = 'avatar', $options = [], $value = '')
$options['select'] = $options['select'] ?? 'upload-select'; //可选upload-choose
$css .= 'width:53%!important;';
$select_container = <<<EOF
<button id="select-{$id}" type="button" class="layui-btn layui-btn-danger {$options['select']}" lay-filter="{$options['select']}"><i class="layui-icon layui-icon-radio"></i>{$this->__('Choose')}</button>;
<button id="select-{$id}" type="button" class="layui-btn layui-btn-danger {$options['select']}" lay-filter="{$options['select']}"><i class="layui-icon layui-icon-radio"></i>{$this->__('Choose')}</button>
EOF;
}
$label = $this->label($name,$options) ;
Expand Down Expand Up @@ -1244,7 +1244,6 @@ protected function tips($options = [])
$tips = <<<EOF
<div class="layui-form-mid layui-word-aux"> {$this->__($options['tips'])} </div>
EOF;
;
}
return $tips;
}
Expand Down

0 comments on commit 171c37e

Please sign in to comment.