1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-18 10:51:21 +02:00

Admin Panel: Entries #165

- using new Themes API
This commit is contained in:
Awilum
2019-06-23 13:01:35 +03:00
parent 7e84032590
commit 93b541c4fa

View File

@@ -624,7 +624,19 @@ class EntriesController extends Controller
break;
// Template select field for selecting entry template
case 'template_select':
$form_element = Form::select($form_element_name, $this->themes->getTemplates(), $form_value, $property['attributes']);
$templates_list = [];
$_templates_list = $this->themes->getTemplates($this->registry->get('settings.theme'));
if (count($_templates_list) > 0) {
foreach ($_templates_list as $template) {
if ($template['type'] == 'file' && $template['extension'] == 'html') {
$templates_list[$template['basename']] = $template['basename'];
}
}
}
$form_element = Form::select($form_element_name, $templates_list, $form_value, $property['attributes']);
break;
// Visibility select field for selecting entry visibility state
case 'visibility_select':