mirror of https://gitee.com/karson/fastadmin.git
修复一键生成CRUD时admin_ids字段对应控制器错误
parent
8e5b42f88c
commit
0c3e087f09
|
|
@ -13,3 +13,4 @@ composer.lock
|
|||
*.css.map
|
||||
!.gitkeep
|
||||
.env
|
||||
/.svn
|
||||
|
|
|
|||
|
|
@ -580,8 +580,8 @@ class Crud extends Command
|
|||
}
|
||||
$formAddElement = $formEditElement = Form::hidden($fieldName, $no, array_merge(['checked' => ''], $attrArr));
|
||||
$attrArr['id'] = $fieldName . "-switch";
|
||||
$formAddElement .= sprintf(Form::label("{$attrArr['id']}", "%s {:__('Yes')}", ['class'=>'control-label']), Form::checkbox($fieldName, $yes, $defaultValue === $yes, $attrArr));
|
||||
$formEditElement .= sprintf(Form::label("{$attrArr['id']}", "%s {:__('Yes')}", ['class'=>'control-label']), Form::checkbox($fieldName, $yes, 0, $attrArr));
|
||||
$formAddElement .= sprintf(Form::label("{$attrArr['id']}", "%s {:__('Yes')}", ['class' => 'control-label']), Form::checkbox($fieldName, $yes, $defaultValue === $yes, $attrArr));
|
||||
$formEditElement .= sprintf(Form::label("{$attrArr['id']}", "%s {:__('Yes')}", ['class' => 'control-label']), Form::checkbox($fieldName, $yes, 0, $attrArr));
|
||||
$formEditElement = str_replace('type="checkbox"', 'type="checkbox" {in name="' . "\$row.{$field}" . '" value="' . $yes . '"}checked{/in}', $formEditElement);
|
||||
}
|
||||
else if ($inputType == 'citypicker')
|
||||
|
|
@ -611,6 +611,10 @@ class Crud extends Command
|
|||
$search = '"##replacetext##"';
|
||||
$replace = '\'{"custom[type]":"' . $table . '"}\'';
|
||||
}
|
||||
elseif ($selectpageController == 'admin')
|
||||
{
|
||||
$attrArr['data-source'] = 'auth/admin';
|
||||
}
|
||||
if ($this->isMatchSuffix($field, $this->selectpagesSuffix))
|
||||
{
|
||||
$attrArr['data-multiple'] = 'true';
|
||||
|
|
|
|||
Loading…
Reference in New Issue