mirror of
https://github.com/Karaka-Management/oms-EventManagement.git
synced 2026-01-11 16:48:42 +00:00
autofixes
This commit is contained in:
parent
e2c7d8044c
commit
268320f6fd
|
|
@ -52,6 +52,7 @@ class Event
|
|||
* @since 1.0.0
|
||||
*/
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* Description.
|
||||
*
|
||||
|
|
@ -125,7 +126,7 @@ class Event
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get media files.
|
||||
*
|
||||
* @return array
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class ProgressType extends Enum
|
||||
{
|
||||
public const MANUAL = 0;
|
||||
|
||||
public const LINEAR = 1;
|
||||
|
||||
public const EXPONENTIAL = 2;
|
||||
|
||||
public const LOG = 3;
|
||||
|
||||
public const TASKS = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,28 +18,28 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Event') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Event'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td colspan="3"><label for="iName"><?= $this->getHtml('Name') ?></label>
|
||||
<tr><td colspan="3"><label for="iName"><?= $this->getHtml('Name'); ?></label>
|
||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder="" required><td>
|
||||
<tr><td colspan="3"><label for="iDescription"><?= $this->getHtml('Description') ?></label>
|
||||
<tr><td colspan="3"><label for="iDescription"><?= $this->getHtml('Description'); ?></label>
|
||||
<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="3"><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<tr><td colspan="2"><select id="iStatus" name="status">
|
||||
<option value="">
|
||||
</select><td>
|
||||
<tr><td colspan="3"><label for="iFiles"><?= $this->getHtml('Files') ?></label>
|
||||
<tr><td colspan="3"><label for="iFiles"><?= $this->getHtml('Files'); ?></label>
|
||||
<tr><td colspan="2"><input type="file" id="iFiles" name="file" multiple><td>
|
||||
<tr><td><label for="iStart"><?= $this->getHtml('Start'); ?><label><td><label for="iEnd"><?= $this->getHtml('End'); ?><label><td>
|
||||
<tr><td><input type="datetime-local" id="iStart" name="start" required><td><input type="datetime-local" id="iEnd" name="end" required><td>
|
||||
<tr><td><label for="iResponsibility"><?= $this->getHtml('Responsibility') ?></label><td><label for="iUser"><?= $this->getHtml('UserGroup') ?></label><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="">
|
||||
</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>
|
||||
<tr><td colspan="3"><label for="iBudget"><?= $this->getHtml('Budget'); ?></label>
|
||||
<tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder=""><td>
|
||||
<tr><td colspan="3"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ echo $this->getData('nav')->render(); ?>
|
|||
<table class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="wf-100"><?= $this->getHtml('Title') ?>
|
||||
<td><?= $this->getHtml('Start') ?>
|
||||
<td><?= $this->getHtml('End') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?>
|
||||
<td><?= $this->getHtml('Start'); ?>
|
||||
<td><?= $this->getHtml('End'); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($events as $key => $value) : ++$count;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}eventmanagement/profile?{?}&id=' . $value->getId());?>
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}eventmanagement/profile?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Start') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('End') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getEnd()->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Start'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('End'); ?>"><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'); ?>
|
||||
|
|
|
|||
|
|
@ -26,24 +26,24 @@ echo $this->getData('nav')->render(); ?>
|
|||
<form id="fEvent" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/api}eventmanagement?{?}&csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
<tr><td colspan="2"><label for="iName"><?= $this->getHtml('Name') ?></label>
|
||||
<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="<?= $this->printHtml($event->getName()); ?>" required>
|
||||
<tr><td><label for="iStart"><?= $this->getHtml('Start') ?></label>
|
||||
<td><label for="iEnd"><?= $this->getHtml('End') ?></label>
|
||||
<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="<?= $this->printHtml($event->getStart()->format('Y-m-d\TH:i:s')); ?>">
|
||||
<td><input type="datetime-local" id="iEnd" name="end" value="<?= $this->printHtml($event->getEnd()->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td colspan="2"><label for="iDescription"><?= $this->getHtml('Description') ?></label>
|
||||
<tr><td colspan="2"><label for="iDescription"><?= $this->getHtml('Description'); ?></label>
|
||||
<tr><td colspan="2"><textarea id="iDescription" name="desc"><?= $this->printHtml($event->getDescription()); ?></textarea>
|
||||
<tr><td colspan="2"><label for="iProgressType"><?= $this->getHtml('Progress') ?></label>
|
||||
<tr><td colspan="2"><label for="iProgressType"><?= $this->getHtml('Progress'); ?></label>
|
||||
<tr><td><select id="iProgressType" name="progressType">
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::MANUAL; ?>"><?= $this->getHtml('Manual') ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::LINEAR; ?>"><?= $this->getHtml('Linear') ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::EXPONENTIAL; ?>"><?= $this->getHtml('Exponential') ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::LOG; ?>"><?= $this->getHtml('Log') ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::TASKS; ?>"><?= $this->getHtml('Tasks') ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::MANUAL; ?>"><?= $this->getHtml('Manual'); ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::LINEAR; ?>"><?= $this->getHtml('Linear'); ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::EXPONENTIAL; ?>"><?= $this->getHtml('Exponential'); ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::LOG; ?>"><?= $this->getHtml('Log'); ?>
|
||||
<option value="<?= \Modules\EventManagement\Models\ProgressType::TASKS; ?>"><?= $this->getHtml('Tasks'); ?>
|
||||
</select>
|
||||
<td><input type="text" id="iProgress" name="progress" value="<?= $event->getProgress(); ?>"<?= $event->getProgressType() !== \Modules\EventManagement\Models\ProgressType::MANUAL ? ' disabled' : ''; ?>>
|
||||
<tr><td><label for="iBudget"><?= $this->getHtml('Budget') ?></label><td><label for="iActual"><?= $this->getHtml('Actual') ?></label>
|
||||
<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'); ?>">
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ namespace Modules\EventManagement\tests\Admin;
|
|||
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected const MODULE_NAME = 'EventManagement';
|
||||
|
||||
protected const URI_LOAD = '';
|
||||
|
||||
use \Modules\tests\ModuleTestTrait;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user