'jsform', 'class' => 'd-flex flex-column h-100' )); // Token CSRF echo Bootstrap::formInputHidden(array( 'name' => 'tokenCSRF', 'value' => $security->getTokenCSRF() )); // UUID // The UUID is generated in the controller echo Bootstrap::formInputHidden(array( 'name' => 'uuid', 'value' => $uuid )); // Type = published, draft, sticky, static echo Bootstrap::formInputHidden(array( 'name' => 'type', 'value' => 'published' )); // Cover image echo Bootstrap::formInputHidden(array( 'name' => 'coverImage', 'value' => '' )); // Content echo Bootstrap::formInputHidden(array( 'name' => 'content', 'value' => '' )); ?>
p('Publish') ?>
customFields())) : ?>
customFields(); foreach ($customFields as $field => $options) { if (isset($options['position']) && ($options['position'] == 'top')) { if ($options['type'] == "string") { echo Bootstrap::formInputTextBlock(array( 'name' => 'custom[' . $field . ']', 'label' => (isset($options['label']) ? $options['label'] : ''), 'value' => (isset($options['default']) ? $options['default'] : ''), 'tip' => (isset($options['tip']) ? $options['tip'] : ''), 'placeholder' => (isset($options['placeholder']) ? $options['placeholder'] : ''), 'class' => 'mb-2', 'labelClass' => 'mb-2 pb-2 border-bottom text-uppercase w-100' )); } elseif ($options['type'] == "bool") { echo Bootstrap::formCheckbox(array( 'name' => 'custom[' . $field . ']', 'label' => (isset($options['label']) ? $options['label'] : ''), 'placeholder' => (isset($options['placeholder']) ? $options['placeholder'] : ''), 'checked' => (isset($options['checked']) ? true : false), 'labelForCheckbox' => (isset($options['tip']) ? $options['tip'] : ''), 'class' => 'mb-2', 'labelClass' => 'mb-2 pb-2 border-bottom text-uppercase w-100' )); } } } ?>
customFields(); foreach ($customFields as $field => $options) { if (isset($options['position']) && ($options['position'] == 'bottom')) { if ($options['type'] == "string") { echo Bootstrap::formInputTextBlock(array( 'name' => 'custom[' . $field . ']', 'label' => (isset($options['label']) ? $options['label'] : ''), 'value' => (isset($options['default']) ? $options['default'] : ''), 'tip' => (isset($options['tip']) ? $options['tip'] : ''), 'placeholder' => (isset($options['placeholder']) ? $options['placeholder'] : ''), 'class' => 'mt-2', 'labelClass' => 'mb-2 pb-2 border-bottom text-uppercase w-100' )); } elseif ($options['type'] == "bool") { echo Bootstrap::formCheckbox(array( 'name' => 'custom[' . $field . ']', 'label' => (isset($options['label']) ? $options['label'] : ''), 'placeholder' => (isset($options['placeholder']) ? $options['placeholder'] : ''), 'checked' => (isset($options['checked']) ? true : false), 'labelForCheckbox' => (isset($options['tip']) ? $options['tip'] : ''), 'class' => 'mt-2', 'labelClass' => 'mb-2 pb-2 border-bottom text-uppercase w-100' )); } } } ?>