Add date field settings data to store

[MAILPOET-2453]
This commit is contained in:
Rostislav Wolny
2019-12-18 14:09:36 +01:00
committed by Rostislav Wolný
parent 080d5c84ac
commit d3399ca883
3 changed files with 15 additions and 1 deletions

View File

@ -66,10 +66,15 @@ class FormEditor {
$data['form']['styles'] = FormRenderer::getStyles($form);
$custom_fields = $this->custom_fields_repository->findAll();
$data['custom_fields'] = $this->custom_fields_response_builder->buildBatch($custom_fields);
$data['date_types'] = array_map(function ($label, $value) {
return [
'label' => $label,
'value' => $value,
];
}, $data['date_types'], array_keys($data['date_types']));
$this->page_renderer->displayPage('form/editor.html', $data);
} else {
$this->page_renderer->displayPage('form/editor_legacy.html', $data);
}
}
}