1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-24 05:43:10 +02:00

feat(core): add mediaSelectField - Forms #218 #186

This commit is contained in:
Awilum
2019-08-25 12:48:15 +03:00
parent 04b9b6187e
commit d20f1867c1

View File

@@ -152,7 +152,7 @@ class Forms
break;
// Media select field
case 'media_select':
$form_element = Form::select($form_element_name, $this->getMediaList($request->getQueryParams()['id'], false), $form_value, $property['attributes']);
$form_element = $this->mediaSelectField($form_element_name, $this->getMediaList($request->getQueryParams()['id'], false), $form_value, $property['attributes']);
break;
// Simple text-input, for single-line fields.
default:
@@ -179,6 +179,11 @@ class Forms
return $form;
}
protected function mediaSelectField($name, $options, $value, $attributes)
{
return Form::select($name, $options, $value, $attributes);
}
protected function textField($name, $value, $attributes)
{
return Form::input($name, $value, $attributes);