mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-27 07:08:41 +00:00
Test image upload preview
This commit is contained in:
parent
1ab01d6ea2
commit
24333efe70
|
|
@ -40,6 +40,15 @@ return [
|
|||
],
|
||||
],
|
||||
'^.*/organization/unit/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Media\Controller\BackendController::setUpFileUploader',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::UNIT,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\Organization\Controller\BackendController:viewUnitCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
|
|
|
|||
|
|
@ -165,6 +165,9 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/Organization/Theme/Backend/unit-create');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1004703001, $request, $response));
|
||||
|
||||
$uploadView = new \Modules\Media\Theme\Backend\Components\InlinePreview\BaseView($this->app, $request, $response);
|
||||
$view->addData('media-preview-upload', $uploadView);
|
||||
|
||||
$selectorView = new \Modules\Organization\Theme\Backend\Components\UnitTagSelector\UnitTagSelectorView($this->app, $request, $response);
|
||||
$view->addData('unit-selector', $selectorView);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ return ['Organization' => [
|
|||
'Status' => 'Status',
|
||||
'Unit' => 'Unit',
|
||||
'Units' => 'Units',
|
||||
'UnitLogo' => 'Unit Logo',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
|
||||
<tr><td><input type="text" name="name" id="iName" placeholder=" Orange Management" required>
|
||||
<tr><td><label for="iParent"><?= $this->getHtml('UnitLogo') ?></label>
|
||||
<tr><td><img id="preview-logo" class="preview" src="#" accept="image/*" alt="<?= $this->getHtml('UnitLogo') ?>">
|
||||
<tr><td><?= $this->getData('media-preview-upload')->render('fUnitCreate', 'logo', '/Modules/Organization'); ?>
|
||||
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
|
||||
<tr><td><?= $this->getData('unit-selector')->render('iParent', false); ?>
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user