mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-28 06:48:40 +00:00
Simplify htmlescape
This commit is contained in:
parent
037eefc788
commit
c044e6b000
|
|
@ -36,9 +36,9 @@ $tasks = $this->getData('tasks');
|
|||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
|
||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td><a href="<?= $url; ?>"><span class="tag <?= htmlspecialchars($color, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('S' . $task->getStatus()) ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($task->getDue()->format('Y-m-d H:i'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($task->getTitle(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><span class="tag <?= $this->printHtml($color); ?>"><?= $this->getHtml('S' . $task->getStatus()) ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($task->getDue()->format('Y-m-d H:i')); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($task->getTitle()); ?></a>
|
||||
<?php endforeach; if($c == 0) : ?>
|
||||
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><label for="iAccount"><?= $this->getHtml('Account') ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iAccount" name="account" placeholder=" Guest" required></span>
|
||||
<tr><td><label for="iFrom"><?= $this->getHtml('From') ?></label>
|
||||
<tr><td><input type="datetime-local" id="iFrom" name="from" value="<?= htmlspecialchars((new \DateTime('NOW'))->format('Y-m-d\TH:i:s'), ENT_COMPAT, 'utf-8'); ?>">
|
||||
<tr><td><input type="datetime-local" id="iFrom" name="from" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td><label for="iTo"><?= $this->getHtml('To') ?></label>
|
||||
<tr><td><input type="datetime-local" id="iTo" name="to" value="<?= htmlspecialchars((new \DateTime('NOW'))->format('Y-m-d\TH:i:s'), ENT_COMPAT, 'utf-8'); ?>">
|
||||
<tr><td><input type="datetime-local" id="iTo" name="to" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Submit', 0, 0); ?>">
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -31,20 +31,20 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><?= $this->getData('accGrpSelector')->render('iCC'); ?><td><button><?= $this->getHtml('Add', 0, 0); ?></button>
|
||||
<tr><td colspan="2"><label for="iPriority"><?= $this->getHtml('Priority') ?></label>
|
||||
<tr><td><select id="iPriority" name="priority">
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskPriority::VLOW, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('P1') ?>
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskPriority::LOW, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('P2') ?>
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskPriority::MEDIUM, ENT_COMPAT, 'utf-8'); ?>" selected><?= $this->getHtml('P3') ?>
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskPriority::HIGH, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('P4') ?>
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskPriority::VHIGH, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('P5') ?>
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::VLOW); ?>"><?= $this->getHtml('P1') ?>
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::LOW); ?>"><?= $this->getHtml('P2') ?>
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::MEDIUM); ?>" selected><?= $this->getHtml('P3') ?>
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::HIGH); ?>"><?= $this->getHtml('P4') ?>
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::VHIGH); ?>"><?= $this->getHtml('P5') ?>
|
||||
</select><td>
|
||||
<tr><td colspan="2"><label for="iDue"><?= $this->getHtml('Due') ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= htmlspecialchars((new \DateTime('NOW'))->format('Y-m-d\TH:i:s'), ENT_COMPAT, 'utf-8'); ?>"><td>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>"><td>
|
||||
<tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Title') ?></label>
|
||||
<tr><td><input type="text" id="iTitle" name="title" placeholder=" <?= $this->getHtml('Title') ?>" required><td>
|
||||
<tr><td colspan="2"><label for="iMessage"><?= $this->getHtml('Message') ?></label>
|
||||
<tr><td><?= $this->getData('editor')->render('editor-tools'); ?>
|
||||
<tr><td><?= $this->getData('editor')->getData('text')->render('editor-text'); ?>
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>"><input type="hidden" name="type" value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskType::SINGLE, ENT_COMPAT, 'utf-8'); ?>">
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>"><input type="hidden" name="type" value="<?= $this->printHtml(\Modules\Tasks\Models\TaskType::SINGLE); ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ echo $this->getData('nav')->render(); ?>
|
|||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
|
||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td><a href="<?= $url; ?>"><span class="tag <?= htmlspecialchars($color, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('S' . $task->getStatus()) ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($task->getDue()->format('Y-m-d H:i'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($task->getTitle(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($task->getCreatedBy()->getName1(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($task->getCreatedAt()->format('Y-m-d H:i'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><span class="tag <?= $this->printHtml($color); ?>"><?= $this->getHtml('S' . $task->getStatus()) ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($task->getDue()->format('Y-m-d H:i')); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($task->getTitle()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($task->getCreatedBy()->getName1()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($task->getCreatedAt()->format('Y-m-d H:i')); ?></a>
|
||||
<?php endforeach; if($c == 0) : ?>
|
||||
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
|
|
@ -29,19 +29,19 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= htmlspecialchars($task->getTitle(), ENT_COMPAT, 'utf-8'); ?></h1></header>
|
||||
<header><h1><?= $this->printHtml($task->getTitle()); ?></h1></header>
|
||||
<div class="inner">
|
||||
<div class="floatRight">Due <?= htmlspecialchars($task->getDue()->format('Y-m-d H:i'), ENT_COMPAT, 'utf-8'); ?></div>
|
||||
<div>Created <?= htmlspecialchars($task->getCreatedAt()->format('Y-m-d H:i'), ENT_COMPAT, 'utf-8'); ?></div>
|
||||
<div class="floatRight">Due <?= $this->printHtml($task->getDue()->format('Y-m-d H:i')); ?></div>
|
||||
<div>Created <?= $this->printHtml($task->getCreatedAt()->format('Y-m-d H:i')); ?></div>
|
||||
</div>
|
||||
<div class="inner">
|
||||
<blockquote>
|
||||
<?= htmlspecialchars($task->getDescription(), ENT_COMPAT, 'utf-8'); ?>
|
||||
<?= $this->printHtml($task->getDescription()); ?>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="inner">
|
||||
<div class="pAlignTable">
|
||||
<div class="vCenterTable wf-100">Created <?= htmlspecialchars($task->getCreatedBy()->getName1(), ENT_COMPAT, 'utf-8'); ?></div>
|
||||
<div class="vCenterTable wf-100">Created <?= $this->printHtml($task->getCreatedBy()->getName1()); ?></div>
|
||||
<span class="vCenterTable nobreak tag"><?= $this->getHtml('S' . $task->getStatus()) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -56,27 +56,27 @@ echo $this->getData('nav')->render(); ?>
|
|||
elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ?>
|
||||
<section class="box wf-100">
|
||||
<div class="inner pAlignTable">
|
||||
<div class="vCenterTable wf-100"><?= htmlspecialchars($element->getCreatedBy()->getName1(), ENT_COMPAT, 'utf-8'); ?> - <?= htmlspecialchars($element->getCreatedAt()->format('Y-m-d H:i'), ENT_COMPAT, 'utf-8'); ?></div>
|
||||
<span class="vCenterTable tag <?= htmlspecialchars($color, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('S' . $element->getStatus()) ?></span>
|
||||
<div class="vCenterTable wf-100"><?= $this->printHtml($element->getCreatedBy()->getName1()); ?> - <?= $this->printHtml($element->getCreatedAt()->format('Y-m-d H:i')); ?></div>
|
||||
<span class="vCenterTable tag <?= $this->printHtml($color); ?>"><?= $this->getHtml('S' . $element->getStatus()) ?></span>
|
||||
</div>
|
||||
|
||||
<?php if ($element->getDescription() !== '') : ?>
|
||||
<div class="inner">
|
||||
<blockquote>
|
||||
<?= htmlspecialchars($element->getDescription(), ENT_COMPAT, 'utf-8'); ?>
|
||||
<?= $this->printHtml($element->getDescription()); ?>
|
||||
</blockquote>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="inner pAlignTable">
|
||||
<?php if ($element->getForwarded() !== 0) : ?>
|
||||
<div class="vCenterTable wf-100">Forwarded <?= htmlspecialchars($element->getForwarded()->getName1(), ENT_COMPAT, 'utf-8'); ?></div>
|
||||
<div class="vCenterTable wf-100">Forwarded <?= $this->printHtml($element->getForwarded()->getName1()); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($element->getStatus() !== \Modules\Tasks\Models\TaskStatus::CANCELED ||
|
||||
$element->getStatus() !== \Modules\Tasks\Models\TaskStatus::DONE ||
|
||||
$element->getStatus() !== \Modules\Tasks\Models\TaskStatus::SUSPENDED || $c != $cElements
|
||||
) : ?>
|
||||
<div class="vCenterTable nobreak">Due <?= htmlspecialchars($element->getDue()->format('Y-m-d H:i'), ENT_COMPAT, 'utf-8'); ?></div>
|
||||
<div class="vCenterTable nobreak">Due <?= $this->printHtml($element->getDue()->format('Y-m-d H:i')); ?></div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php endforeach; ?>
|
||||
|
|
@ -88,22 +88,22 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><label for="iMessage"><?= $this->getHtml('Message') ?></label>
|
||||
<tr><td><textarea id="iMessage" name="description"></textarea>
|
||||
<tr><td><label for="iDue"><?= $this->getHtml('Due') ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= htmlspecialchars(!empty($elements) ? end($elements)->getDue()->format('Y-m-d\TH:i:s') : $task->getDue()->format('Y-m-d\TH:i:s'), ENT_COMPAT, 'utf-8'); ?>">
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml(!empty($elements) ? end($elements)->getDue()->format('Y-m-d\TH:i:s') : $task->getDue()->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
|
||||
<tr><td><select id="iStatus" name="status">
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskStatus::OPEN, ENT_COMPAT, 'utf-8'); ?>" selected>Open
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskStatus::WORKING, ENT_COMPAT, 'utf-8'); ?>">Working
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskStatus::SUSPENDED, ENT_COMPAT, 'utf-8'); ?>">Suspended
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskStatus::CANCELED, ENT_COMPAT, 'utf-8'); ?>">Canceled
|
||||
<option value="<?= htmlspecialchars(\Modules\Tasks\Models\TaskStatus::DONE, ENT_COMPAT, 'utf-8'); ?>">Done
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskStatus::OPEN); ?>" selected>Open
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskStatus::WORKING); ?>">Working
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskStatus::SUSPENDED); ?>">Suspended
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskStatus::CANCELED); ?>">Canceled
|
||||
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskStatus::DONE); ?>">Done
|
||||
</select>
|
||||
<tr><td><label for="iReceiver"><?= $this->getHtml('To') ?></label>
|
||||
<tr><td><input type="text" id="iReceiver" name="forward" value="<?= htmlspecialchars($this->request->getHeader()->getAccount(), ENT_COMPAT, 'utf-8'); ?>" placeholder=" Guest">
|
||||
<tr><td><input type="text" id="iReceiver" name="forward" value="<?= $this->printHtml($this->request->getHeader()->getAccount()); ?>" placeholder=" Guest">
|
||||
<tr><td colspan="2"><label for="iMedia"><?= $this->getHtml('Media') ?></label>
|
||||
<tr><td><input type="text" id="iMedia" placeholder=" File"><td><button><?= $this->getHtml('Select') ?></button>
|
||||
<tr><td colspan="2"><label for="iUpload"><?= $this->getHtml('Upload') ?></label>
|
||||
<tr><td><input type="file" id="iUpload" form="fTask"><input form="fTask" type="hidden" name="type"><td>
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>"><input type="hidden" name="task" value="<?= htmlspecialchars($this->request->getData('id')); ?>"><input type="hidden" name="type" value="1">
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>"><input type="hidden" name="task" value="<?= $this->printHtml($this->request->getData('id')); ?>"><input type="hidden" name="type" value="1">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user