mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-14 03:28:41 +00:00
Fix install
This commit is contained in:
parent
1675e6f827
commit
240d7ff853
|
|
@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Pool;
|
||||||
*/
|
*/
|
||||||
class Navigation
|
class Navigation
|
||||||
{
|
{
|
||||||
public static function install(Pool $dbPool)
|
public static function install(string $path, Pool $dbPool)
|
||||||
{
|
{
|
||||||
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@ class Installer extends InstallerAbstract
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public static function install(Pool $dbPool, InfoManager $info)
|
public static function install(string $path, Pool $dbPool, InfoManager $info)
|
||||||
{
|
{
|
||||||
parent::install($dbPool, $info);
|
parent::install($path, $dbPool, $info);
|
||||||
|
|
||||||
switch ($dbPool->get('core')->getType()) {
|
switch ($dbPool->get('core')->getType()) {
|
||||||
case DatabaseType::MYSQL:
|
case DatabaseType::MYSQL:
|
||||||
|
|
|
||||||
|
|
@ -302,15 +302,15 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
{
|
{
|
||||||
$val = [];
|
$val = [];
|
||||||
if (
|
if (
|
||||||
$val['name'] = empty($request->getData('name'))
|
($val['name'] = empty($request->getData('name')))
|
||||||
|| $val['parent'] = (
|
|| ($val['parent'] = (
|
||||||
$request->getData('parent') !== null
|
$request->getData('parent') !== null
|
||||||
&& !is_numeric($request->getData('parent'))
|
&& !is_numeric($request->getData('parent'))
|
||||||
)
|
))
|
||||||
|| $val['status'] = (
|
|| ($val['status'] = (
|
||||||
$request->getData('status') === null
|
$request->getData('status') === null
|
||||||
|| !GroupStatus::isValidValue((int) $request->getData('status'))
|
|| !GroupStatus::isValidValue((int) $request->getData('status'))
|
||||||
)
|
))
|
||||||
) {
|
) {
|
||||||
$response->set('group_create_validation', new FormValidation($val));
|
$response->set('group_create_validation', new FormValidation($val));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,11 @@ $_thousands_sep = $this->getData('thousands_sep') ?? '';
|
||||||
$_password = $this->getData('password') ?? '';
|
$_password = $this->getData('password') ?? '';
|
||||||
$_country = $this->getData('country') ?? '';
|
$_country = $this->getData('country') ?? '';
|
||||||
|
|
||||||
$countries = \phpOMS\Localization\ISO3166EnumArray::getConstants();
|
$countries = \phpOMS\Localization\ISO3166NameEnum::getConstants();
|
||||||
$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants();
|
$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants();
|
||||||
$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants();
|
$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants();
|
||||||
$languages = \phpOMS\Localization\ISO639EnumArray::getConstants();
|
$languages = \phpOMS\Localization\ISO639Enum::getConstants();
|
||||||
$currencies = \phpOMS\Localization\ISO4217EnumArray::getConstants();
|
$currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<section class="box w-50 floatLeft">
|
<section class="box w-50 floatLeft">
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,11 @@ $_thousands_sep = $this->getData('thousands_sep') ?? '';
|
||||||
$_password = $this->getData('password') ?? '';
|
$_password = $this->getData('password') ?? '';
|
||||||
$_country = $this->getData('country') ?? '';
|
$_country = $this->getData('country') ?? '';
|
||||||
|
|
||||||
$countries = \phpOMS\Localization\ISO3166EnumArray::getConstants();
|
$countries = \phpOMS\Localization\ISO3166NameEnum::getConstants();
|
||||||
$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants();
|
$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants();
|
||||||
$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants();
|
$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants();
|
||||||
$languages = \phpOMS\Localization\ISO639EnumArray::getConstants();
|
$languages = \phpOMS\Localization\ISO639Enum::getConstants();
|
||||||
$currencies = \phpOMS\Localization\ISO4217EnumArray::getConstants();
|
$currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<section class="box w-50 floatLeft">
|
<section class="box w-50 floatLeft">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user