Skip to content

Commit

Permalink
fixed form widget image bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lhs168 committed Jan 11, 2018
1 parent 09d97a5 commit ed907b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Fasim/Widget/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,16 @@ public function renderInput() {

class FormImages extends FormGroup {
public $maxCount = 6;
public $allowFiles = 'jpg,jpeg,gif,png';

public function maxCount($maxCount) {
$this->maxCount = $maxCount;
}

public function allowFiles($allowFiles) {
$this->allowFiles = $allowFiles;
}


public function renderInput() {
$fileId = 'i_'.$this->key;
Expand All @@ -543,7 +548,7 @@ public function renderInput() {
pick: '#{$filePickerId}',
accept: {
title: '上传文件',
extensions: '{$this->allowFiles},
extensions: '{$this->allowFiles}',
mimeTypes: 'image/*'
}
});
Expand Down

0 comments on commit ed907b2

Please sign in to comment.