Simplify htmlescape

This commit is contained in:
Dennis Eichhorn 2017-09-14 20:39:58 +02:00
parent 3e1381e02d
commit 33d0cc03fc
2 changed files with 11 additions and 11 deletions

View File

@ -24,11 +24,11 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="2"><textarea id="iDescription" name="description"></textarea><td>
<tr><td colspan="3"><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td colspan="2"><select id="iStatus" name="status">
<option value="<?= htmlspecialchars(\Modules\ProjectManagement\Models\ProjectStatus::ACTIVE , ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('Active') ?>
<option value="<?= htmlspecialchars(\Modules\ProjectManagement\Models\ProjectStatus::INACTIVE , ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('Inactive') ?>
<option value="<?= htmlspecialchars(\Modules\ProjectManagement\Models\ProjectStatus::FINISHED , ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('Finished') ?>
<option value="<?= htmlspecialchars(\Modules\ProjectManagement\Models\ProjectStatus::CANCELED , ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('Canceled') ?>
<option value="<?= htmlspecialchars(\Modules\ProjectManagement\Models\ProjectStatus::HOLD , ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('Hold') ?>
<option value="<?= $this->printHtml(\Modules\ProjectManagement\Models\ProjectStatus::ACTIVE ); ?>"><?= $this->getHtml('Active') ?>
<option value="<?= $this->printHtml(\Modules\ProjectManagement\Models\ProjectStatus::INACTIVE ); ?>"><?= $this->getHtml('Inactive') ?>
<option value="<?= $this->printHtml(\Modules\ProjectManagement\Models\ProjectStatus::FINISHED ); ?>"><?= $this->getHtml('Finished') ?>
<option value="<?= $this->printHtml(\Modules\ProjectManagement\Models\ProjectStatus::CANCELED ); ?>"><?= $this->getHtml('Canceled') ?>
<option value="<?= $this->printHtml(\Modules\ProjectManagement\Models\ProjectStatus::HOLD ); ?>"><?= $this->getHtml('Hold') ?>
</select><td>
<tr><td colspan="3"><label for="iFiles"><?= $this->getHtml('Files') ?></label>
<tr><td colspan="2"><input type="file" id="iFiles" name="file" multiple><td>
@ -38,8 +38,8 @@ echo $this->getData('nav')->render(); ?>
<tr><td><input type="datetime-local" id="iDue" name="due"><td><input type="datetime-local" id="iDue" name="due"><td>
<tr><td><label for="iResponsibility"><?= $this->getHtml('Responsibility') ?></label><td><label for="iUser"><?= $this->getHtml('UserGroup') ?></label><td>
<tr><td><select id="iStatus" name="status">
<option value="<?= htmlspecialchars(\Modules\ProjectManagement\Models\ProjectResponsibility::MANAGER , ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('Manager') ?>
<option value="<?= htmlspecialchars(\Modules\ProjectManagement\Models\ProjectResponsibility::OTHER , ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('Other') ?>
<option value="<?= $this->printHtml(\Modules\ProjectManagement\Models\ProjectResponsibility::MANAGER ); ?>"><?= $this->getHtml('Manager') ?>
<option value="<?= $this->printHtml(\Modules\ProjectManagement\Models\ProjectResponsibility::OTHER ); ?>"><?= $this->getHtml('Other') ?>
</select>
<td><input type="text" id="iUser" name="user" placeholder=""><td><button><?= $this->getHtml('Add', 0, 0); ?></button>
<tr><td colspan="3"><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>">

View File

@ -42,10 +42,10 @@ echo $this->getData('nav')->render(); ?>
<?php $c = 0; foreach ([] as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/checklist/single?{?}&id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getId(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getName(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getParent(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getUnit(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()); ?></a>
<?php endforeach; ?>
<?php if($c === 0) : ?>
<tr>