diff --git a/.gitignore b/.gitignore index 1962050f..e04395f5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ composer.lock *.css.map !.gitkeep .env +/.svn diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 94e3c266..3ba5c204 100644 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -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';