diff --git a/Models/DepartmentMapper.php b/Models/DepartmentMapper.php
index dad25d3..036b02a 100644
--- a/Models/DepartmentMapper.php
+++ b/Models/DepartmentMapper.php
@@ -34,7 +34,7 @@ final class DepartmentMapper extends DataMapperAbstract
*/
protected static array $columns = [
'organization_department_id' => ['name' => 'organization_department_id', 'type' => 'int', 'internal' => 'id'],
- 'organization_department_name' => ['name' => 'organization_department_name', 'type' => 'string', 'internal' => 'name'],
+ 'organization_department_name' => ['name' => 'organization_department_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'organization_department_description' => ['name' => 'organization_department_description', 'type' => 'string', 'internal' => 'description'],
'organization_department_descriptionraw' => ['name' => 'organization_department_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'organization_department_parent' => ['name' => 'organization_department_parent', 'type' => 'int', 'internal' => 'parent'],
diff --git a/Models/PositionMapper.php b/Models/PositionMapper.php
index 21d9b0d..a58872a 100644
--- a/Models/PositionMapper.php
+++ b/Models/PositionMapper.php
@@ -34,7 +34,7 @@ final class PositionMapper extends DataMapperAbstract
*/
protected static array $columns = [
'organization_position_id' => ['name' => 'organization_position_id', 'type' => 'int', 'internal' => 'id'],
- 'organization_position_name' => ['name' => 'organization_position_name', 'type' => 'string', 'internal' => 'name'],
+ 'organization_position_name' => ['name' => 'organization_position_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'organization_position_description' => ['name' => 'organization_position_description', 'type' => 'string', 'internal' => 'description'],
'organization_position_descriptionraw' => ['name' => 'organization_position_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'organization_position_parent' => ['name' => 'organization_position_parent', 'type' => 'int', 'internal' => 'parent'],
diff --git a/Models/UnitMapper.php b/Models/UnitMapper.php
index 1b402d9..611f8d2 100644
--- a/Models/UnitMapper.php
+++ b/Models/UnitMapper.php
@@ -34,7 +34,7 @@ final class UnitMapper extends DataMapperAbstract
*/
protected static array $columns = [
'organization_unit_id' => ['name' => 'organization_unit_id', 'type' => 'int', 'internal' => 'id'],
- 'organization_unit_name' => ['name' => 'organization_unit_name', 'type' => 'string', 'internal' => 'name'],
+ 'organization_unit_name' => ['name' => 'organization_unit_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'organization_unit_description' => ['name' => 'organization_unit_description', 'type' => 'string', 'internal' => 'description'],
'organization_unit_descriptionraw' => ['name' => 'organization_unit_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'organization_unit_parent' => ['name' => 'organization_unit_parent', 'type' => 'int', 'internal' => 'parent'],
diff --git a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php
index c85701f..6085114 100644
--- a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php
+++ b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php
@@ -38,6 +38,14 @@ class DepartmentTagSelectorView extends View
*/
private string $id = '';
+ /**
+ * Dom name
+ *
+ * @var string
+ * @since 1.0.0
+ */
+ private string $name = '';
+
/**
* Is required
*
@@ -70,6 +78,18 @@ class DepartmentTagSelectorView extends View
return $this->id;
}
+ /**
+ * Get name
+ *
+ * @return string
+ *
+ * @since 1.0.0
+ */
+ public function getName() : string
+ {
+ return $this->name;
+ }
+
/**
* Is required?
*
@@ -88,7 +108,8 @@ class DepartmentTagSelectorView extends View
public function render(...$data) : string
{
$this->id = $data[0];
- $this->isRequired = $data[1] ?? false;
+ $this->name = $data[1];
+ $this->isRequired = $data[2] ?? false;
$this->getData('department-selector-popup')->setId($this->id);
return parent::render();
diff --git a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php
index b796cd4..9592e7b 100644
--- a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php
+++ b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php
@@ -4,46 +4,46 @@
", "method": "GET", "request_type": "json"},
- {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
- {"key": 4, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}organization/department?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
- {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
+ {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "= $this->printHtml($this->getId()); ?>"},
+ {"key": 2, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
+ {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
+ {"key": 4, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
+ {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
]
}
- ]'>
-
-
- isRequired() ? ' required' : ''; ?>>
+ ]' formaction="">
+
- = $this->getHtml('Add', '0', '0'); ?>
+ = $this->getHtml('Select', '0', '0'); ?>
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php
index 9ab6a42..ebc208b 100644
--- a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php
+++ b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php
@@ -38,6 +38,14 @@ class PositionTagSelectorView extends View
*/
private string $id = '';
+ /**
+ * Dom name
+ *
+ * @var string
+ * @since 1.0.0
+ */
+ private string $name = '';
+
/**
* Is required
*
@@ -70,6 +78,18 @@ class PositionTagSelectorView extends View
return $this->id;
}
+ /**
+ * Get name
+ *
+ * @return string
+ *
+ * @since 1.0.0
+ */
+ public function getName() : string
+ {
+ return $this->name;
+ }
+
/**
* Is required?
*
@@ -88,7 +108,8 @@ class PositionTagSelectorView extends View
public function render(...$data) : string
{
$this->id = $data[0];
- $this->isRequired = $data[1] ?? false;
+ $this->name = $data[1];
+ $this->isRequired = $data[2] ?? false;
$this->getData('position-selector-popup')->setId($this->id);
return parent::render();
diff --git a/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php b/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php
index 30c4df6..b55dc2e 100644
--- a/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php
+++ b/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php
@@ -4,46 +4,46 @@
", "method": "GET", "request_type": "json"},
- {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
- {"key": 4, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}organization/position?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
- {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
+ {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "= $this->printHtml($this->getId()); ?>"},
+ {"key": 2, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
+ {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
+ {"key": 4, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
+ {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
]
}
]' formaction="">
-
-
- isRequired() ? ' required' : ''; ?>>
+
- = $this->getHtml('Add', '0', '0'); ?>
+ = $this->getHtml('Select', '0', '0'); ?>
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php
index 48dbf04..174f22a 100644
--- a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php
+++ b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php
@@ -38,6 +38,14 @@ class UnitTagSelectorView extends View
*/
private string $id = '';
+ /**
+ * Dom name
+ *
+ * @var string
+ * @since 1.0.0
+ */
+ private string $name = '';
+
/**
* Is required
*
@@ -82,13 +90,26 @@ class UnitTagSelectorView extends View
return $this->isRequired;
}
+ /**
+ * Get name
+ *
+ * @return string
+ *
+ * @since 1.0.0
+ */
+ public function getName() : string
+ {
+ return $this->name;
+ }
+
/**
* {@inheritdoc}
*/
public function render(...$data) : string
{
$this->id = $data[0];
- $this->isRequired = $data[1] ?? false;
+ $this->name = $data[1];
+ $this->isRequired = $data[2] ?? false;
$this->getData('unit-selector-popup')->setId($this->id);
return parent::render();
diff --git a/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php b/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php
index 707aae4..73b43c1 100644
--- a/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php
+++ b/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php
@@ -4,46 +4,46 @@
", "method": "GET", "request_type": "json"},
+ {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "= $this->printHtml($this->getId()); ?>"},
+ {"key": 2, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
- {"key": 4, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
+ {"key": 4, "type": "message.request", "uri": "= \phpOMS\Uri\UriFactory::build('{/prefix}admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
]
}
]' formaction="">
-
-
- isRequired() ? ' required' : ''; ?>>
+
- = $this->getHtml('Add', '0', '0'); ?>
+ = $this->getHtml('Select', '0', '0'); ?>
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Theme/Backend/department-create.tpl.php b/Theme/Backend/department-create.tpl.php
index f085fc2..fff705a 100644
--- a/Theme/Backend/department-create.tpl.php
+++ b/Theme/Backend/department-create.tpl.php
@@ -29,9 +29,9 @@ echo $this->getData('nav')->render(); ?>
= $this->getHtml('Name') ?>
= $this->getHtml('Parent') ?>
- = $this->getData('department-selector')->render('iParent', false); ?>
+ = $this->getData('department-selector')->render('iParent', 'parent', false); ?>
= $this->getHtml('Unit') ?>
- = $this->getData('unit-selector')->render('iUnit', false); ?>
+ = $this->getData('unit-selector')->render('iUnit', 'unit', false); ?>
= $this->getHtml('Description') ?>
= $this->getData('editor')->render('department-editor'); ?>
= $this->getData('editor')->getData('text')->render('department-editor', 'description', 'fDepartmentCreate'); ?>
diff --git a/Theme/Backend/department-list.tpl.php b/Theme/Backend/department-list.tpl.php
index 21c0e52..79e26d4 100644
--- a/Theme/Backend/department-list.tpl.php
+++ b/Theme/Backend/department-list.tpl.php
@@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
$value) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/department/profile?{?}&id=' . $value->getId()); ?>
-
+
= $this->printHtml($value->getId()); ?>
= $this->printHtml($value->getName()); ?>
= $this->printHtml($value->getParent()->getName()); ?>
diff --git a/Theme/Backend/department-profile.tpl.php b/Theme/Backend/department-profile.tpl.php
index 650a97f..1f5c67b 100644
--- a/Theme/Backend/department-profile.tpl.php
+++ b/Theme/Backend/department-profile.tpl.php
@@ -32,9 +32,9 @@ echo $this->getData('nav')->render(); ?>
= $this->getHtml('Name') ?>
= $this->getHtml('Parent') ?>
- = $this->getData('department-selector')->render('iParent', false); ?>
+ = $this->getData('department-selector')->render('iParent', 'parent', false); ?>
= $this->getHtml('Unit') ?>
- = $this->getData('unit-selector')->render('iUnit', false); ?>
+ = $this->getData('unit-selector')->render('iUnit', 'unit', false); ?>
= $this->getHtml('Status') ?>
= $this->getHtml('Active') ?>
diff --git a/Theme/Backend/position-create.tpl.php b/Theme/Backend/position-create.tpl.php
index 23bc7a5..a725fc7 100644
--- a/Theme/Backend/position-create.tpl.php
+++ b/Theme/Backend/position-create.tpl.php
@@ -29,9 +29,9 @@ echo $this->getData('nav')->render(); ?>
= $this->getHtml('Name') ?>
= $this->getHtml('Parent') ?>
- = $this->getData('position-selector')->render('iParent', false); ?>
+ = $this->getData('position-selector')->render('iParent', 'parent', false); ?>
= $this->getHtml('Department') ?>
- = $this->getData('department-selector')->render('iDepartment', false); ?>
+ = $this->getData('department-selector')->render('iDepartment', 'department', false); ?>
= $this->getHtml('Status') ?>
= $this->getHtml('Active') ?>
diff --git a/Theme/Backend/position-list.tpl.php b/Theme/Backend/position-list.tpl.php
index 50636be..32f2171 100644
--- a/Theme/Backend/position-list.tpl.php
+++ b/Theme/Backend/position-list.tpl.php
@@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
$value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/position/profile?{?}&id=' . $value->getId()); ?>
-
+
= $this->printHtml($value->getId()); ?>
= $this->printHtml($value->getName()); ?>
= $this->printHtml($value->getParent()->getName()); ?>
diff --git a/Theme/Backend/position-profile.tpl.php b/Theme/Backend/position-profile.tpl.php
index 099c09f..886b003 100644
--- a/Theme/Backend/position-profile.tpl.php
+++ b/Theme/Backend/position-profile.tpl.php
@@ -32,9 +32,9 @@ echo $this->getData('nav')->render(); ?>
= $this->getHtml('Name') ?>
= $this->getHtml('Parent') ?>
- = $this->getData('position-selector')->render('iParent', false); ?>
+ = $this->getData('position-selector')->render('iParent', 'parent', false); ?>
= $this->getHtml('Department') ?>
- = $this->getData('department-selector')->render('iDepartment', false); ?>
+ = $this->getData('department-selector')->render('iDepartment', 'department', false); ?>
= $this->getHtml('Status') ?>
= $this->getHtml('Active') ?>
diff --git a/Theme/Backend/unit-create.tpl.php b/Theme/Backend/unit-create.tpl.php
index 7a4a4a3..bda1490 100644
--- a/Theme/Backend/unit-create.tpl.php
+++ b/Theme/Backend/unit-create.tpl.php
@@ -32,7 +32,7 @@ echo $this->getData('nav')->render(); ?>
= $this->getData('media-preview-upload')->render('fUnitCreate', 'logo', '/Modules/Organization'); ?>
= $this->getHtml('Parent') ?>
- = $this->getData('unit-selector')->render('iParent', false); ?>
+ = $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
= $this->getHtml('Status') ?>
= $this->getHtml('Active') ?>
diff --git a/Theme/Backend/unit-list.tpl.php b/Theme/Backend/unit-list.tpl.php
index 7b73497..c326dfe 100644
--- a/Theme/Backend/unit-list.tpl.php
+++ b/Theme/Backend/unit-list.tpl.php
@@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
$value) :
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/unit/profile?{?}&id=' . $value->getId()); ?>
-
+
= $this->printHtml($value->getId()); ?>
= $this->printHtml($value->getName()); ?>
= $this->printHtml($value->getParent()->getName()); ?>
diff --git a/Theme/Backend/unit-profile.tpl.php b/Theme/Backend/unit-profile.tpl.php
index 2897eba..04610d6 100644
--- a/Theme/Backend/unit-profile.tpl.php
+++ b/Theme/Backend/unit-profile.tpl.php
@@ -32,7 +32,7 @@ echo $this->getData('nav')->render(); ?>
= $this->getHtml('Name') ?>
= $this->getHtml('Parent') ?>
- = $this->getData('unit-selector')->render('iParent', false); ?>
+ = $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
= $this->getHtml('Status') ?>
getStatus() ? ' selected' : ''; ?>>= $this->getHtml('Active') ?>