bug fixes
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled

This commit is contained in:
Dennis Eichhorn 2024-10-11 19:17:41 +00:00
parent 25713f704f
commit ca4e7e16c2

View File

@ -12,6 +12,7 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use Modules\Comments\Models\CommentListStatus;
use Modules\News\Models\NewsStatus; use Modules\News\Models\NewsStatus;
use Modules\News\Models\NewsType; use Modules\News\Models\NewsType;
use Modules\News\Models\NullNewsArticle; use Modules\News\Models\NullNewsArticle;
@ -78,7 +79,7 @@ echo $this->data['nav']->render(); ?>
<div class="form-group"> <div class="form-group">
<label class="checkbox" for="iComment"> <label class="checkbox" for="iComment">
<input id="iComment" type="checkbox" name="allow_comments" value="1"> <input id="iComment" type="checkbox" name="allow_comments" value="1"<?= $news->comments?->status === CommentListStatus::ACTIVE ? ' checked' : ''; ?>>
<span class="checkmark"></span> <span class="checkmark"></span>
<?= $this->getHtml('AllowComments'); ?> <?= $this->getHtml('AllowComments'); ?>
</label> </label>
@ -88,10 +89,8 @@ echo $this->data['nav']->render(); ?>
<table class="layout wf-100"> <table class="layout wf-100">
<tr> <tr>
<td> <td>
<?php if ($isNewArticle) : ?> <?php if (!$isNewArticle) : ?>
<a href="<?= UriFactory::build('{/base}/news/dashboard'); ?>" class="button"><?= $this->getHtml('Delete', '0', '0'); ?></a> <input type="submit" formmethod="DELETE" name="deleteButton" id="iDeleteButton" value="<?= $this->getHtml('Delete', '0', '0'); ?>">
<?php else : ?>
<input type="submit" name="deleteButton" id="iDeleteButton" value="<?= $this->getHtml('Delete', '0', '0'); ?>">
<?php endif; ?> <?php endif; ?>
<td class="rT"> <td class="rT">
<input type="submit" name="saveButton" id="iSaveButton" value="<?= $this->getHtml('Save', '0', '0'); ?>"> <input type="submit" name="saveButton" id="iSaveButton" value="<?= $this->getHtml('Save', '0', '0'); ?>">
@ -126,22 +125,28 @@ echo $this->data['nav']->render(); ?>
</label> </label>
</div> </div>
<!--
@todo Implement Tags for news
<div class="form-group"> <div class="form-group">
<?= $this->getHtml('Tags', 'Tag'); ?> <?= $this->getHtml('Tags', 'Tag'); ?>
<?= $this->getData('tagSelector')->render('iTag', 'tag', 'fEditor', false); ?> <?= $this->getData('tagSelector')->render('iTag', 'tag', 'fEditor', false); ?>
</div> </div>
-->
</div> </div>
</section> </section>
<!--
@todo implement permission/visibilities
<section class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Accounts/Groups'); ?></div> <div class="portlet-head"><?= $this->getHtml('Accounts/Groups'); ?></div>
<div class="portlet-body"> <div class="portlet-body">
<div class="form-group"> <div class="form-group">
<!-- @todo add form this belongs to --> @todo add form this belongs to
<!-- @todo make auto save on change for already created news article --> @todo make auto save on change for already created news article
<!-- @todo add default values (some can be removed/overwritten and some not?) --> @todo add default values (some can be removed/overwritten and some not?)
<?= $this->getData('accGrpSelector')->render('iReceiver', 'receiver', false); ?> <?= ''; //$this->getData('accGrpSelector')->render('iReceiver', 'receiver', false); ?>
</div> </div>
</div> </div>
</section> </section>
-->
</div> </div>
</div> </div>