mirror of
https://github.com/Karaka-Management/oms-ProjectManagement.git
synced 2026-01-21 03:58:42 +00:00
Simplify htmlescape
This commit is contained in:
parent
904f9f01cf
commit
305dca6534
|
|
@ -27,11 +27,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>
|
||||
|
|
@ -39,8 +39,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><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="iUser" name="user" placeholder=""></span><td><button><?= $this->getHtml('Add', 0, 0); ?></button>
|
||||
<tr><td colspan="3"><label for="iBudget"><?= $this->getHtml('Budget') ?></label>
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php $count = 0; foreach($list as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/projectmanagement/profile?{?}&id=' . $value->getId());?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getName(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getStart()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getEnd()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getEnd()->format('Y-m-d')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
|
||||
|
|
|
|||
|
|
@ -19,19 +19,19 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= htmlspecialchars($project->getName(), ENT_COMPAT, 'utf-8'); ?></h1></header>
|
||||
<header><h1><?= $this->printHtml($project->getName()); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form id="fProject" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/projectmanagement?{?}&csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
<tr><td colspan="2"><label for="iName"><?= $this->getHtml('Name') ?></label>
|
||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder=" Name" value="<?= htmlspecialchars($project->getName(), ENT_COMPAT, 'utf-8'); ?>" required>
|
||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder=" Name" value="<?= $this->printHtml($project->getName()); ?>" required>
|
||||
<tr><td><label for="iStart"><?= $this->getHtml('Start') ?></label>
|
||||
<td><label for="iEnd"><?= $this->getHtml('End') ?></label>
|
||||
<tr><td><input type="datetime-local" id="iStart" name="start" value="<?= htmlspecialchars($project->getStart()->format('Y-m-d\TH:i:s'), ENT_COMPAT, 'utf-8'); ?>">
|
||||
<td><input type="datetime-local" id="iEnd" name="end" value="<?= htmlspecialchars($project->getEnd()->format('Y-m-d\TH:i:s'), ENT_COMPAT, 'utf-8'); ?>">
|
||||
<tr><td><input type="datetime-local" id="iStart" name="start" value="<?= $this->printHtml($project->getStart()->format('Y-m-d\TH:i:s')); ?>">
|
||||
<td><input type="datetime-local" id="iEnd" name="end" value="<?= $this->printHtml($project->getEnd()->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td colspan="2"><label for="iDescription"><?= $this->getHtml('Description') ?></label>
|
||||
<tr><td colspan="2"><textarea id="iDescription" name="desc"><?= htmlspecialchars($project->getDescription(), ENT_COMPAT, 'utf-8'); ?></textarea>
|
||||
<tr><td colspan="2"><textarea id="iDescription" name="desc"><?= $this->printHtml($project->getDescription()); ?></textarea>
|
||||
<tr><td><label for="iBudget"><?= $this->getHtml('Budget') ?></label><td><label for="iActual"><?= $this->getHtml('Actual') ?></label>
|
||||
<tr><td><input type="text" id="iBudget" name="budget" placeholder=""><td><input type="text" id="iActual" name="actual">
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>">
|
||||
|
|
@ -60,9 +60,9 @@ 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>
|
||||
<td><a href="<?= $url; ?>"><span class="tag <?= htmlspecialchars($color, ENT_COMPAT, 'utf-8'); ?>"><?= $this->getHtml('S' . $task->getStatus(), 'Tasks') ?></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(), 'Tasks') ?></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; ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user