'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 = article, draft, sticky, static echo Bootstrap::formInputHidden(array( 'name' => 'state', 'value' => 'published' )); echo Bootstrap::formInputHidden(array( 'name' => 'type', 'value' => $contentTypeKey )); // Cover image echo Bootstrap::formInputHidden(array( 'name' => 'coverImage', 'value' => '' )); // Content echo Bootstrap::formInputHidden(array( 'name' => 'content', 'value' => '' )); echo Bootstrap::pageTitle(array('title'=>$L->g("New")." (".$contentType->plural().")", 'icon'=>$contentType->icon())); ?>
">
mustHide("content")) { // Description echo ContentPage::formTextareaBlock($contentType, array( 'name' => 'description', 'label' => $L->g('Description'), 'selected' => '', 'class' => '', 'value' => '', 'rows' => 5, 'placeholder' => $L->get('this-field-can-help-describe-the-content') )); // Post Kinds echo ContentPage::formSelectBlock($contentType, array( 'name' => 'kind', 'label' => $L->g('Post Kinds'), 'selected' => 'article', 'class' => '', 'emptyOption' => '- ' . $L->g('None') . ' -', 'options' => $kinds->getKeyNameArray(), 'mt' => 'mt-0', 'type'=> 'Post kinds allow themes to use different formating and microformat for this kind of posts' )); // Source Link echo ContentPage::formInputTextBlock($contentType,array( 'name' => 'sourceLink', 'label' => $L->g('Source Link'), 'placeholder' => '', 'tip' => $L->g('The external link you refer to in the post'), 'value' => '' )); } ?> 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-0 pb-1 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-0 pb-1 text-uppercase w-100' )); } } } ?>
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-0 pb-1 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-0 pb-1 text-uppercase w-100' )); } } } ?>