diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index 5a87d357..b9a653a3 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -78,9 +78,22 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("Edit")." (".$contentType->plural </div> <!-- Editor --> - <?php if ($contentType->canShow('content')): ?> + <div class="<?php echo $contentType->mustHide("content")?"d-none":"" ?>"> <textarea id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(true) ?></textarea> - <?php endif; ?> + </div> + <?php if ($contentType->mustHide("content")) { + // Description + echo ContentPage::formTextareaBlock($contentType, array( + 'name' => 'description', + 'label' => $L->g('Description'), + 'selected' => '', + 'class' => '', + 'value' => $page->description(), + 'rows' => 5, + 'placeholder' => $L->get('this-field-can-help-describe-the-content') + )); + } ?> + <!-- Custom fields: BOTTOM --> <?php $customFields = $site->customFields(); @@ -152,16 +165,18 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("Edit")." (".$contentType->plural 'value' => $page->tags() )); - // Description - echo ContentPage::formTextareaBlock($contentType,array( - 'name' => 'description', - 'label' => $L->g('Description'), - 'selected' => '', - 'class' => '', - 'value' => $page->description(), - 'rows' => 5, - 'placeholder' => $L->get('this-field-can-help-describe-the-content') - )); + if ($contentType->canShow("content")) { + // Description + echo ContentPage::formTextareaBlock($contentType,array( + 'name' => 'description', + 'label' => $L->g('Description'), + 'selected' => '', + 'class' => '', + 'value' => $page->description(), + 'rows' => 5, + 'placeholder' => $L->get('this-field-can-help-describe-the-content') + )); + } // Sticky echo ContentPage::formCheckbox($contentType,array( diff --git a/bl-kernel/admin/views/new-content.php b/bl-kernel/admin/views/new-content.php index 322c2e11..a3bde48d 100644 --- a/bl-kernel/admin/views/new-content.php +++ b/bl-kernel/admin/views/new-content.php @@ -71,10 +71,21 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("New")." (".$contentType->plural( </div> <!-- Editor --> - <?php if ($contentType->canShow('content')): ?> + <div class="<?php echo $contentType->mustHide("content")?"d-none":"" ?>"> <textarea id="jseditor" class="editable h-100 mb-1"></textarea> - <?php endif; ?> - + </div> + <?php if ($contentType->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') + )); + } ?> <!-- Custom fields: BOTTOM --> <?php $customFields = $site->customFields(); @@ -145,16 +156,18 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("New")." (".$contentType->plural( 'tip' => $L->g('Write the tags separated by comma') )); - // 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') - )); + if ($contentType->canShow("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') + )); + } // Sticky echo ContentPage::formCheckbox($contentType, array( @@ -462,6 +475,7 @@ foreach ($customFields as $field => $options) { // Button Save $("#jsbuttonSave").on("click", function() { + console.log("uwu") let actionParameters = ''; var value = "published"