mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-11 16:18:40 +00:00
bug and media fixes
This commit is contained in:
parent
b516c95f79
commit
19225a3b36
|
|
@ -246,7 +246,8 @@ final class ApiController extends Controller
|
|||
$old = clone $unit;
|
||||
|
||||
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
|
||||
[$request->getData('name') ?? ''],
|
||||
$request->getDataList('names') ?? [],
|
||||
$request->getDataList('filenames') ?? [],
|
||||
$uploadedFiles,
|
||||
$request->header->account,
|
||||
__DIR__ . '/../../../Modules/Media/Files',
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
|||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
* @var \phpOMS\Views\View $this
|
||||
* @var \Modules\Organization\Models\Position;
|
||||
*/
|
||||
$position = $this->getData('position');
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><?= $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<tr><td><select name="status" id="iStatus">
|
||||
<option value="<?= Status::ACTIVE; ?>"<?= Status::ACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Active'); ?>
|
||||
<option value="<?= Status::INACTIVE; ?>"<?= Status::INACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Inactive'); ?>
|
||||
<option value="<?= Status::ACTIVE; ?>"<?= $unit->getStatus() === Status::ACTIVE ? ' selected' : ''; ?>><?= $this->getHtml('Active'); ?>
|
||||
<option value="<?= Status::INACTIVE; ?>"<?= $unit->getStatus() === Status::INACTIVE ? ' selected' : ''; ?>><?= $this->getHtml('Inactive'); ?>
|
||||
</select>
|
||||
<tr><td><?= $this->getData('editor')->render('unit-editor'); ?>
|
||||
<tr><td><?= $this->getData('editor')->getData('text')->render(
|
||||
|
|
|
|||
|
|
@ -392,4 +392,4 @@ function phpServe() : void
|
|||
});
|
||||
}
|
||||
|
||||
phpServe();
|
||||
\phpServe();
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
$request = new HttpRequest(new HttpUri(''));
|
||||
|
||||
$request->header->account = 1;
|
||||
$request->setData('name', 'Organization Logo');
|
||||
$request->setData('names', 'Organization Logo');
|
||||
$request->setData('id', 1);
|
||||
|
||||
TestUtils::setMember($request, 'files', [
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user