mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-02-04 09:48:41 +00:00
new form layout and other tpl fixes
This commit is contained in:
parent
55b0dbc11f
commit
c7543fdb34
|
|
@ -12,8 +12,8 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use \Modules\Tasks\Models\TaskPriority;
|
||||
use \Modules\Tasks\Models\TaskType;
|
||||
use Modules\Tasks\Models\TaskPriority;
|
||||
use Modules\Tasks\Models\TaskType;
|
||||
|
||||
/** @var \phpOMS\Views\View $this */
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
|
@ -24,30 +24,46 @@ echo $this->getData('nav')->render(); ?>
|
|||
<form id="fTask" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}task?{?}&csrf={$CSRF}'); ?>">
|
||||
<div class="portlet-head"><?= $this->getHtml('Task'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tbody>
|
||||
<tr><td><label for="iReceiver"><?= $this->getHtml('To'); ?></label>
|
||||
<tr><td><?= $this->getData('accGrpSelector')->render('iReceiver', 'forward', true); ?>
|
||||
<tr><td><label for="iObserver"><?= $this->getHtml('CC'); ?></label>
|
||||
<tr><td><?= $this->getData('accGrpSelector')->render('iCC', 'cc', false); ?>
|
||||
<tr><td><label for="iPriority"><?= $this->getHtml('Priority'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iPriority" name="priority">
|
||||
<option value="<?= TaskPriority::NONE; ?>" selected><?= $this->getHtml('P0'); ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"><?= $this->getHtml('P1'); ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"><?= $this->getHtml('P2'); ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"><?= $this->getHtml('P3'); ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"><?= $this->getHtml('P4'); ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"><?= $this->getHtml('P5'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDue"><?= $this->getHtml('Due'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td><label for="iTitle"><?= $this->getHtml('Title'); ?></label>
|
||||
<tr><td><input type="text" id="iTitle" name="title" placeholder=" <?= $this->getHtml('Title'); ?>" required>
|
||||
<tr><td><label for="iMessage"><?= $this->getHtml('Message'); ?></label>
|
||||
<tr><td><?= $this->getData('editor')->render('task-editor'); ?>
|
||||
<tr><td><?= $this->getData('editor')->getData('text')->render('task-editor', 'plain', 'fTask'); ?>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<label for="iReceiver"><?= $this->getHtml('To'); ?></label>
|
||||
<?= $this->getData('accGrpSelector')->render('iReceiver', 'forward', true); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iObserver"><?= $this->getHtml('CC'); ?></label>
|
||||
<?= $this->getData('accGrpSelector')->render('iCC', 'cc', false); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iPriority"><?= $this->getHtml('Priority'); ?></label>
|
||||
<select id="iPriority" name="priority">
|
||||
<option value="<?= TaskPriority::NONE; ?>" selected><?= $this->getHtml('P0'); ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"><?= $this->getHtml('P1'); ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"><?= $this->getHtml('P2'); ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"><?= $this->getHtml('P3'); ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"><?= $this->getHtml('P4'); ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"><?= $this->getHtml('P5'); ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iDue"><?= $this->getHtml('Due'); ?></label>
|
||||
<input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iTitle"><?= $this->getHtml('Title'); ?></label>
|
||||
<input type="text" id="iTitle" name="title" placeholder=" <?= $this->getHtml('Title'); ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iMessage"><?= $this->getHtml('Message'); ?></label>
|
||||
<?= $this->getData('editor')->render('task-editor'); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?= $this->getData('editor')->getData('text')->render('task-editor', 'plain', 'fTask'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<input id="iCreateSubmit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
|
||||
|
|
@ -62,19 +78,18 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="portlet-head"><?= $this->getHtml('Media'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
<tr><td><label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||
<tr><td>
|
||||
<div class="ipt-wrap">
|
||||
<div class="ipt-first"><input type="text" id="iMedia" name="mediaFile" placeholder=" File"></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select'); ?></button></div>
|
||||
</div>
|
||||
<tr><td><label for="iUpload"><?= $this->getHtml('Upload'); ?></label>
|
||||
<tr><td>
|
||||
<input type="file" id="iUpload" name="upload" form="fTask" multiple>
|
||||
<input form="fTask" type="hidden" name="type"><td>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||
<div class="ipt-wrap wf-100">
|
||||
<div class="ipt-first"><input type="text" id="iMedia" name="mediaFile" placeholder=" File"></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select'); ?></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="file" id="iUpload" name="upload" form="fTask" multiple>
|
||||
<input form="fTask" type="hidden" name="type"><td>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -315,50 +315,81 @@ echo $this->getData('nav')->render(); ?>
|
|||
>
|
||||
<div class="portlet-head"><?= $this->getHtml('Message'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tr><td><?= $this->getData('editor')->render('task-editor'); ?>
|
||||
<tr><td><?= $this->getData('editor')->getData('text')->render(
|
||||
<div class="form-group">
|
||||
<?= $this->getData('editor')->render('task-editor'); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?= $this->getData('editor')->getData('text')->render(
|
||||
'task-editor',
|
||||
'plain',
|
||||
'taskElementCreate',
|
||||
'', '',
|
||||
'/content', '{/api}task?id={?id}'
|
||||
); ?>
|
||||
<tr><td><label for="iPriority"><?= $this->getHtml('Priority'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iPriority" name="priority">
|
||||
<option value="<?= TaskPriority::NONE; ?>"<?= $task->getPriority() === TaskPriority::NONE ? ' selected' : '';?>><?= $this->getHtml('P0'); ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"<?= $task->getPriority() === TaskPriority::VLOW ? ' selected' : '';?>><?= $this->getHtml('P1'); ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"<?= $task->getPriority() === TaskPriority::LOW ? ' selected' : '';?>><?= $this->getHtml('P2'); ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"<?= $task->getPriority() === TaskPriority::MEDIUM ? ' selected' : '';?>><?= $this->getHtml('P3'); ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"<?= $task->getPriority() === TaskPriority::HIGH ? ' selected' : '';?>><?= $this->getHtml('P4'); ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"<?= $task->getPriority() === TaskPriority::VHIGH ? ' selected' : '';?>><?= $this->getHtml('P5'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDue"><?= $this->getHtml('Due'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml(
|
||||
!empty($elements) ? \end($elements)->due->format('Y-m-d\TH:i:s') : $task->due->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="<?= TaskStatus::OPEN; ?>"<?= $task->getStatus() === TaskStatus::OPEN ? ' selected' : '';?>><?= $this->getHtml('S1'); ?>
|
||||
<option value="<?= TaskStatus::WORKING; ?>"<?= $task->getStatus() === TaskStatus::WORKING ? ' selected' : '';?>><?= $this->getHtml('S2'); ?>
|
||||
<option value="<?= TaskStatus::SUSPENDED; ?>"<?= $task->getStatus() === TaskStatus::SUSPENDED ? ' selected' : '';?>><?= $this->getHtml('S3'); ?>
|
||||
<option value="<?= TaskStatus::CANCELED; ?>"<?= $task->getStatus() === TaskStatus::CANCELED ? ' selected' : '';?>><?= $this->getHtml('S4'); ?>
|
||||
<option value="<?= TaskStatus::DONE; ?>"<?= $task->getStatus() === TaskStatus::DONE ? ' selected' : '';?>><?= $this->getHtml('S5'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iCompletion"><?= $this->getHtml('Completion'); ?></label>
|
||||
<tr><td><input id="iCompletion" name="completion" type="number" min="0" max="100">
|
||||
<tr><td><label for="iReceiver"><?= $this->getHtml('To'); ?></label>
|
||||
<tr><td><?= $this->getData('accGrpSelector')->render('iReceiver', 'to', true); ?>
|
||||
<tr><td><label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||
<tr><td><div class="ipt-wrap">
|
||||
<div class="ipt-first"><input type="text" id="iMedia" placeholder=" File"></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select'); ?></button></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<select id="iStatus" name="status">
|
||||
<option value="<?= TaskStatus::OPEN; ?>"<?= $task->getStatus() === TaskStatus::OPEN ? ' selected' : '';?>><?= $this->getHtml('S1'); ?>
|
||||
<option value="<?= TaskStatus::WORKING; ?>"<?= $task->getStatus() === TaskStatus::WORKING ? ' selected' : '';?>><?= $this->getHtml('S2'); ?>
|
||||
<option value="<?= TaskStatus::SUSPENDED; ?>"<?= $task->getStatus() === TaskStatus::SUSPENDED ? ' selected' : '';?>><?= $this->getHtml('S3'); ?>
|
||||
<option value="<?= TaskStatus::CANCELED; ?>"<?= $task->getStatus() === TaskStatus::CANCELED ? ' selected' : '';?>><?= $this->getHtml('S4'); ?>
|
||||
<option value="<?= TaskStatus::DONE; ?>"<?= $task->getStatus() === TaskStatus::DONE ? ' selected' : '';?>><?= $this->getHtml('S5'); ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iReceiver"><?= $this->getHtml('To'); ?></label>
|
||||
<?= $this->getData('accGrpSelector')->render('iReceiver', 'to', true); ?>
|
||||
</div>
|
||||
|
||||
<div class="more-container">
|
||||
<input id="more-customer-sales" type="checkbox">
|
||||
<label for="more-customer-sales">
|
||||
<span>Advanced</span>
|
||||
<i class="fa fa-chevron-right expand"></i>
|
||||
</label>
|
||||
<div>
|
||||
<div class="form-group">
|
||||
<label for="iPriority"><?= $this->getHtml('Priority'); ?></label>
|
||||
<select id="iPriority" name="priority">
|
||||
<option value="<?= TaskPriority::NONE; ?>"<?= $task->getPriority() === TaskPriority::NONE ? ' selected' : '';?>><?= $this->getHtml('P0'); ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"<?= $task->getPriority() === TaskPriority::VLOW ? ' selected' : '';?>><?= $this->getHtml('P1'); ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"<?= $task->getPriority() === TaskPriority::LOW ? ' selected' : '';?>><?= $this->getHtml('P2'); ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"<?= $task->getPriority() === TaskPriority::MEDIUM ? ' selected' : '';?>><?= $this->getHtml('P3'); ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"<?= $task->getPriority() === TaskPriority::HIGH ? ' selected' : '';?>><?= $this->getHtml('P4'); ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"<?= $task->getPriority() === TaskPriority::VHIGH ? ' selected' : '';?>><?= $this->getHtml('P5'); ?>
|
||||
</select>
|
||||
</div>
|
||||
<tr><td><label for="iUpload"><?= $this->getHtml('Upload'); ?></label>
|
||||
<tr><td>
|
||||
<input type="file" id="iUpload" name="fileUpload" form="fTask">
|
||||
</table>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iDue"><?= $this->getHtml('Due'); ?></label>
|
||||
<input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml(
|
||||
!empty($elements) ? \end($elements)->due->format('Y-m-d\TH:i:s') : $task->due->format('Y-m-d\TH:i:s')
|
||||
); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iCompletion"><?= $this->getHtml('Completion'); ?></label>
|
||||
<input id="iCompletion" name="completion" type="number" min="0" max="100">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||
<div class="ipt-wrap wf-100">
|
||||
<div class="ipt-first"><input type="text" id="iMedia" placeholder=" File"></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select'); ?></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iUpload"><?= $this->getHtml('Upload'); ?></label>
|
||||
<input type="file" id="iUpload" name="fileUpload" form="fTask">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<input class="add" data-form="" type="submit" id="iTaskElementCreateButton" name="taskElementCreateButton" value="<?= $this->getHtml('Create', '0', '0'); ?>">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user