diff --git a/.gitignore b/.gitignore index ffdb1c25..bb742a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -56,8 +56,8 @@ db/multiflexi /.build/ /docs/build/ /src/zabbix.php -src/css/dataTables.bootstrap4.css -src/js/dataTables.bootstrap4.js +src/css/dataTables.bootstrap5.css +src/js/dataTables.bootstrap5.js src/js/jquery.dataTables.js /debian/multiflexi-abraflexi.debhelper.log /debian/multiflexi-abraflexi.substvars diff --git a/INSTALL.md b/INSTALL.md index b6568005..e0aa1eef 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -26,9 +26,9 @@ php-vitexsoftware-ease-html php-vitexsoftware-ease-bricks php-spojenet-abraflexi php-vitexsoftware-abraflexi-bricks -php-vitexsoftware-ease-bootstrap4 -php-vitexsoftware-ease-bootstrap4-widgets -php-vitexsoftware-ease-bootstrap4-widgets-abraflexi +php-vitexsoftware-ease-bootstrap5 +php-vitexsoftware-ease-bootstrap5-widgets +php-vitexsoftware-ease-bootstrap5-widgets-abraflexi php-vitexsoftware-ease-fluentpdo multiflexi-mysql multiflexi @@ -146,9 +146,9 @@ Updating dependencies Lock file operations: 10 installs, 0 updates, 0 removals - Locking deb/abraflexi (2.10) - Locking deb/abraflexi-bricks (0.34) - - Locking deb/ease-bootstrap4 (1.7) - - Locking deb/ease-bootstrap4-widgets (1.3) - - Locking deb/ease-bootstrap4-widgets-abraflexi (0.5) + - Locking deb/ease-bootstrap5 (1.7) + - Locking deb/ease-bootstrap5-widgets (1.3) + - Locking deb/ease-bootstrap5-widgets-abraflexi (0.5) - Locking deb/ease-bricks (0.9.9) - Locking deb/ease-core (1.35) - Locking deb/ease-fluentpdo (1.0) @@ -160,11 +160,11 @@ Package operations: 10 installs, 0 updates, 0 removals - Installing deb/ease-core (1.35): Symlinking from /usr/share/php/EaseCore - Installing deb/abraflexi (2.10): Symlinking from /usr/share/php/AbraFlexi - Installing deb/ease-html (1.36): Symlinking from /usr/share/php/EaseHtml - - Installing deb/ease-bootstrap4 (1.7): Symlinking from /usr/share/php/EaseTWB4 - - Installing deb/ease-bootstrap4-widgets (1.3): Symlinking from /usr/share/php/EaseTWB4Widgets + - Installing deb/ease-bootstrap5 (1.7): Symlinking from /usr/share/php/EaseTWB5 + - Installing deb/ease-bootstrap5-widgets (1.3): Symlinking from /usr/share/php/EaseTWB5Widgets - Installing deb/ease-bricks (0.9.9): Symlinking from /usr/share/php/EaseBricks - Installing deb/abraflexi-bricks (0.34): Symlinking from /usr/share/php/AbraFlexiBricks - - Installing deb/ease-bootstrap4-widgets-abraflexi (0.5): Symlinking from /usr/share/php/EaseTWB4WidgetsAbraFlexi + - Installing deb/ease-bootstrap5-widgets-abraflexi (0.5): Symlinking from /usr/share/php/EaseTWB5WidgetsAbraFlexi - Installing fpdo/fluentpdo (v2.2.0): Extracting archive - Installing deb/ease-fluentpdo (1.0): Symlinking from /usr/share/php/EaseFluentPDO Generating autoload files diff --git a/composer.json b/composer.json index 350543ef..e69df6f7 100644 --- a/composer.json +++ b/composer.json @@ -17,9 +17,9 @@ "require": { "ext-yaml": "*", "ext-simplexml": "*", - "vitexsoftware/ease-twbootstrap4": "^1.9", + "vitexsoftware/ease-twbootstrap5": "^1", "vitexsoftware/ease-fluentpdo": "dev-main", - "vitexsoftware/ease-twbootstrap4-widgets": "^1.7", + "vitexsoftware/ease-bootstrap5-widgets": "^1.4", "robmorgan/phinx": "^0.14", "datatables/datatables": "^1.10", "symfony/process": "^5.4", @@ -79,10 +79,10 @@ }, "scripts": { "post-install-cmd": [ - "php -r \"copy('vendor/datatables/datatables/media/js/dataTables.bootstrap4.js', 'src/js/dataTables.bootstrap4.js');copy('vendor/datatables/datatables/media/js/jquery.dataTables.js', 'src/js/jquery.dataTables.js');copy('vendor/datatables/datatables/media/css/dataTables.bootstrap4.css','src/css/dataTables.bootstrap4.css');\"" + "php -r \"copy('vendor/datatables/datatables/media/js/dataTables.bootstrap5.js', 'src/js/dataTables.bootstrap5.js');copy('vendor/datatables/datatables/media/js/jquery.dataTables.js', 'src/js/jquery.dataTables.js');copy('vendor/datatables/datatables/media/css/dataTables.bootstrap5.css','src/css/dataTables.bootstrap5.css');\"" ], "post-update-cmd": [ - "php -r \"copy('vendor/datatables/datatables/media/js/dataTables.bootstrap4.js', 'src/js/dataTables.bootstrap4.js');copy('vendor/datatables/datatables/media/js/jquery.dataTables.js', 'src/js/jquery.dataTables.js');copy('vendor/datatables/datatables/media/css/dataTables.bootstrap4.css','src/css/dataTables.bootstrap4.css');\"" + "php -r \"copy('vendor/datatables/datatables/media/js/dataTables.bootstrap5.js', 'src/js/dataTables.bootstrap5.js');copy('vendor/datatables/datatables/media/js/jquery.dataTables.js', 'src/js/jquery.dataTables.js');copy('vendor/datatables/datatables/media/css/dataTables.bootstrap5.css','src/css/dataTables.bootstrap5.css');\"" ] }, "config": { diff --git a/composer.lock b/composer.lock index 2ad0fb78..373d7234 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f180f510f6e4a58a7ce9af86a32c84de", + "content-hash": "ed3ffadc12c2a2717c09c3ed40e862ee", "packages": [ { "name": "cakephp/core", @@ -4704,6 +4704,60 @@ }, "time": "2024-10-01T09:13:06+00:00" }, + { + "name": "vitexsoftware/ease-bootstrap5-widgets", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/VitexSoftware/php-ease-twbootstrap5-widgets.git", + "reference": "ff040b30c2ac2024dfded9b6e3589f22f969ba80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/VitexSoftware/php-ease-twbootstrap5-widgets/zipball/ff040b30c2ac2024dfded9b6e3589f22f969ba80", + "reference": "ff040b30c2ac2024dfded9b6e3589f22f969ba80", + "shasum": "" + }, + "require": { + "vitexsoftware/ease-twbootstrap5": "*" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.45", + "ergebnis/php-cs-fixer-config": "^6.45", + "friendsofphp/php-cs-fixer": "^3.71", + "phpstan/phpstan": "*", + "phpunit/phpunit": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ease\\TWB5\\Widgets\\": "src/Ease/TWB5/Widgets" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Vítězslav Dvořák", + "email": "info@vitexsoftware.cz", + "homepage": "http://v.s.cz/" + } + ], + "description": "EasePHP framework addons and code snipplets", + "homepage": "https://github.com/VitexSoftware/php-ease-twbootstrap4-widgets-abraflexi", + "support": { + "source": "https://github.com/VitexSoftware/php-ease-twbootstrap5-widgets/tree/1.4.1" + }, + "funding": [ + { + "url": "https://www.patreon.com/VitexSoftware", + "type": "patreon" + } + ], + "time": "2025-04-08T17:41:39+00:00" + }, { "name": "vitexsoftware/ease-core", "version": "1.48", @@ -4937,33 +4991,33 @@ "time": "2024-11-16T14:25:43+00:00" }, { - "name": "vitexsoftware/ease-twbootstrap4", - "version": "1.9.1", + "name": "vitexsoftware/ease-twbootstrap5", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/VitexSoftware/php-ease-twbootstrap4.git", - "reference": "315b8c122fc8fe2118cf834c097dd31d95749a35" + "url": "https://github.com/VitexSoftware/php-ease-twbootstrap5.git", + "reference": "9c1e43593eb537cd0635bf176b2694c74aa6c942" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/VitexSoftware/php-ease-twbootstrap4/zipball/315b8c122fc8fe2118cf834c097dd31d95749a35", - "reference": "315b8c122fc8fe2118cf834c097dd31d95749a35", + "url": "https://api.github.com/repos/VitexSoftware/php-ease-twbootstrap5/zipball/9c1e43593eb537cd0635bf176b2694c74aa6c942", + "reference": "9c1e43593eb537cd0635bf176b2694c74aa6c942", "shasum": "" }, "require": { - "vitexsoftware/ease-html": "^1.40" + "vitexsoftware/ease-html": ">= 1.32" }, "require-dev": { - "ergebnis/composer-normalize": "^2.45", - "ergebnis/php-cs-fixer-config": "^6.39", - "friendsofphp/php-cs-fixer": "^3.65", - "phpstan/phpstan": "*", + "ergebnis/composer-normalize": "^2.44", + "ergebnis/php-cs-fixer-config": "^6.37", + "friendsofphp/php-cs-fixer": "^3.64", + "phpstan/phpstan": "^2.0", "phpunit/phpunit": "*" }, "type": "library", "autoload": { "psr-4": { - "Ease\\TWB4\\": "src/Ease/TWB4/" + "Ease\\TWB5\\": "src/Ease/TWB5/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4976,73 +5030,12 @@ "email": "info@vitexsoftware.cz" } ], - "description": "Set of Twitter Bootstrap 4 rendering objects", + "description": "Set of Twitter Bootstrap 5 rendering objects", "support": { - "issues": "https://github.com/VitexSoftware/php-ease-twbootstrap4/issues", - "source": "https://github.com/VitexSoftware/php-ease-twbootstrap4/tree/1.9.1" + "issues": "https://github.com/VitexSoftware/php-ease-twbootstrap5/issues", + "source": "https://github.com/VitexSoftware/php-ease-twbootstrap5/tree/1.0.0" }, - "funding": [ - { - "url": "https://www.patreon.com/VitexSoftware", - "type": "patreon" - } - ], - "time": "2024-12-13T02:05:03+00:00" - }, - { - "name": "vitexsoftware/ease-twbootstrap4-widgets", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/VitexSoftware/php-ease-twbootstrap4-widgets.git", - "reference": "49a36233d2d4b1265891ace7c49c6d06a9195751" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/VitexSoftware/php-ease-twbootstrap4-widgets/zipball/49a36233d2d4b1265891ace7c49c6d06a9195751", - "reference": "49a36233d2d4b1265891ace7c49c6d06a9195751", - "shasum": "" - }, - "require": { - "vitexsoftware/ease-twbootstrap4": "^1.9" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.43", - "ergebnis/php-cs-fixer-config": "^6.34", - "friendsofphp/php-cs-fixer": "^3.61", - "phpstan/phpstan": "*", - "phpunit/phpunit": "*" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ease\\TWB4\\Widgets\\": "src/Ease/TWB4/Widgets" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Vítězslav Dvořák", - "email": "info@vitexsoftware.cz", - "homepage": "http://v.s.cz/" - } - ], - "description": "EasePHP framework addons and code snipplets", - "homepage": "http://v.s.cz/ease.php", - "support": { - "issues": "https://github.com/VitexSoftware/php-ease-twbootstrap4-widgets/issues", - "source": "https://github.com/VitexSoftware/php-ease-twbootstrap4-widgets/tree/1.7.0" - }, - "funding": [ - { - "url": "https://www.patreon.com/VitexSoftware", - "type": "patreon" - } - ], - "time": "2025-04-07T15:24:26+00:00" + "time": "2024-11-18T03:11:59+00:00" }, { "name": "vitexsoftware/multiflexi-api-server", diff --git a/debian/conf/composer.json b/debian/conf/composer.json index 1438f821..a8e0313f 100644 --- a/debian/conf/composer.json +++ b/debian/conf/composer.json @@ -3,7 +3,7 @@ "description": "Tool used to setup AbraFlexi multiinstance", "type": "project", "require": { - "deb/ease-bootstrap4-widgets": "*", + "deb/ease-bootstrap5-widgets": "*", "deb/ease-fluentpdo": "*", "deb/ease-html-widgets": "*", "symfony/process": "*", @@ -59,7 +59,7 @@ }, { "type": "path", - "url": "/usr/share/php/EaseTWB4/" + "url": "/usr/share/php/EaseTWB5/" }, { "type": "path", @@ -67,7 +67,7 @@ }, { "type": "path", - "url": "/usr/share/php/EaseTWB4Widgets/" + "url": "/usr/share/php/EaseTWB5Widgets/" } ] } diff --git a/debian/control b/debian/control index 44012628..3f6387f5 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Depends: ${misc:Depends}, php-vitexsoftware-ease-html-widgets (>=1.1.1), php-cli, locales-all, - php-vitexsoftware-ease-bootstrap4-widgets (>=1.7), + php-vitexsoftware-ease-bootstrap5-widgets (>=1.7), php-vitexsoftware-ease-fluentpdo (>=1.3), multiflexi-sqlite|multiflexi-mysql|multiflexi-pgsql, libjs-jquery-datatables, @@ -84,7 +84,7 @@ Description: Zabbix support for MultiFlexi Package: multiflexi-abraflexi Multi-Arch: foreign -Depends: ${misc:Depends},multiflexi, php-vitexsoftware-abraflexi-bricks,php-vitexsoftware-ease-bootstrap4-widgets-abraflexi +Depends: ${misc:Depends},multiflexi, php-vitexsoftware-abraflexi-bricks,php-vitexsoftware-ease-bootstrap5-widgets-abraflexi Architecture: all Description: MultiFlexi support for AbraFlexi AbraFlexi Connection dialog diff --git a/debian/multiflexi-abraflexi.postinst b/debian/multiflexi-abraflexi.postinst index ad6eedd4..d43ea66d 100644 --- a/debian/multiflexi-abraflexi.postinst +++ b/debian/multiflexi-abraflexi.postinst @@ -8,7 +8,7 @@ composer-debian multiflexi # TODO: # -# "deb/ease-bootstrap4-widgets-abraflexi": "*", +# "deb/ease-bootstrap5-widgets-abraflexi": "*", # # { # "type": "path", @@ -20,5 +20,5 @@ composer-debian multiflexi # }, # { # "type": "path", -# "url": "/usr/share/php/EaseTWB4WidgetsAbraFlexi/" +# "url": "/usr/share/php/EaseTWB5WidgetsAbraFlexi/" # } diff --git a/debian/rules b/debian/rules index 3bf4ff73..09de1ef1 100755 --- a/debian/rules +++ b/debian/rules @@ -22,8 +22,8 @@ override_dh_install: sed -i -e 's/\.\.\/\.env/\/etc\/multiflexi\/\.env/g' debian/multiflexi/usr/lib/multiflexi/phinx-adapter.php sed -i -e 's/composer\.json/\/usr\/lib\/multiflexi\/composer\.json/g' debian/multiflexi/usr/lib/multiflexi/MultiFlexi/Ui/PageBottom.php sed -i -e 's/js\/jquery.dataTables.js/\/javascript\/jquery-datatables\/jquery.dataTables.js/g' debian/multiflexi/usr/lib/multiflexi/MultiFlexi/Ui/DBDataTable.php - sed -i -e 's/js\/dataTables.bootstrap4.js/\/javascript\/jquery-datatables\/dataTables.bootstrap4.js/g' debian/multiflexi/usr/lib/multiflexi/MultiFlexi/Ui/DBDataTable.php - sed -i -e 's/css\/dataTables.bootstrap4.css/\/javascript\/jquery-datatables\/css\/dataTables.bootstrap4.css/g' debian/multiflexi/usr/lib/multiflexi/MultiFlexi/Ui/DBDataTable.php + sed -i -e 's/js\/dataTables.bootstrap5.js/\/javascript\/jquery-datatables\/dataTables.bootstrap5.js/g' debian/multiflexi/usr/lib/multiflexi/MultiFlexi/Ui/DBDataTable.php + sed -i -e 's/css\/dataTables.bootstrap5.css/\/javascript\/jquery-datatables\/css\/dataTables.bootstrap5.css/g' debian/multiflexi/usr/lib/multiflexi/MultiFlexi/Ui/DBDataTable.php sed -i 's/css\/selectize/\/javascript\/selectize.js\/css\/selectize/' debian/multiflexi/usr/lib/multiflexi/MultiFlexi/Ui/DBDataTable.php sed -i -e 's/\.\.\/i18n/\/usr\/share\/locale/g' debian/multiflexi/usr/share/multiflexi/init.php mkdir -p debian/multiflexi-sqlite/usr/lib/multiflexi diff --git a/docs/source/install.rst b/docs/source/install.rst index 8203c054..16b3115f 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -58,7 +58,7 @@ To install MultiFlexi using Debian packages, you can follow these steps: php-composer-pcre php-composer-semver php-composer-spdx-licenses php-composer-xdebug-handler php-intl php-json-schema php-mail php-mail-mime php-mbstring php-mysql php-net-smtp php-net-socket php-pear php-psr-container php-psr-log php-react-promise php-symfony-console php-symfony-deprecation-contracts php-symfony-filesystem php-symfony-finder php-symfony-polyfill-php80 php-symfony-process - php-symfony-service-contracts php-symfony-string php-vitexsoftware-ease-bootstrap4 php-vitexsoftware-ease-bootstrap4-widgets + php-symfony-service-contracts php-symfony-string php-vitexsoftware-ease-bootstrap5 php-vitexsoftware-ease-bootstrap5-widgets php-vitexsoftware-ease-core php-vitexsoftware-ease-fluentpdo php-vitexsoftware-ease-html php-vitexsoftware-ease-html-widgets php-xml php-yaml php8.1-cli php8.1-common php8.1-intl php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-readline php8.1-xml php8.1-yaml unzip Suggested packages: @@ -71,7 +71,7 @@ To install MultiFlexi using Debian packages, you can follow these steps: php-composer-metadata-minifier php-composer-pcre php-composer-semver php-composer-spdx-licenses php-composer-xdebug-handler php-intl php-json-schema php-mail php-mail-mime php-mbstring php-mysql php-net-smtp php-net-socket php-pear php-psr-container php-psr-log php-react-promise php-symfony-console php-symfony-deprecation-contracts php-symfony-filesystem php-symfony-finder php-symfony-polyfill-php80 - php-symfony-process php-symfony-service-contracts php-symfony-string php-vitexsoftware-ease-bootstrap4 php-vitexsoftware-ease-bootstrap4-widgets + php-symfony-process php-symfony-service-contracts php-symfony-string php-vitexsoftware-ease-bootstrap5 php-vitexsoftware-ease-bootstrap5-widgets php-vitexsoftware-ease-core php-vitexsoftware-ease-fluentpdo php-vitexsoftware-ease-html php-vitexsoftware-ease-html-widgets php-xml php-yaml php8.1-cli php8.1-common php8.1-intl php8.1-mbstring php8.1-mysql php8.1-opcache php8.1-readline php8.1-xml php8.1-yaml unzip 0 upgraded, 72 newly installed, 0 to remove and 0 not upgraded. diff --git a/src/MultiFlexi/Action/CustomCommand.php b/src/MultiFlexi/Action/CustomCommand.php index 90fa07ce..b3296e23 100644 --- a/src/MultiFlexi/Action/CustomCommand.php +++ b/src/MultiFlexi/Action/CustomCommand.php @@ -51,7 +51,7 @@ public static function logo(): string public static function inputs(string $prefix) { - return new \Ease\TWB4\FormGroup(_('Command'), new \Ease\Html\InputTextTag($prefix.'[CustomCommand][command]'), '', _('Bash shell is used')); + return new \Ease\TWB5\FormGroup(_('Command'), new \Ease\Html\InputTextTag($prefix.'[CustomCommand][command]'), '', _('Bash shell is used')); } /** diff --git a/src/MultiFlexi/Action/Github.php b/src/MultiFlexi/Action/Github.php index 36b9f095..1a4abce2 100644 --- a/src/MultiFlexi/Action/Github.php +++ b/src/MultiFlexi/Action/Github.php @@ -49,7 +49,7 @@ public static function logo() public static function configForm() { - return new \Ease\TWB4\FormGroup(_('GitHub token'), new \Ease\Html\InputTextTag('Github[token]'), 'ghp_iupB8adLxIIBezDWB1BH9HJCAtpcOL2scdmX', new \Ease\Html\ATag('https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens', _('How to obtain Github Token'))); + return new \Ease\TWB5\FormGroup(_('GitHub token'), new \Ease\Html\InputTextTag('Github[token]'), 'ghp_iupB8adLxIIBezDWB1BH9HJCAtpcOL2scdmX', new \Ease\Html\ATag('https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens', _('How to obtain Github Token'))); } /** @@ -59,7 +59,7 @@ public static function configForm() */ public static function inputs(string $action) { - return new \Ease\TWB4\Badge('info', _('No Fields required').' ('.$action.')'); + return new \Ease\TWB5\Badge('info', _('No Fields required').' ('.$action.')'); } /** diff --git a/src/MultiFlexi/Action/Sleep.php b/src/MultiFlexi/Action/Sleep.php index cfbf735d..da4faf46 100644 --- a/src/MultiFlexi/Action/Sleep.php +++ b/src/MultiFlexi/Action/Sleep.php @@ -61,7 +61,7 @@ public function perform(\MultiFlexi\Job $job): void public static function inputs(string $prefix) { return [ - new \Ease\TWB4\FormGroup(_('Number of seconds'), new \Ease\Html\InputTextTag($prefix.'[Sleep][seconds]'), '60', _('Number of Seconds to wait')), + new \Ease\TWB5\FormGroup(_('Number of seconds'), new \Ease\Html\InputTextTag($prefix.'[Sleep][seconds]'), '60', _('Number of Seconds to wait')), ]; } diff --git a/src/MultiFlexi/Action/WebHook.php b/src/MultiFlexi/Action/WebHook.php index 567b46ab..1d5beadd 100644 --- a/src/MultiFlexi/Action/WebHook.php +++ b/src/MultiFlexi/Action/WebHook.php @@ -88,6 +88,6 @@ public static function usableForApp($app): bool public static function inputs(string $prefix) { - return new \Ease\TWB4\FormGroup(_('Uri'), new \Ease\Html\InputTextTag($prefix.'[WebHook][uri]'), '', _('Report endpoint')); + return new \Ease\TWB5\FormGroup(_('Uri'), new \Ease\Html\InputTextTag($prefix.'[WebHook][uri]'), '', _('Report endpoint')); } } diff --git a/src/MultiFlexi/Action/Zabbix.php b/src/MultiFlexi/Action/Zabbix.php index e80ca8b0..23349918 100644 --- a/src/MultiFlexi/Action/Zabbix.php +++ b/src/MultiFlexi/Action/Zabbix.php @@ -134,8 +134,8 @@ public static function inputs(string $prefix) ); return [ - new \Ease\TWB4\FormGroup(_('Zabbix key'), $input, '{COMPANY_CODE}-{APP_CODE}-{RUNTEMPLATE_ID}-data', _('Zabbix Item key')), - new \Ease\TWB4\FormGroup(_('Metrics file'), new \Ease\Html\InputTextTag($prefix.'[Zabbix][metricsfile]'), '/tmp/metrics.json', _('File with metrics. Leave empty to send stdout')), + new \Ease\TWB5\FormGroup(_('Zabbix key'), $input, '{COMPANY_CODE}-{APP_CODE}-{RUNTEMPLATE_ID}-data', _('Zabbix Item key')), + new \Ease\TWB5\FormGroup(_('Metrics file'), new \Ease\Html\InputTextTag($prefix.'[Zabbix][metricsfile]'), '/tmp/metrics.json', _('File with metrics. Leave empty to send stdout')), ]; } @@ -147,8 +147,8 @@ public static function configForm() { return [ - new \Ease\TWB4\FormGroup(_('Zabbix Server'), new \Ease\Html\InputTextTag('Zabbix[server]'), \Ease\Shared::cfg('ZABBIX_SERVER', 'zabbix.yourcompany.com')), - new \Ease\TWB4\FormGroup(_('Hostname'), new \Ease\Html\InputTextTag('Zabbix[hostname]'), \Ease\Shared::cfg('ZABBIX_HOST', 'multiflexi.yourcompany.com')), + new \Ease\TWB5\FormGroup(_('Zabbix Server'), new \Ease\Html\InputTextTag('Zabbix[server]'), \Ease\Shared::cfg('ZABBIX_SERVER', 'zabbix.yourcompany.com')), + new \Ease\TWB5\FormGroup(_('Hostname'), new \Ease\Html\InputTextTag('Zabbix[hostname]'), \Ease\Shared::cfg('ZABBIX_HOST', 'multiflexi.yourcompany.com')), ]; } diff --git a/src/MultiFlexi/Application.php b/src/MultiFlexi/Application.php index c0871988..da2bec7f 100644 --- a/src/MultiFlexi/Application.php +++ b/src/MultiFlexi/Application.php @@ -528,7 +528,7 @@ public function completeDataRow(array $dataRowRaw) if (empty($dataRow['topics']) === false) { foreach (explode(',', $dataRow['topics']) as $topic) { - $topics->addItem(new \Ease\TWB4\Badge('secondary', $topic)); + $topics->addItem(new \Ease\TWB5\Badge('secondary', $topic)); } $dataRow['topics'] = (string) $topics; diff --git a/src/MultiFlexi/CommonAction.php b/src/MultiFlexi/CommonAction.php index 377001e9..7e485aa8 100644 --- a/src/MultiFlexi/CommonAction.php +++ b/src/MultiFlexi/CommonAction.php @@ -19,7 +19,7 @@ use Ease\Logger\Logging; use Ease\Logger\Message; use Ease\Sand; -use Ease\TWB4\Badge; +use Ease\TWB5\Badge; /** * Description of Executor. diff --git a/src/MultiFlexi/DBEngine.php b/src/MultiFlexi/DBEngine.php index 5fc9e4be..ee65f2b7 100644 --- a/src/MultiFlexi/DBEngine.php +++ b/src/MultiFlexi/DBEngine.php @@ -767,7 +767,7 @@ public function htmlizeRow($row) if (isset($this->keywordsInfo[$key]['refdata']) && \strlen(trim($value))) { $table = $this->keywordsInfo[$key]['refdata']['table']; $searchColumn = $this->keywordsInfo[$key]['refdata']['captioncolumn']; - $row[$key] = ''.$value.' '.\Ease\TWB4\Part::glyphIcon('search'); + $row[$key] = ''.$value.' '.\Ease\TWB5\Part::glyphIcon('search'); } if (strstr($key, 'image') && \strlen(trim($value))) { diff --git a/src/MultiFlexi/Ui/AbraFlexiInstanceStatus.php b/src/MultiFlexi/Ui/AbraFlexiInstanceStatus.php index dcd8d7f3..e66670a7 100644 --- a/src/MultiFlexi/Ui/AbraFlexiInstanceStatus.php +++ b/src/MultiFlexi/Ui/AbraFlexiInstanceStatus.php @@ -43,7 +43,7 @@ public function __construct($servers, $properties = []) ]; unset($companyData['id'], $companyData['licenseGroup'], $companyData['createDt']); - $companyData['action'] = \array_key_exists($companyData['dbNazev'], $registered) ? new \Ease\TWB4\LinkButton('company.php?id='.$registered[$companyData['dbNazev']]['id'], _('Edit'), 'success') : new \Ease\TWB4\LinkButton('companysetup.php?'.http_build_query($registerParams), _('Register'), 'warning'); + $companyData['action'] = \array_key_exists($companyData['dbNazev'], $registered) ? new \Ease\TWB5\LinkButton('company.php?id='.$registered[$companyData['dbNazev']]['id'], _('Edit'), 'success') : new \Ease\TWB5\LinkButton('companysetup.php?'.http_build_query($registerParams), _('Register'), 'warning'); $this->addRowColumns($companyData); } catch (\AbraFlexi\Exception $exc) { $this->addStatusMessage($exc->getMessage()); diff --git a/src/MultiFlexi/Ui/ActionsAdministration.php b/src/MultiFlexi/Ui/ActionsAdministration.php index 6cde9aeb..a0752c15 100644 --- a/src/MultiFlexi/Ui/ActionsAdministration.php +++ b/src/MultiFlexi/Ui/ActionsAdministration.php @@ -20,7 +20,7 @@ * * @author vitex */ -class ActionsAdministration extends \Ease\TWB4\Form +class ActionsAdministration extends \Ease\TWB5\Form { public $modConf; private $actions; @@ -35,7 +35,7 @@ public function __construct(\MultiFlexi\ModConfig $modConf, $properties = []) foreach ($this->actions as $action) { $actionClass = '\\MultiFlexi\\Action\\'.$action; - $moduleRow = new \Ease\TWB4\Row(); + $moduleRow = new \Ease\TWB5\Row(); $moduleRow->addColumn(2, new ActionImage($action, ['height' => '50px'])); $moduleRow->addColumn(4, [new \Ease\Html\StrongTag($actionClass::name()), new \Ease\Html\PTag(new \Ease\Html\SmallTag($actionClass::description()))]); @@ -44,7 +44,7 @@ public function __construct(\MultiFlexi\ModConfig $modConf, $properties = []) $this->addItem(new \Ease\Html\PTag($moduleRow)); } - $this->addItem(new \Ease\TWB4\SubmitButton(_('Save'), 'primary btn-lg btn-block')); + $this->addItem(new \Ease\TWB5\SubmitButton(_('Save'), 'primary btn-lg btn-block')); } public function finalize(): void diff --git a/src/MultiFlexi/Ui/ActionsChooser.php b/src/MultiFlexi/Ui/ActionsChooser.php index e95543a3..20aa47fc 100644 --- a/src/MultiFlexi/Ui/ActionsChooser.php +++ b/src/MultiFlexi/Ui/ActionsChooser.php @@ -33,10 +33,10 @@ public function __construct($prefix, \MultiFlexi\Application $app, $toggles = [] $actionClass = '\\MultiFlexi\\Action\\'.$action; if ($actionClass::usableForApp($app)) { - $moduleRow = new \Ease\TWB4\Row(); + $moduleRow = new \Ease\TWB5\Row(); $moduleRow->addColumn(1, new ActionImage($action, ['height' => '50px'])); - $moduleRow->addColumn(1, new \Ease\TWB4\Widgets\Toggle($prefix.'actionSwitch['.$action.']', \array_key_exists($action, $toggles) && $toggles[$action], '', ['data-size' => 'lg'])); + $moduleRow->addColumn(1, new \Ease\TWB5\Widgets\Toggle($prefix.'actionSwitch['.$action.']', \array_key_exists($action, $toggles) && $toggles[$action], '', ['data-size' => 'lg'])); $moduleRow->addColumn(4, [new \Ease\Html\StrongTag($actionClass::name()), new \Ease\Html\PTag(new \Ease\Html\SmallTag($actionClass::description()))]); $moduleRow->addColumn(4, $actionClass::inputs($prefix)); $moduleRow->setTagClass('form-row'); diff --git a/src/MultiFlexi/Ui/AppEditorForm.php b/src/MultiFlexi/Ui/AppEditorForm.php index 1a5d35c5..333a2df3 100644 --- a/src/MultiFlexi/Ui/AppEditorForm.php +++ b/src/MultiFlexi/Ui/AppEditorForm.php @@ -18,8 +18,8 @@ use Ease\Html\InputFileTag; use Ease\Html\InputHiddenTag; use Ease\Html\InputTextTag; -use Ease\TWB4\SubmitButton; -use Ease\TWB4\Widgets\Toggle; +use Ease\TWB5\SubmitButton; +use Ease\TWB5\Widgets\Toggle; /** * Description of RegisterAppForm. diff --git a/src/MultiFlexi/Ui/AppInfo.php b/src/MultiFlexi/Ui/AppInfo.php index cd98a825..c41e4682 100644 --- a/src/MultiFlexi/Ui/AppInfo.php +++ b/src/MultiFlexi/Ui/AppInfo.php @@ -15,8 +15,8 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\Label; -use Ease\TWB4\LinkButton; +use Ease\TWB5\Label; +use Ease\TWB5\LinkButton; use MultiFlexi\Application; use MultiFlexi\Conffield; @@ -36,7 +36,7 @@ public function __construct($app, $companyId, $properties = []) { parent::__construct(new \Ease\Html\H2Tag($app->getRecordName())); - $mainRow = new \Ease\TWB4\Row(); + $mainRow = new \Ease\TWB5\Row(); $mainRow->addColumn(2, [ new \Ease\Html\DivTag($app->getDataValue('description'), ['style' => 'color: white;']), new \Ease\Html\DivTag(new \Ease\Html\ATag($app->getDataValue('homepage'), $app->getDataValue('homepage'))), diff --git a/src/MultiFlexi/Ui/AppJobsTable.php b/src/MultiFlexi/Ui/AppJobsTable.php index 3da2a7f7..517c03b9 100644 --- a/src/MultiFlexi/Ui/AppJobsTable.php +++ b/src/MultiFlexi/Ui/AppJobsTable.php @@ -25,7 +25,7 @@ * * @author vitex */ -class AppJobsTable extends \Ease\TWB4\Table +class AppJobsTable extends \Ease\TWB5\Table { public function __construct(int $appId, int $companyId, $properties = []) { diff --git a/src/MultiFlexi/Ui/AppJson.php b/src/MultiFlexi/Ui/AppJson.php index 622f5120..3f14e166 100644 --- a/src/MultiFlexi/Ui/AppJson.php +++ b/src/MultiFlexi/Ui/AppJson.php @@ -31,6 +31,6 @@ public function __construct(\MultiFlexi\Application $app, array $properties = [] { parent::__construct(new \Ease\Html\PreTag(\Rcubitto\JsonPretty\JsonPretty::print(json_decode($app->getAppJson()))), $properties); $this->addTagClass('ui-monospace'); - $this->addItem(new \Ease\TWB4\LinkButton('appjson.php?id='.$app->getMyKey(), _('Download').' '.$app->jsonFileName(), 'info ')); + $this->addItem(new \Ease\TWB5\LinkButton('appjson.php?id='.$app->getMyKey(), _('Download').' '.$app->jsonFileName(), 'info ')); } } diff --git a/src/MultiFlexi/Ui/AppLaunchForm.php b/src/MultiFlexi/Ui/AppLaunchForm.php index 75766aff..e3efa7f8 100644 --- a/src/MultiFlexi/Ui/AppLaunchForm.php +++ b/src/MultiFlexi/Ui/AppLaunchForm.php @@ -21,7 +21,7 @@ * @copyright 2015-2024 Vitex Software * @license https://opensource.org/licenses/MIT MIT */ -class AppLaunchForm extends \Ease\TWB4\Form +class AppLaunchForm extends \Ease\TWB5\Form { /** * Application Launch Form. @@ -58,7 +58,7 @@ public function __construct(\MultiFlexi\Application $app, int $companyId) break; case 'checkbox': if (\array_key_exists($fieldKey, $env) === false) { - $this->addInput(new \Ease\TWB4\Widgets\Toggle($fieldKey, (bool) $fieldProps['defval']), $fieldKey.' ', $fieldProps['defval'], $fieldProps['description']); + $this->addInput(new \Ease\TWB5\Widgets\Toggle($fieldKey, (bool) $fieldProps['defval']), $fieldKey.' ', $fieldProps['defval'], $fieldProps['description']); } break; @@ -73,7 +73,7 @@ public function __construct(\MultiFlexi\Application $app, int $companyId) } $this->addItem(new AppExecutorSelect($app)); - $this->addItem(new \Ease\TWB4\SubmitButton([_('Launch now').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'success btn-lg btn-block ')); - $this->addItem(new \Ease\TWB4\LinkButton('schedule.php?app_id='.$appId.'&company_id='.$companyId, [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-lg')); + $this->addItem(new \Ease\TWB5\SubmitButton([_('Launch now').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'success btn-lg btn-block ')); + $this->addItem(new \Ease\TWB5\LinkButton('schedule.php?app_id='.$appId.'&company_id='.$companyId, [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-lg')); } } diff --git a/src/MultiFlexi/Ui/AppLinkButton.php b/src/MultiFlexi/Ui/AppLinkButton.php index 3640719e..3d57adfd 100644 --- a/src/MultiFlexi/Ui/AppLinkButton.php +++ b/src/MultiFlexi/Ui/AppLinkButton.php @@ -20,7 +20,7 @@ * * @author vitex */ -class AppLinkButton extends \Ease\TWB4\LinkButton +class AppLinkButton extends \Ease\TWB5\LinkButton { public function __construct(\MultiFlexi\Application $app, $properties = []) { diff --git a/src/MultiFlexi/Ui/AppRow.php b/src/MultiFlexi/Ui/AppRow.php index 1c7fcf07..e63ffecc 100644 --- a/src/MultiFlexi/Ui/AppRow.php +++ b/src/MultiFlexi/Ui/AppRow.php @@ -17,7 +17,7 @@ use Ease\Html\ATag; use Ease\Html\ImgTag; -use Ease\TWB4\FormGroup; +use Ease\TWB5\FormGroup; // ? use const __PHPUNIT_ATTR_DRIVER_NAME__; @@ -26,7 +26,7 @@ * * @author vitex */ -class AppRow extends \Ease\TWB4\Row +class AppRow extends \Ease\TWB5\Row { /** * Application in Company context. @@ -52,13 +52,13 @@ public function __construct($appData, $properties = []) if (empty($uploadFields)) { $intervalChooser = new \MultiFlexi\Ui\IntervalChooser($appId.'_interval', \array_key_exists('interv', $appData) ? $appData['interv'] : 'n', ['id' => $appId.'_interval', 'data-company' => $appData['company_id'], 'checked' => 'true', 'data-app' => $appId]); } else { - $intervalChooser = new \Ease\TWB4\Badge('info', _('Upload field does not allow application scheduling')); + $intervalChooser = new \Ease\TWB5\Badge('info', _('Upload field does not allow application scheduling')); } if (\array_key_exists('runtemplateid', $appData)) { $launchButton = new \Ease\Html\DivTag(new \MultiFlexi\Ui\LaunchButton($appData['runtemplateid'])); } else { - $launchButton = new \Ease\TWB4\LinkButton('launch.php?app_id='.$appId.'&company_id='.$appData['company_id'], [_('Launch').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'warning btn-lg btn-block '); + $launchButton = new \Ease\TWB5\LinkButton('launch.php?app_id='.$appId.'&company_id='.$appData['company_id'], [_('Launch').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'warning btn-lg btn-block '); } // use AppLaunchForm instead of LaunchButton @@ -74,10 +74,10 @@ public function __construct($appData, $properties = []) $appConfColumn->addItem(new EnvironmentView($cfg->appConfigs($appId))); } - $appConfColumn->addItem(new \Ease\TWB4\LinkButton('custserviceconfig.php?app_id='.$appId.'&company_id='.$appData['company_id'], _('Configure App Environment').' '.new \Ease\Html\ImgTag('images/set.svg', _('Set'), ['height' => '30px']), 'success btn-sm btn-block')); + $appConfColumn->addItem(new \Ease\TWB5\LinkButton('custserviceconfig.php?app_id='.$appId.'&company_id='.$appData['company_id'], _('Configure App Environment').' '.new \Ease\Html\ImgTag('images/set.svg', _('Set'), ['height' => '30px']), 'success btn-sm btn-block')); $jobs = (new \MultiFlexi\Job())->listingQuery()->select(['job.id', 'begin', 'exitcode', 'launched_by', 'login'], true)->leftJoin('user ON user.id = job.launched_by')->where('company_id', $appData['company_id'])->where('app_id', $appId)->limit(10)->orderBy('job.id DESC')->fetchAll(); - $jobList = new \Ease\TWB4\Table(); + $jobList = new \Ease\TWB5\Table(); $jobList->addRowHeaderColumns([_('Job ID'), _('Launch time'), _('Exit Code'), _('Launcher')]); foreach ($jobs as $job) { @@ -95,7 +95,7 @@ public function __construct($appData, $properties = []) $jobList->addRowColumns($job); } - $historyButton = (new \Ease\TWB4\LinkButton('joblist.php?app_id='.$appId.'&company_id='.$appData['company_id'], _('Job History').' '.new \Ease\Html\ImgTag('images/log.svg', _('Set'), ['height' => '30px']), 'info btn-sm btn-block')); + $historyButton = (new \Ease\TWB5\LinkButton('joblist.php?app_id='.$appId.'&company_id='.$appData['company_id'], _('Job History').' '.new \Ease\Html\ImgTag('images/log.svg', _('Set'), ['height' => '30px']), 'info btn-sm btn-block')); $appRow->addColumn(4, [new \Ease\Html\H3Tag(_('Last 10 jobs')), $jobList, $historyButton]); } } diff --git a/src/MultiFlexi/Ui/ApplicationInfo.php b/src/MultiFlexi/Ui/ApplicationInfo.php index 9aaa0225..652918e8 100644 --- a/src/MultiFlexi/Ui/ApplicationInfo.php +++ b/src/MultiFlexi/Ui/ApplicationInfo.php @@ -22,7 +22,7 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\Panel; +use Ease\TWB5\Panel; use MultiFlexi\Application; /** @@ -48,11 +48,11 @@ public function __construct(Application $application) * * @param Application $application * - * @return \Ease\TWB4\Row + * @return \Ease\TWB5\Row */ public function headerRow($application) { - $headerRow = new \Ease\TWB4\Row(); + $headerRow = new \Ease\TWB5\Row(); $appData = new \Ease\Html\DivTag(); $appData->addItem(new \Ease\Html\H3Tag($application->getDataValue('name'))); diff --git a/src/MultiFlexi/Ui/ApplicationPanel.php b/src/MultiFlexi/Ui/ApplicationPanel.php index 79b805e9..e640b722 100644 --- a/src/MultiFlexi/Ui/ApplicationPanel.php +++ b/src/MultiFlexi/Ui/ApplicationPanel.php @@ -15,9 +15,9 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Panel; -use Ease\TWB4\Row; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Panel; +use Ease\TWB5\Row; use MultiFlexi\Application; /** @@ -54,7 +54,7 @@ public function __construct(Application $application, $content = null, $footer = $calb = new CompanyAppLink($kumpan, $application, ['class' => 'card-img-top']); $crls = new \MultiFlexi\Ui\CompanyRuntemplatesLinks($kumpan, $application, [], ['class' => 'btn btn-outline-secondary btn-sm']); - $usedByCompany->addItem(new \Ease\TWB4\Card([new \Ease\Html\DivTag([new \Ease\Html\H5Tag([$calb, ' ('.$crls->count().')'], ['class' => 'card-title']), $crls], ['class' => 'card-body'])], ['style' => 'width: 6rem;'])); + $usedByCompany->addItem(new \Ease\TWB5\Card([new \Ease\Html\DivTag([new \Ease\Html\H5Tag([$calb, ' ('.$crls->count().')'], ['class' => 'card-title']), $crls], ['class' => 'card-body'])], ['style' => 'width: 6rem;'])); } $this->headRow->addColumn(6, $usedByCompany); @@ -64,9 +64,9 @@ public function __construct(Application $application, $content = null, $footer = } } - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('tasks.php?application_id=' . $cid, '🔧 ' . _('Setup tasks'), 'secondary btn-lg btn-block')); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('adhoc.php?application_id=' . $cid, '🚀 ' . _('Application launcher'), 'secondary btn-lg btn-block')); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('periodical.php?application_id=' . $cid, '🔁 ' . _('Periodical Tasks'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('tasks.php?application_id=' . $cid, '🔧 ' . _('Setup tasks'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('adhoc.php?application_id=' . $cid, '🚀 ' . _('Application launcher'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('periodical.php?application_id=' . $cid, '🔁 ' . _('Periodical Tasks'), 'secondary btn-lg btn-block')); parent::__construct($this->headRow, 'default', $content, $footer); } diff --git a/src/MultiFlexi/Ui/AppsMenu.php b/src/MultiFlexi/Ui/AppsMenu.php index dc4ae6a9..b874fd94 100644 --- a/src/MultiFlexi/Ui/AppsMenu.php +++ b/src/MultiFlexi/Ui/AppsMenu.php @@ -15,7 +15,7 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\Widgets\MainPageMenu; +use Ease\TWB5\Widgets\MainPageMenu; use MultiFlexi\Application; /** diff --git a/src/MultiFlexi/Ui/AppsSelector.php b/src/MultiFlexi/Ui/AppsSelector.php index c8cf99f7..69ce0447 100644 --- a/src/MultiFlexi/Ui/AppsSelector.php +++ b/src/MultiFlexi/Ui/AppsSelector.php @@ -22,7 +22,7 @@ */ class AppsSelector extends \Ease\Html\InputTextTag { - use \Ease\TWB4\Widgets\Selectizer; + use \Ease\TWB5\Widgets\Selectizer; public function __construct($identifier = null, $enabled = [], $optionsPage = 'app.php') { diff --git a/src/MultiFlexi/Ui/ArchivedJobPanel.php b/src/MultiFlexi/Ui/ArchivedJobPanel.php index 0f5ca70b..bf1d3af1 100644 --- a/src/MultiFlexi/Ui/ArchivedJobPanel.php +++ b/src/MultiFlexi/Ui/ArchivedJobPanel.php @@ -15,9 +15,9 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Panel; -use Ease\TWB4\Row; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Panel; +use Ease\TWB5\Row; use MultiFlexi\Application; /** @@ -48,7 +48,7 @@ public function __construct(\MultiFlexi\Job $job, $content = null, $footer = nul $calb = new CompanyAppLink($kumpan, $job->application, ['class' => 'card-img-top']); $crls = new \MultiFlexi\Ui\CompanyRuntemplatesLinks($kumpan, $job->application, [], ['class' => 'btn btn-outline-secondary btn-sm']); - $usedByCompany->addItem(new \Ease\TWB4\Card([new \Ease\Html\DivTag([new \Ease\Html\H5Tag($calb, ['class' => 'card-title']), $crls], ['class' => 'card-body'])], ['style' => 'width: 6rem;'])); + $usedByCompany->addItem(new \Ease\TWB5\Card([new \Ease\Html\DivTag([new \Ease\Html\H5Tag($calb, ['class' => 'card-title']), $crls], ['class' => 'card-body'])], ['style' => 'width: 6rem;'])); } $this->headRow->addColumn(6, $usedByCompany); @@ -58,9 +58,9 @@ public function __construct(\MultiFlexi\Job $job, $content = null, $footer = nul $this->headRow->addItem(new RuntemplateButton($job->runTemplate)); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('tasks.php?application_id=' . $cid, '🔧 ' . _('Setup tasks'), 'secondary btn-lg btn-block')); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('adhoc.php?application_id=' . $cid, '🚀 ' . _('Application launcher'), 'secondary btn-lg btn-block')); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('periodical.php?application_id=' . $cid, '🔁 ' . _('Periodical Tasks'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('tasks.php?application_id=' . $cid, '🔧 ' . _('Setup tasks'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('adhoc.php?application_id=' . $cid, '🚀 ' . _('Application launcher'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('periodical.php?application_id=' . $cid, '🔁 ' . _('Periodical Tasks'), 'secondary btn-lg btn-block')); parent::__construct($this->headRow, 'default', $content, $footer); } } diff --git a/src/MultiFlexi/Ui/BootstrapMenu.php b/src/MultiFlexi/Ui/BootstrapMenu.php index 7d678d8e..961b0b31 100644 --- a/src/MultiFlexi/Ui/BootstrapMenu.php +++ b/src/MultiFlexi/Ui/BootstrapMenu.php @@ -15,7 +15,7 @@ namespace MultiFlexi\Ui; -class BootstrapMenu extends \Ease\TWB4\Navbar +class BootstrapMenu extends \Ease\TWB5\Navbar { /** * Navigation. @@ -38,12 +38,12 @@ public function __construct( parent::__construct(new \Ease\Html\ImgTag('images/project-logo.svg', $name, ['width' => 50, 'height' => 50, 'class' => 'img-rounded d-inline-block align-top']), 'main-menu', ['class' => 'navbar-fixed-top'.(\array_key_exists('class', $properties) ? $properties['class'] : '')]); if (\Ease\Shared::user()->isLogged() === false) { - $loginForm = new \Ease\TWB4\Form(['action' => 'login.php', 'class' => 'form-inline my-2 my-lg-0']); + $loginForm = new \Ease\TWB5\Form(['action' => 'login.php', 'class' => 'form-inline my-2 my-lg-0']); $loginForm->addItem(new \Ease\Html\InputTextTag('login', WebPage::getRequestValue('login'), ['class' => 'form-control mr-sm-2', 'placeholder' => _('Login')])); $loginForm->addItem(new \Ease\Html\InputPasswordTag('password', WebPage::getRequestValue('password'), ['class' => 'form-control mr-sm-2', 'placeholder' => _('Password')])); - $loginForm->addItem(new \Ease\TWB4\SubmitButton(_('Sign In'), 'success my-2 my-sm-0')); + $loginForm->addItem(new \Ease\TWB5\SubmitButton(_('Sign In'), 'success my-2 my-sm-0')); $loginForm->addItem('   '); - $loginForm->addItem(new \Ease\TWB4\LinkButton('passwordrecovery.php', _('Password recovery'), 'warning my-2 my-sm-0')); + $loginForm->addItem(new \Ease\TWB5\LinkButton('passwordrecovery.php', _('Password recovery'), 'warning my-2 my-sm-0')); $this->addMenuItem($loginForm); $this->addItem($content); } diff --git a/src/MultiFlexi/Ui/Breadcrumb.php b/src/MultiFlexi/Ui/Breadcrumb.php index 7f3d2db6..424a1ecf 100644 --- a/src/MultiFlexi/Ui/Breadcrumb.php +++ b/src/MultiFlexi/Ui/Breadcrumb.php @@ -20,7 +20,7 @@ * * @author vitex */ -class Breadcrumb extends \Ease\TWB4\Breadcrumb +class Breadcrumb extends \Ease\TWB5\Breadcrumb { /** * App Breadcrumb. diff --git a/src/MultiFlexi/Ui/ColumnsForm.php b/src/MultiFlexi/Ui/ColumnsForm.php index 9216892b..43af3202 100644 --- a/src/MultiFlexi/Ui/ColumnsForm.php +++ b/src/MultiFlexi/Ui/ColumnsForm.php @@ -18,11 +18,11 @@ use Ease\Html\DivTag; use Ease\Html\InputHiddenTag; use Ease\Html\InputSubmitTag; -use Ease\TWB4\Col; -use Ease\TWB4\Form; -use Ease\TWB4\FormGroup; -use Ease\TWB4\Row; -use Ease\TWB4\SubmitButton; +use Ease\TWB5\Col; +use Ease\TWB5\Form; +use Ease\TWB5\FormGroup; +use Ease\TWB5\Row; +use Ease\TWB5\SubmitButton; use MultiFlexi\Engine; class ColumnsForm extends Form diff --git a/src/MultiFlexi/Ui/CompaniesBar.php b/src/MultiFlexi/Ui/CompaniesBar.php index de18af2b..1862e4e6 100644 --- a/src/MultiFlexi/Ui/CompaniesBar.php +++ b/src/MultiFlexi/Ui/CompaniesBar.php @@ -35,7 +35,7 @@ public function __construct(array $properties = []) $companer->setData($companyData); - $companyAppCard = new \Ease\TWB4\Card(new JobSuccessGraph($todaysJobs, ['style' => 'max-width: fit-content; margin-left: auto; margin-right: auto;']), ['style' => 'width: 10rem;']); + $companyAppCard = new \Ease\TWB5\Card(new JobSuccessGraph($todaysJobs, ['style' => 'max-width: fit-content; margin-left: auto; margin-right: auto;']), ['style' => 'width: 10rem;']); $companyAppCard->addTagClass('text-center'); $companyAppCard->addItem(new \Ease\Html\ATag('company.php?id='.$companyData['id'], new \Ease\Html\ImgTag($companyData['logo'], $companyData['name'], ['title' => $companyData['code'], 'class' => 'card-img-top', 'style' => 'padding: 5px; margin: 5px;max-height: 150px;max-width: 150px;']))); diff --git a/src/MultiFlexi/Ui/CompanyAppLinkButton.php b/src/MultiFlexi/Ui/CompanyAppLinkButton.php index 23f0af58..4919b812 100644 --- a/src/MultiFlexi/Ui/CompanyAppLinkButton.php +++ b/src/MultiFlexi/Ui/CompanyAppLinkButton.php @@ -20,7 +20,7 @@ * * @author vitex */ -class CompanyAppLinkButton extends \Ease\TWB4\LinkButton +class CompanyAppLinkButton extends \Ease\TWB5\LinkButton { public function __construct(\MultiFlexi\Company $company, \MultiFlexi\Application $app, $properties = []) { diff --git a/src/MultiFlexi/Ui/CompanyApplicationPanel.php b/src/MultiFlexi/Ui/CompanyApplicationPanel.php index f834b492..d1ed9474 100644 --- a/src/MultiFlexi/Ui/CompanyApplicationPanel.php +++ b/src/MultiFlexi/Ui/CompanyApplicationPanel.php @@ -15,9 +15,9 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Panel; -use Ease\TWB4\Row; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Panel; +use Ease\TWB5\Row; use MultiFlexi\Application; /** @@ -47,13 +47,13 @@ public function __construct(\MultiFlexi\CompanyApp $companyApp, $content = null, $crls = new \MultiFlexi\Ui\CompanyRuntemplatesLinks($company, $this->application, [], ['class' => 'btn btn-outline-secondary btn-sm']); - $usedByCompany->addItem(new \Ease\TWB4\Card([new \Ease\Html\DivTag([new \Ease\Html\H5Tag([_('Active RunTemplates').': ', ' '.$crls->count().''], ['class' => 'card-title']), $crls], ['class' => 'card-body'])], ['style' => 'width: 6rem;'])); + $usedByCompany->addItem(new \Ease\TWB5\Card([new \Ease\Html\DivTag([new \Ease\Html\H5Tag([_('Active RunTemplates').': ', ' '.$crls->count().''], ['class' => 'card-title']), $crls], ['class' => 'card-body'])], ['style' => 'width: 6rem;'])); $this->headRow->addColumn(6, $usedByCompany); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('tasks.php?application_id=' . $cid, '🔧 ' . _('Setup tasks'), 'secondary btn-lg btn-block')); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('adhoc.php?application_id=' . $cid, '🚀 ' . _('Application launcher'), 'secondary btn-lg btn-block')); - // $headRow->addColumn(2, new \Ease\TWB4\LinkButton('periodical.php?application_id=' . $cid, '🔁 ' . _('Periodical Tasks'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('tasks.php?application_id=' . $cid, '🔧 ' . _('Setup tasks'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('adhoc.php?application_id=' . $cid, '🚀 ' . _('Application launcher'), 'secondary btn-lg btn-block')); + // $headRow->addColumn(2, new \Ease\TWB5\LinkButton('periodical.php?application_id=' . $cid, '🔁 ' . _('Periodical Tasks'), 'secondary btn-lg btn-block')); parent::__construct($this->headRow, 'default', $content, $footer); } diff --git a/src/MultiFlexi/Ui/CompanyAppsBar.php b/src/MultiFlexi/Ui/CompanyAppsBar.php index fd9583f2..45594126 100644 --- a/src/MultiFlexi/Ui/CompanyAppsBar.php +++ b/src/MultiFlexi/Ui/CompanyAppsBar.php @@ -30,14 +30,14 @@ public function __construct(Company $company, $properties = []) $cardGroup = new \Ease\Html\DivTag(null, ['class' => 'card-group']); foreach ($companyApps as $companyApp) { - $companyAppCard = new \Ease\TWB4\Card(new \Ease\Html\ATag('companyapp.php?company_id='.$company->getMyKey().'&app_id='.$companyApp['id'], new \Ease\Html\ImgTag('appimage.php?uuid='.$companyApp['uuid'], _($companyApp['name']), ['title' => _($companyApp['description']), 'class' => 'card-img-top', 'style' => 'padding: 5px; margin: 5px;max-height: 150px;max-width: 150px;'])), ['style' => 'width: 10rem;']); + $companyAppCard = new \Ease\TWB5\Card(new \Ease\Html\ATag('companyapp.php?company_id='.$company->getMyKey().'&app_id='.$companyApp['id'], new \Ease\Html\ImgTag('appimage.php?uuid='.$companyApp['uuid'], _($companyApp['name']), ['title' => _($companyApp['description']), 'class' => 'card-img-top', 'style' => 'padding: 5px; margin: 5px;max-height: 150px;max-width: 150px;'])), ['style' => 'width: 10rem;']); $companyAppCard->addTagClass('text-center'); $lastJobInfo = $jobber->listingQuery()->select(['id', 'exitcode'], true)->where(['company_id' => $company->getMyKey(), 'app_id' => $companyApp['id']])->order('id DESC')->limit(1)->fetchAll(); if ($lastJobInfo) { $companyAppStatus = new \Ease\Html\ATag('job.php?id='.$lastJobInfo[0]['id'], new ExitCode($lastJobInfo[0]['exitcode'], ['style' => 'font-size: 2.0em; font-family: monospace;'])); } else { - $companyAppStatus = new \Ease\TWB4\Badge('disabled', '🪤', ['style' => 'font-size: 2.0em; font-family: monospace;']); + $companyAppStatus = new \Ease\TWB5\Badge('disabled', '🪤', ['style' => 'font-size: 2.0em; font-family: monospace;']); } $companyAppCard->addItem(new \Ease\Html\DivTag(new \Ease\Html\H5Tag(_($companyApp['name']), ['class' => 'card-title']), ['class' => 'card-body'])); diff --git a/src/MultiFlexi/Ui/CompanyDbStatus.php b/src/MultiFlexi/Ui/CompanyDbStatus.php index fc41ff7a..c6b4a424 100644 --- a/src/MultiFlexi/Ui/CompanyDbStatus.php +++ b/src/MultiFlexi/Ui/CompanyDbStatus.php @@ -20,7 +20,7 @@ * * @author vitex */ -class CompanyDbStatus extends \Ease\TWB4\Row +class CompanyDbStatus extends \Ease\TWB5\Row { /** * Show status of database. @@ -42,42 +42,42 @@ public function __construct($company) // $assigned = (string) (new \MultiFlexi\RunTemplate())->listingQuery()->count(); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Apps').' ', new \Ease\TWB4\PillBadge('info', $apps)], + [_('Apps').' ', new \Ease\TWB5\PillBadge('info', $apps)], ['class' => 'btn btn-default', 'type' => 'button'], )); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Periodical').' ', new \Ease\TWB4\PillBadge('info', $periodical)], + [_('Periodical').' ', new \Ease\TWB5\PillBadge('info', $periodical)], ['class' => 'btn btn-default', 'type' => 'button'], )); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Jobs Total').' ', new \Ease\TWB4\PillBadge('info', $jobs)], + [_('Jobs Total').' ', new \Ease\TWB5\PillBadge('info', $jobs)], ['class' => 'btn btn-default', 'type' => 'button'], )); - $this->addColumn(2, new \Ease\TWB4\LinkButton( + $this->addColumn(2, new \Ease\TWB5\LinkButton( '?showOnly=success&id='.$companyId, - [_('Success Jobs').' ', new \Ease\TWB4\PillBadge('success', $jobsSuccess)], + [_('Success Jobs').' ', new \Ease\TWB5\PillBadge('success', $jobsSuccess)], 'success', )); - $this->addColumn(2, new \Ease\TWB4\LinkButton( + $this->addColumn(2, new \Ease\TWB5\LinkButton( '?showOnly=failed&id='.$companyId, - [_('Failed Jobs').' ', new \Ease\TWB4\PillBadge('danger', $jobs - $jobsSuccess - $jobsUnfinished)], + [_('Failed Jobs').' ', new \Ease\TWB5\PillBadge('danger', $jobs - $jobsSuccess - $jobsUnfinished)], 'danger', )); - $this->addColumn(2, new \Ease\TWB4\LinkButton( + $this->addColumn(2, new \Ease\TWB5\LinkButton( '?showOnly=unfinished&id='.$companyId, - [_('Unfinished Jobs').' ', new \Ease\TWB4\PillBadge('warning', $jobsUnfinished)], + [_('Unfinished Jobs').' ', new \Ease\TWB5\PillBadge('warning', $jobsUnfinished)], 'warning', )); // $this->addColumn(2, new \Ease\Html\ButtonTag( - // [_('Customers') . ' ', new \Ease\TWB4\PillBadge('info', $customers)], + // [_('Customers') . ' ', new \Ease\TWB5\PillBadge('info', $customers)], // ['class' => 'btn btn-default', 'type' => 'button'] // )); // $this->addColumn(2, new \Ease\Html\ButtonTag( - // [_('Companies') . ' ', new \Ease\TWB4\PillBadge('success', $companies)], + // [_('Companies') . ' ', new \Ease\TWB5\PillBadge('success', $companies)], // ['class' => 'btn btn-default', 'type' => 'button'] // )); // $this->addColumn(2, new \Ease\Html\ButtonTag( - // [_('Assigned') . ' ', new \Ease\TWB4\PillBadge('success', $assigned)], + // [_('Assigned') . ' ', new \Ease\TWB5\PillBadge('success', $assigned)], // ['class' => 'btn btn-default', 'type' => 'button'] // )); } diff --git a/src/MultiFlexi/Ui/CompanyEditorForm.php b/src/MultiFlexi/Ui/CompanyEditorForm.php index 8e6be221..8f28b326 100644 --- a/src/MultiFlexi/Ui/CompanyEditorForm.php +++ b/src/MultiFlexi/Ui/CompanyEditorForm.php @@ -18,7 +18,7 @@ use Ease\Html\InputEmailTag; use Ease\Html\InputHiddenTag; use Ease\Html\InputTextTag; -use Ease\TWB4\SubmitButton; +use Ease\TWB5\SubmitButton; /** * Registered AbraFlexi instance editor Form. diff --git a/src/MultiFlexi/Ui/CompanyLinkButton.php b/src/MultiFlexi/Ui/CompanyLinkButton.php index 5018db05..a1e5e1d9 100644 --- a/src/MultiFlexi/Ui/CompanyLinkButton.php +++ b/src/MultiFlexi/Ui/CompanyLinkButton.php @@ -20,7 +20,7 @@ * * @author vitex */ -class CompanyLinkButton extends \Ease\TWB4\LinkButton +class CompanyLinkButton extends \Ease\TWB5\LinkButton { public function __construct(\MultiFlexi\Company $company, $properties = []) { diff --git a/src/MultiFlexi/Ui/CompanyPanel.php b/src/MultiFlexi/Ui/CompanyPanel.php index e39b3e85..6733e7c0 100644 --- a/src/MultiFlexi/Ui/CompanyPanel.php +++ b/src/MultiFlexi/Ui/CompanyPanel.php @@ -25,7 +25,7 @@ * * @author vitex */ -class CompanyPanel extends \Ease\TWB4\Panel +class CompanyPanel extends \Ease\TWB5\Panel { /** * @param \MultiFlexi\Company $company @@ -35,13 +35,13 @@ class CompanyPanel extends \Ease\TWB4\Panel public function __construct($company, $content = null, $footer = null) { $cid = $company->getMyKey(); - $headRow = new \Ease\TWB4\Row(); + $headRow = new \Ease\TWB5\Row(); $headRow->addColumn(2, new \Ease\Html\ATag('company.php?id='.$cid, [new CompanyLogo($company, ['style' => 'height: 60px']), ' ', $company->getDataValue('code')])); - $headRow->addColumn(2, new \Ease\TWB4\LinkButton('companysetup.php?id='.$cid, '🛠️ '._('Setup'), 'light btn-lg btn-block')); - $headRow->addColumn(2, new \Ease\TWB4\LinkButton('companyapps.php?company_id='.$cid, '📌 '._('Applications'), 'light btn-lg btn-block')); - $headRow->addColumn(2, new \Ease\TWB4\LinkButton('periodical.php?company_id='.$cid, '🔁 '._('Periodical Tasks'), 'light btn-lg btn-block')); - $headRow->addColumn(2, new \Ease\TWB4\LinkButton('wizard.php?company='.$company->getMyKey(), '🧙🏽‍♂️ '._('Launch wizard'), 'light btn-lg btn-block')); - $headRow->addColumn(2, new \Ease\TWB4\LinkButton('companycreds.php?company_id='.$company->getMyKey(), '🔐 '._('Credentials'), 'light btn-lg btn-block')); + $headRow->addColumn(2, new \Ease\TWB5\LinkButton('companysetup.php?id='.$cid, '🛠️ '._('Setup'), 'light btn-lg btn-block')); + $headRow->addColumn(2, new \Ease\TWB5\LinkButton('companyapps.php?company_id='.$cid, '📌 '._('Applications'), 'light btn-lg btn-block')); + $headRow->addColumn(2, new \Ease\TWB5\LinkButton('periodical.php?company_id='.$cid, '🔁 '._('Periodical Tasks'), 'light btn-lg btn-block')); + $headRow->addColumn(2, new \Ease\TWB5\LinkButton('wizard.php?company='.$company->getMyKey(), '🧙🏽‍♂️ '._('Launch wizard'), 'light btn-lg btn-block')); + $headRow->addColumn(2, new \Ease\TWB5\LinkButton('companycreds.php?company_id='.$company->getMyKey(), '🔐 '._('Credentials'), 'light btn-lg btn-block')); parent::__construct($headRow, 'default', $content, $footer); } diff --git a/src/MultiFlexi/Ui/CompanyRuntemplatesLinks.php b/src/MultiFlexi/Ui/CompanyRuntemplatesLinks.php index 1eef6c24..f700e51d 100644 --- a/src/MultiFlexi/Ui/CompanyRuntemplatesLinks.php +++ b/src/MultiFlexi/Ui/CompanyRuntemplatesLinks.php @@ -38,7 +38,7 @@ public function __construct(\MultiFlexi\Company $company, \MultiFlexi\Applicatio if ($lastJobInfo) { $companyAppStatus = new \Ease\Html\ATag('job.php?id='.$lastJobInfo[0]['id'], new ExitCode($lastJobInfo[0]['exitcode'], ['style' => 'font-size: 1.0em; font-family: monospace;']), ['class' => 'btn btn-outline-secondary btn-sm', 'title' => $runtemplateData['name']]); } else { - $companyAppStatus = new \Ease\TWB4\Badge('disabled', '🪤', ['style' => 'font-size: 0.5em; font-family: monospace;']); + $companyAppStatus = new \Ease\TWB5\Badge('disabled', '🪤', ['style' => 'font-size: 0.5em; font-family: monospace;']); } $runtemplatesDiv->addItem(new \Ease\Html\SpanTag([new \Ease\Html\ATag('runtemplate.php?id='.$runtemplateData['id'], '⚗️#'.$runtemplateData['id'], ['class' => 'btn btn-outline-secondary btn-sm', 'title' => $runtemplateData['name']]), $companyAppStatus], ['class' => 'btn-group', 'style' => 'margin: 2px', 'role' => 'group'])); diff --git a/src/MultiFlexi/Ui/CompanySelectize.php b/src/MultiFlexi/Ui/CompanySelectize.php index 0a706b8a..c0e2dc70 100644 --- a/src/MultiFlexi/Ui/CompanySelectize.php +++ b/src/MultiFlexi/Ui/CompanySelectize.php @@ -22,7 +22,7 @@ */ class CompanySelectize extends CompanySelect { - use \Ease\TWB4\Widgets\Selectizer; + use \Ease\TWB5\Widgets\Selectizer; #[\Override] public function finalize(): void diff --git a/src/MultiFlexi/Ui/ConfFieldsForm.php b/src/MultiFlexi/Ui/ConfFieldsForm.php index 435887ce..5021dbca 100644 --- a/src/MultiFlexi/Ui/ConfFieldsForm.php +++ b/src/MultiFlexi/Ui/ConfFieldsForm.php @@ -17,8 +17,8 @@ use Ease\Html\InputHiddenTag; use Ease\Html\InputTextTag; -use Ease\TWB4\Form; -use Ease\TWB4\SubmitButton; +use Ease\TWB5\Form; +use Ease\TWB5\SubmitButton; /** * Description of ConfFieldsForm. @@ -41,7 +41,7 @@ public function __construct($conffields, $formContents, $tagProperties = []) $this->addInput(new InputTextTag('keyname', \array_key_exists('keyname', $conffields) ? $conffields['keyname'] : ''), _('New config field Keyword')); $this->addInput(new InputTextTag('defval', \array_key_exists('defval', $conffields) ? $conffields['defval'] : ''), _('Default value')); $this->addInput(new InputTextTag('description', \array_key_exists('description', $conffields) ? $conffields['description'] : ''), _('New config field description')); - $this->addInput(new \Ease\TWB4\Widgets\Toggle('required'), _('Required')); + $this->addInput(new \Ease\TWB5\Widgets\Toggle('required'), _('Required')); if (\array_key_exists('id', $conffields)) { $this->addItem(new InputHiddenTag('id', $conffields['id'])); diff --git a/src/MultiFlexi/Ui/ConfigFieldsBadges.php b/src/MultiFlexi/Ui/ConfigFieldsBadges.php index 0aa20cde..8bc4376d 100644 --- a/src/MultiFlexi/Ui/ConfigFieldsBadges.php +++ b/src/MultiFlexi/Ui/ConfigFieldsBadges.php @@ -16,7 +16,7 @@ namespace MultiFlexi\Ui; use Ease\Container; -use Ease\TWB4\Badge; +use Ease\TWB5\Badge; /** * Description of Confiffields. diff --git a/src/MultiFlexi/Ui/ConfigFieldsOverview.php b/src/MultiFlexi/Ui/ConfigFieldsOverview.php index 0947e705..5fe5945c 100644 --- a/src/MultiFlexi/Ui/ConfigFieldsOverview.php +++ b/src/MultiFlexi/Ui/ConfigFieldsOverview.php @@ -31,9 +31,9 @@ public function __construct(\MultiFlexi\ConfigFields $fields) } } - public static function confInfo(\MultiFlexi\ConfigField $field): \Ease\TWB4\Row + public static function confInfo(\MultiFlexi\ConfigField $field): \Ease\TWB5\Row { - $confInfoRow = new \Ease\TWB4\Row(); + $confInfoRow = new \Ease\TWB5\Row(); $confInfoRow->addColumn(2, [$field->getType(), new \Ease\Html\H3Tag($field->getName())]); $confInfoRow->addColumn(2, $field->getDescription()); $confInfoRow->addColumn(2, _('Note').': '.$field->getNote()); diff --git a/src/MultiFlexi/Ui/ConfigFieldsView.php b/src/MultiFlexi/Ui/ConfigFieldsView.php index e9b29995..b916e690 100644 --- a/src/MultiFlexi/Ui/ConfigFieldsView.php +++ b/src/MultiFlexi/Ui/ConfigFieldsView.php @@ -33,7 +33,7 @@ public function __construct(array $fieldsInfo) public static function confInfo($fieldInfo) { - $container = new \Ease\TWB4\Container($fieldInfo['type']); + $container = new \Ease\TWB5\Container($fieldInfo['type']); $container->addItem(new \Ease\Html\H3Tag($fieldInfo['keyname'])); $container->addItem(empty($fieldInfo['description']) ? '' : _($fieldInfo['description'])); @@ -42,6 +42,6 @@ public static function confInfo($fieldInfo) $dl->addDef(_('Requied'), $fieldInfo['required'] ? '✅' : '❎'); $container->addItem($dl); - return new \Ease\TWB4\Card($container); + return new \Ease\TWB5\Card($container); } } diff --git a/src/MultiFlexi/Ui/ConfigurationWizard.php b/src/MultiFlexi/Ui/ConfigurationWizard.php index cbeae1ae..5c81e330 100644 --- a/src/MultiFlexi/Ui/ConfigurationWizard.php +++ b/src/MultiFlexi/Ui/ConfigurationWizard.php @@ -30,8 +30,8 @@ public function __construct(\MultiFlexi\Company $company) $this->step = (int) \Ease\WebPage::getRequestValue('step'); $this->application = new \MultiFlexi\Application(\Ease\WebPage::getRequestValue('app_id', 'int')); $this->company = $company; - $footer = new \Ease\TWB4\ProgressBar($this->getStepPercent(), $this->getStepPercent().'% '.$this->getStepLabel(), 'progress-bar-striped progress-bar-animated bg-info'); - $body = new \Ease\TWB4\Row(); + $footer = new \Ease\TWB5\ProgressBar($this->getStepPercent(), $this->getStepPercent().'% '.$this->getStepLabel(), 'progress-bar-striped progress-bar-animated bg-info'); + $body = new \Ease\TWB5\Row(); $body->addColumn(2, new \Ease\Html\DivTag('🧙🏻‍♂️', ['style' => 'font-size: 220px; background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(12,121,9,1) 35%, rgba(0,212,255,1) 100%); height: 100%'])); $body->addColumn(10, $this->getStepBody()); parent::__construct(_('Configuration Wizard').': '.$this->getStepLabel(), 'inverse', $body, $footer); @@ -69,7 +69,7 @@ public function getStepBody(): mixed public function appConfigurator() { - $configForm = new \Ease\TWB4\Form(); + $configForm = new \Ease\TWB5\Form(); $configForm->addInput(new \Ease\Html\InputHiddenTag('app_id', $this->application->getMyKey())); $configForm->addInput(new \Ease\Html\InputHiddenTag('company_id', $this->company->getMyKey())); $configForm->addInput(new \Ease\Html\InputHiddenTag('step', $this->step)); @@ -87,7 +87,7 @@ public function appConfigurator() $configForm->addItem(new $formClass()); } - $configForm->addItem(new \Ease\TWB4\SubmitButton(_('Next').' ➡️', 'primary')); + $configForm->addItem(new \Ease\TWB5\SubmitButton(_('Next').' ➡️', 'primary')); return $configForm; } @@ -98,7 +98,7 @@ public function appChooser() $allAppData = $apps->listingQuery()->select(['id', 'image', 'name', 'description', 'topics'], true); - $fbtable = new \Ease\TWB4\Table(); + $fbtable = new \Ease\TWB5\Table(); $fbtable->addRowHeaderColumns([_('Image'), _('Name'), _('Description')]); foreach ($allAppData as $appData) { diff --git a/src/MultiFlexi/Ui/ConfiguredFieldBadges.php b/src/MultiFlexi/Ui/ConfiguredFieldBadges.php index bc65a788..e8db9efb 100644 --- a/src/MultiFlexi/Ui/ConfiguredFieldBadges.php +++ b/src/MultiFlexi/Ui/ConfiguredFieldBadges.php @@ -38,7 +38,7 @@ public function __construct(int $companyID, int $appID) parent::__construct($appFields); if (!empty($appFields)) { - $this->addItem(new \Ease\TWB4\LinkButton('custserviceconfig.php?app_id='.$appID.'&company_id='.$companyID, _('Configure').' '.new \Ease\Html\ImgTag('images/set.svg', _('Set'), ['height' => '30px']), 'success btn-sm')); + $this->addItem(new \Ease\TWB5\LinkButton('custserviceconfig.php?app_id='.$appID.'&company_id='.$companyID, _('Configure').' '.new \Ease\Html\ImgTag('images/set.svg', _('Set'), ['height' => '30px']), 'success btn-sm')); } } } diff --git a/src/MultiFlexi/Ui/CredentialCloneForm.php b/src/MultiFlexi/Ui/CredentialCloneForm.php index 9c6eb82d..aa4dd797 100644 --- a/src/MultiFlexi/Ui/CredentialCloneForm.php +++ b/src/MultiFlexi/Ui/CredentialCloneForm.php @@ -20,14 +20,14 @@ * * @author vitex */ -class CredentialCloneForm extends \Ease\TWB4\Form +class CredentialCloneForm extends \Ease\TWB5\Form { public function __construct(\MultiFlexi\Credential $runtemplate) { $clonename = _($runtemplate->getDataValue('name') ?: $runtemplate->getAppInfo()['app_name']).' '._('Clone'); parent::__construct(['action' => 'credentialclone.php?id='.(string) $runtemplate->getMyKey(), 'class' => 'form-inline']); $this->addInput(new \Ease\Html\InputTextTag('clonename', $clonename), _('Save as copy').' ', $clonename); - $this->addItem(new \Ease\TWB4\SubmitButton('💕 '._('Clone'), 'success mb-2', ['type' => 'submit'])); + $this->addItem(new \Ease\TWB5\SubmitButton('💕 '._('Clone'), 'success mb-2', ['type' => 'submit'])); } /** diff --git a/src/MultiFlexi/Ui/CredentialForm.php b/src/MultiFlexi/Ui/CredentialForm.php index 31b0f6b7..c8e2d45a 100644 --- a/src/MultiFlexi/Ui/CredentialForm.php +++ b/src/MultiFlexi/Ui/CredentialForm.php @@ -20,12 +20,12 @@ use Ease\Html\InputHiddenTag; use Ease\Html\InputTextTag; use Ease\Html\SpanTag; -use Ease\TWB4\Badge; -use Ease\TWB4\Form; -use Ease\TWB4\FormGroup; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Row; -use Ease\TWB4\SubmitButton; +use Ease\TWB5\Badge; +use Ease\TWB5\Form; +use Ease\TWB5\FormGroup; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Row; +use Ease\TWB5\SubmitButton; use MultiFlexi\ConfigField; use MultiFlexi\Credential; use MultiFlexi\CredentialType; diff --git a/src/MultiFlexi/Ui/CredentialSelect.php b/src/MultiFlexi/Ui/CredentialSelect.php index ade23445..e42d7dc3 100644 --- a/src/MultiFlexi/Ui/CredentialSelect.php +++ b/src/MultiFlexi/Ui/CredentialSelect.php @@ -22,7 +22,7 @@ */ class CredentialSelect extends \Ease\Html\SelectTag { - use \Ease\TWB4\Widgets\Selectizer; + use \Ease\TWB5\Widgets\Selectizer; private int $company_id; private string $requirement; diff --git a/src/MultiFlexi/Ui/CredentialTypeCheck.php b/src/MultiFlexi/Ui/CredentialTypeCheck.php index b6e4322b..b50995e1 100644 --- a/src/MultiFlexi/Ui/CredentialTypeCheck.php +++ b/src/MultiFlexi/Ui/CredentialTypeCheck.php @@ -20,7 +20,7 @@ * * @author Vitex */ -class CredentialTypeCheck extends \Ease\TWB4\Well +class CredentialTypeCheck extends \Ease\TWB5\Well { public function __construct(\MultiFlexi\CredentialType $crtype, array $properties = []) { diff --git a/src/MultiFlexi/Ui/CredentialTypeForm.php b/src/MultiFlexi/Ui/CredentialTypeForm.php index 3a67b667..aa7ec860 100644 --- a/src/MultiFlexi/Ui/CredentialTypeForm.php +++ b/src/MultiFlexi/Ui/CredentialTypeForm.php @@ -20,14 +20,14 @@ * * Handles the form for editing CredentialType. */ -class CredentialTypeForm extends \Ease\TWB4\Form +class CredentialTypeForm extends \Ease\TWB5\Form { public \MultiFlexi\CredentialType $credType; public function __construct(\MultiFlexi\CredentialType $credtype, $formProperties = []) { $this->credType = $credtype; - $credTypeRow1 = new \Ease\TWB4\Row(); + $credTypeRow1 = new \Ease\TWB5\Row(); $companyId = $credtype->getDataValue('company_id'); $logos['helper'] = new CredentialTypeLogo($credtype, ['style' => 'height: 200px'], ['class' => 'img-fluid']); @@ -38,21 +38,21 @@ public function __construct(\MultiFlexi\CredentialType $credtype, $formPropertie $credTypeRow1->addColumn(2, $logos); $credTypeRow1->addColumn(6, [ - new \Ease\TWB4\FormGroup(_('Credential Name'), new \Ease\Html\InputTextTag('name', $credtype->getRecordName())), - new \Ease\TWB4\FormGroup(_('Company'), new CompanySelect('company_id', $companyId)), - new \Ease\TWB4\FormGroup(_('Credential UUID'), new \Ease\Html\InputTextTag('uuid', $credtype->getDataValue('uuid'), ['disabled'])), + new \Ease\TWB5\FormGroup(_('Credential Name'), new \Ease\Html\InputTextTag('name', $credtype->getRecordName())), + new \Ease\TWB5\FormGroup(_('Company'), new CompanySelect('company_id', $companyId)), + new \Ease\TWB5\FormGroup(_('Credential UUID'), new \Ease\Html\InputTextTag('uuid', $credtype->getDataValue('uuid'), ['disabled'])), ]); - $helperCol = $credTypeRow1->addColumn(4, new \Ease\TWB4\FormGroup(_('Credential type Helper Class'), new CredentialTypeClassSelect('class', [], (string) $credtype->getDataValue('class')))); + $helperCol = $credTypeRow1->addColumn(4, new \Ease\TWB5\FormGroup(_('Credential type Helper Class'), new CredentialTypeClassSelect('class', [], (string) $credtype->getDataValue('class')))); if ($credtype->getDataValue('class')) { $helperCol->addItem(new FieldsForm($credtype->getHelper()->fieldsInternal(), $credtype->getDataValue('class'))); - $provided = new \Ease\TWB4\Panel(new \Ease\Html\H4Tag(_('Fields provided'))); + $provided = new \Ease\TWB5\Panel(new \Ease\Html\H4Tag(_('Fields provided'))); $assigned = $credtype->getFields(); foreach ($credtype->getHelper()->fieldsProvided() as $fieldProvided) { - $fieldRow = new \Ease\TWB4\Row(); + $fieldRow = new \Ease\TWB5\Row(); $fieldRow->addColumn(4, $fieldProvided->getName().'
'.($fieldProvided->isRequired() ? _('Required') : _('Optional')).' '.$fieldProvided->getType()); $fieldRow->addColumn(6, $fieldProvided->getDescription()); @@ -60,13 +60,13 @@ public function __construct(\MultiFlexi\CredentialType $credtype, $formPropertie $flags = new \Ease\Html\SpanTag(); if (\is_object($assigned->getFieldByCode($fieldProvided->getCode()))) { - $flags->addItem(new \Ease\TWB4\LinkButton('#', '➕', 'disabled', ['title' => _('Already assigned')])); + $flags->addItem(new \Ease\TWB5\LinkButton('#', '➕', 'disabled', ['title' => _('Already assigned')])); } else { if ($fieldProvided->isRequired()) { $credtype->addStatusMessage(sprintf(_('The %s field is required for %s'), $fieldProvided->getCode(), $credtype->getHelper()->name()), 'warning'); } - $flags->addItem(new \Ease\TWB4\LinkButton('?id='.$credtype->getMyKey().'&addField='.$fieldProvided->getCode(), '➕', 'success', ['title' => _('Add Field to ')])); + $flags->addItem(new \Ease\TWB5\LinkButton('?id='.$credtype->getMyKey().'&addField='.$fieldProvided->getCode(), '➕', 'success', ['title' => _('Add Field to ')])); } $fieldRow->addColumn(2, $flags); @@ -90,25 +90,25 @@ public function __construct(\MultiFlexi\CredentialType $credtype, $formPropertie parent::__construct(['action' => 'credentialtype.php'], ['method' => 'POST'], $formContents); // $this->setTagProperty('enctype', 'multipart/form-data'); - $submitRow = new \Ease\TWB4\Row(); + $submitRow = new \Ease\TWB5\Row(); if (null === $credtype->getMyKey()) { - $submitRow->addColumn(2, new \Ease\TWB4\LinkButton('#', '🚀 '._('Test'), 'disabled btn-lg btn-block')); + $submitRow->addColumn(2, new \Ease\TWB5\LinkButton('#', '🚀 '._('Test'), 'disabled btn-lg btn-block')); } else { - $submitRow->addColumn(2, new \Ease\TWB4\LinkButton('credentialtype.php?id='.$credtype->getMyKey().'&test=true', '🚀 '._('Test'), 'success btn-lg btn-block')); + $submitRow->addColumn(2, new \Ease\TWB5\LinkButton('credentialtype.php?id='.$credtype->getMyKey().'&test=true', '🚀 '._('Test'), 'success btn-lg btn-block')); } - $submitRow->addColumn(8, new \Ease\TWB4\SubmitButton('🍏 '._('Apply'), 'primary btn-lg btn-block')); + $submitRow->addColumn(8, new \Ease\TWB5\SubmitButton('🍏 '._('Apply'), 'primary btn-lg btn-block')); if (null === $credtype->getMyKey()) { - $submitRow->addColumn(2, new \Ease\TWB4\SubmitButton('⚰️ '._('Remove').' !', 'disabled btn-lg btn-block', ['disabled' => 'true'])); + $submitRow->addColumn(2, new \Ease\TWB5\SubmitButton('⚰️ '._('Remove').' !', 'disabled btn-lg btn-block', ['disabled' => 'true'])); } else { $this->addItem(new \Ease\Html\InputHiddenTag('id', $credtype->getMyKey())); if (WebPage::getRequestValue('remove') === 'true') { - $submitRow->addColumn(2, new \Ease\TWB4\LinkButton('credentialtype.php?delete='.$credtype->getMyKey(), '⚰️ '._('Remove').' !', 'danger btn-lg btn-block')); + $submitRow->addColumn(2, new \Ease\TWB5\LinkButton('credentialtype.php?delete='.$credtype->getMyKey(), '⚰️ '._('Remove').' !', 'danger btn-lg btn-block')); } else { - $submitRow->addColumn(2, new \Ease\TWB4\LinkButton('credentialtype.php?id='.$credtype->getMyKey().'&remove=true', '⚰️ '._('Remove').' ?', 'warning btn-lg btn-block')); + $submitRow->addColumn(2, new \Ease\TWB5\LinkButton('credentialtype.php?id='.$credtype->getMyKey().'&remove=true', '⚰️ '._('Remove').' ?', 'warning btn-lg btn-block')); } } @@ -119,28 +119,28 @@ public function afterAdd(): void { } - private function credTypeField(string $credTypeId, \MultiFlexi\ConfigFieldWithHelper $field): \Ease\TWB4\Row + private function credTypeField(string $credTypeId, \MultiFlexi\ConfigFieldWithHelper $field): \Ease\TWB5\Row { - $credTypeFieldRow = new \Ease\TWB4\Row(); + $credTypeFieldRow = new \Ease\TWB5\Row(); - $credTypeFieldRow->addColumn(2, new \Ease\TWB4\FormGroup(_('Field Name'), new \Ease\Html\InputTextTag($credTypeId.'[keyname]', $field->getCode()))); + $credTypeFieldRow->addColumn(2, new \Ease\TWB5\FormGroup(_('Field Name'), new \Ease\Html\InputTextTag($credTypeId.'[keyname]', $field->getCode()))); if ($field->isManual()) { - $credTypeFieldRow->addColumn(2, new \Ease\TWB4\FormGroup(_('Field Type'), new CfgFieldTypeSelect($credTypeId.'[type]', $field->getType()))); - $credTypeFieldRow->addColumn(2, new \Ease\TWB4\FormGroup(_('Field Hint'), new \Ease\Html\InputTextTag($credTypeId.'[hint]', $field->getHint()))); - $credTypeFieldRow->addColumn(2, new \Ease\TWB4\FormGroup(_('Field Default Value'), new \Ease\Html\InputTextTag($credTypeId.'[defval]', $field->getDefaultValue()))); + $credTypeFieldRow->addColumn(2, new \Ease\TWB5\FormGroup(_('Field Type'), new CfgFieldTypeSelect($credTypeId.'[type]', $field->getType()))); + $credTypeFieldRow->addColumn(2, new \Ease\TWB5\FormGroup(_('Field Hint'), new \Ease\Html\InputTextTag($credTypeId.'[hint]', $field->getHint()))); + $credTypeFieldRow->addColumn(2, new \Ease\TWB5\FormGroup(_('Field Default Value'), new \Ease\Html\InputTextTag($credTypeId.'[defval]', $field->getDefaultValue()))); } $helper = $this->credType->getHelper(); if ($helper) { - $credTypeFieldRow->addColumn(2, new \Ease\TWB4\FormGroup(_('Helper Class field'), $helper->providedFieldsSelect($credTypeId.'[helper]', $field->getHelper()))); + $credTypeFieldRow->addColumn(2, new \Ease\TWB5\FormGroup(_('Helper Class field'), $helper->providedFieldsSelect($credTypeId.'[helper]', $field->getHelper()))); } else { $credTypeFieldRow->addColumn(2, _('No Helper Class chosen yet')); } if (is_numeric($credTypeId)) { - $credTypeFieldRow->addColumn(1, new \Ease\TWB4\FormGroup(_('Remove'), new \Ease\Html\ATag('?removefield='.$credTypeId.'&id='.$this->credType->getMyKey(), '❌️'))); + $credTypeFieldRow->addColumn(1, new \Ease\TWB5\FormGroup(_('Remove'), new \Ease\Html\ATag('?removefield='.$credTypeId.'&id='.$this->credType->getMyKey(), '❌️'))); } return $credTypeFieldRow; diff --git a/src/MultiFlexi/Ui/CredentialTypeSelect.php b/src/MultiFlexi/Ui/CredentialTypeSelect.php index 5eaad62d..a51b95d3 100644 --- a/src/MultiFlexi/Ui/CredentialTypeSelect.php +++ b/src/MultiFlexi/Ui/CredentialTypeSelect.php @@ -22,7 +22,7 @@ */ class CredentialTypeSelect extends \Ease\Html\SelectTag { - use \Ease\TWB4\Widgets\Selectizer; + use \Ease\TWB5\Widgets\Selectizer; private int $company_id; public function __construct(string $name, int $company_id, ?int $selected = null, array $properties = []) diff --git a/src/MultiFlexi/Ui/CtHelpersListing.php b/src/MultiFlexi/Ui/CtHelpersListing.php index 19d7ce0c..e33d581a 100644 --- a/src/MultiFlexi/Ui/CtHelpersListing.php +++ b/src/MultiFlexi/Ui/CtHelpersListing.php @@ -31,7 +31,7 @@ public function __construct($content = null, $properties = []) foreach ($helpers as $injector) { $helperClass = '\\MultiFlexi\\CredentialType\\'.$injector; - $moduleRow = new \Ease\TWB4\Row(); + $moduleRow = new \Ease\TWB5\Row(); $moduleRow->addColumn(2, new \Ease\Html\ImgTag('images/'.$helperClass::logo(), $helperClass::name(), ['height' => '50px'])); $moduleRow->addColumn(4, [new \Ease\Html\StrongTag($helperClass::name()), new \Ease\Html\PTag(new \Ease\Html\SmallTag($helperClass::description()))]); diff --git a/src/MultiFlexi/Ui/CustomAppConfigForm.php b/src/MultiFlexi/Ui/CustomAppConfigForm.php index 2189a291..6f7412bb 100644 --- a/src/MultiFlexi/Ui/CustomAppConfigForm.php +++ b/src/MultiFlexi/Ui/CustomAppConfigForm.php @@ -37,7 +37,7 @@ public function __construct($engine) foreach (\MultiFlexi\Conffield::getAppConfigs($engine->getDataValue('app_id')) as $fieldInfo) { if ($fieldInfo['type'] === 'checkbox') { - $input = new \Ease\Html\DivTag(new \Ease\TWB4\Widgets\Toggle($fieldInfo['keyname'], \array_key_exists($fieldInfo['keyname'], $values) ? ($values[$fieldInfo['keyname']]['value'] === 'true' ? true : false) : $fieldInfo['defval'], 'true', [])); + $input = new \Ease\Html\DivTag(new \Ease\TWB5\Widgets\Toggle($fieldInfo['keyname'], \array_key_exists($fieldInfo['keyname'], $values) ? ($values[$fieldInfo['keyname']]['value'] === 'true' ? true : false) : $fieldInfo['defval'], 'true', [])); } else { $input = new \Ease\Html\InputTag($fieldInfo['keyname'], \array_key_exists($fieldInfo['keyname'], $values) ? $values[$fieldInfo['keyname']]['value'] : $fieldInfo['defval'], ['type' => $fieldInfo['type']]); } @@ -47,6 +47,6 @@ public function __construct($engine) $this->addItem(new \Ease\Html\InputHiddenTag('app_id', $engine->getDataValue('app_id'))); $this->addItem(new \Ease\Html\InputHiddenTag('company_id', $engine->getDataValue('company_id'))); - $this->addItem(new \Ease\TWB4\SubmitButton(_('Save'), 'success btn-lg btn-block')); + $this->addItem(new \Ease\TWB5\SubmitButton(_('Save'), 'success btn-lg btn-block')); } } diff --git a/src/MultiFlexi/Ui/CustomAppEnvironmentView.php b/src/MultiFlexi/Ui/CustomAppEnvironmentView.php index 537c5516..5a8d0e2a 100644 --- a/src/MultiFlexi/Ui/CustomAppEnvironmentView.php +++ b/src/MultiFlexi/Ui/CustomAppEnvironmentView.php @@ -41,13 +41,13 @@ public function __construct(int $appCompanyID, $properties = []) $envValues = array_merge($appToCompany->getAppEnvironment(), $customConfig->getAppConfig($companyId, $appId)); - // $appConfig = array_combine(array_keys($appFields), array_fill(0, count($appFields), new \Ease\TWB4\Badge('warning', 'unset'))); + // $appConfig = array_combine(array_keys($appFields), array_fill(0, count($appFields), new \Ease\TWB5\Badge('warning', 'unset'))); foreach ($appFields as $envName => $envProperties) { if (\array_key_exists($envName, $envValues)) { $appConfig[$envName]['value'] = $envValues[$envName]; } else { - $appConfig[$envName]['value'] = new \Ease\TWB4\Badge('warning', _('unset')); + $appConfig[$envName]['value'] = new \Ease\TWB5\Badge('warning', _('unset')); } } diff --git a/src/MultiFlexi/Ui/DBDataTable.php b/src/MultiFlexi/Ui/DBDataTable.php index c98b352e..d737e512 100644 --- a/src/MultiFlexi/Ui/DBDataTable.php +++ b/src/MultiFlexi/Ui/DBDataTable.php @@ -74,8 +74,8 @@ public function __construct($engine = null, $properties = []) // $this->includeJavaScript('js/datatablerenderutils.js'); $this->includeJavaScript('js/jquery.dataTables.js'); - $this->includeJavaScript('js/dataTables.bootstrap4.js'); - $this->includeCss('css/dataTables.bootstrap4.css'); + $this->includeJavaScript('js/dataTables.bootstrap5.js'); + $this->includeCss('css/dataTables.bootstrap5.css'); // $this->includeJavaScript('assets/DataTables-1.10.19/js/jquery.dataTables.min.js'); // $this->includeJavaScript('assets/DataTables-1.10.19/js/dataTables.bootstrap.min.js'); // $this->includeJavaScript('assets/Select-1.3.0/js/dataTables.select.min.js'); @@ -89,7 +89,7 @@ public function __construct($engine = null, $properties = []) // $this->includeJavaScript('assets/Responsive-2.2.2/js/responsive.bootstrap.min.js'); $this->includeJavaScript('js/selectize.min.js'); $this->includeCss('css/selectize.css'); - $this->includeCss('css/selectize.bootstrap4.css'); + $this->includeCss('css/selectize.bootstrap5.css'); $this->setTagClass('table table-bordered'); $this->includeJavaScript('assets/Buttons-1.5.6/js/dataTables.buttons.js'); $this->includeJavaScript('assets/Buttons-1.5.6/js/buttons.bootstrap.min.js'); diff --git a/src/MultiFlexi/Ui/DbStatus.php b/src/MultiFlexi/Ui/DbStatus.php index b2e8dc71..46913926 100644 --- a/src/MultiFlexi/Ui/DbStatus.php +++ b/src/MultiFlexi/Ui/DbStatus.php @@ -20,7 +20,7 @@ * * @author vitex */ -class DbStatus extends \Ease\TWB4\Row +class DbStatus extends \Ease\TWB5\Row { /** * Show status of database. @@ -36,27 +36,27 @@ public function __construct() $assigned = (string) (new \MultiFlexi\RunTemplate())->listingQuery()->count(); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Jobs').' ', new \Ease\TWB4\PillBadge('success', $jobs)], + [_('Jobs').' ', new \Ease\TWB5\PillBadge('success', $jobs)], ['class' => 'btn btn-default', 'type' => 'button'], )); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Apps').' ', new \Ease\TWB4\PillBadge('success', $apps)], + [_('Apps').' ', new \Ease\TWB5\PillBadge('success', $apps)], ['class' => 'btn btn-default', 'type' => 'button'], )); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Servers').' ', new \Ease\TWB4\PillBadge('success', $servers)], + [_('Servers').' ', new \Ease\TWB5\PillBadge('success', $servers)], ['class' => 'btn btn-default', 'type' => 'button'], )); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Customers').' ', new \Ease\TWB4\PillBadge('success', $customers)], + [_('Customers').' ', new \Ease\TWB5\PillBadge('success', $customers)], ['class' => 'btn btn-default', 'type' => 'button'], )); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Companies').' ', new \Ease\TWB4\PillBadge('success', $companies)], + [_('Companies').' ', new \Ease\TWB5\PillBadge('success', $companies)], ['class' => 'btn btn-default', 'type' => 'button'], )); $this->addColumn(2, new \Ease\Html\ButtonTag( - [_('Assigned').' ', new \Ease\TWB4\PillBadge('success', $assigned)], + [_('Assigned').' ', new \Ease\TWB5\PillBadge('success', $assigned)], ['class' => 'btn btn-default', 'type' => 'button'], )); } diff --git a/src/MultiFlexi/Ui/DeleteCompanyForm.php b/src/MultiFlexi/Ui/DeleteCompanyForm.php index 84e9570d..66883658 100644 --- a/src/MultiFlexi/Ui/DeleteCompanyForm.php +++ b/src/MultiFlexi/Ui/DeleteCompanyForm.php @@ -18,7 +18,7 @@ use Ease\Html\InputEmailTag; use Ease\Html\InputHiddenTag; use Ease\Html\InputTextTag; -use Ease\TWB4\SubmitButton; +use Ease\TWB5\SubmitButton; /** * Registered AbraFlexi instance editor Form. diff --git a/src/MultiFlexi/Ui/EngineForm.php b/src/MultiFlexi/Ui/EngineForm.php index 86fc05d6..afcaa216 100644 --- a/src/MultiFlexi/Ui/EngineForm.php +++ b/src/MultiFlexi/Ui/EngineForm.php @@ -16,7 +16,7 @@ namespace MultiFlexi\Ui; use Ease\Html\InputHiddenTag; -use Ease\TWB4\Form; +use Ease\TWB5\Form; use MultiFlexi\Engine; class EngineForm extends Form diff --git a/src/MultiFlexi/Ui/EnvModulesListing.php b/src/MultiFlexi/Ui/EnvModulesListing.php index 57c48af6..47afcb45 100644 --- a/src/MultiFlexi/Ui/EnvModulesListing.php +++ b/src/MultiFlexi/Ui/EnvModulesListing.php @@ -31,7 +31,7 @@ public function __construct($content = null, $properties = []) foreach ($injectors as $injector) { $injectorClass = '\\MultiFlexi\\Env\\'.$injector; - $moduleRow = new \Ease\TWB4\Row(); + $moduleRow = new \Ease\TWB5\Row(); $moduleRow->addColumn(2, [new \Ease\Html\StrongTag($injectorClass::name()), new \Ease\Html\PTag(new \Ease\Html\SmallTag($injectorClass::description()))]); $moduleRow->addColumn(6, implode('
', $injectorClass::allKeysHandled())); diff --git a/src/MultiFlexi/Ui/EnvironmentEditor.php b/src/MultiFlexi/Ui/EnvironmentEditor.php index 851994d0..4c871b2f 100644 --- a/src/MultiFlexi/Ui/EnvironmentEditor.php +++ b/src/MultiFlexi/Ui/EnvironmentEditor.php @@ -46,10 +46,10 @@ public function __construct($fields, $properties = []) $tableRow->addItem(new \Ease\Html\TdTag($valueInput, ['style' => 'width: 80%'])); } - $newItemForm = new \Ease\TWB4\Form(); + $newItemForm = new \Ease\TWB5\Form(); $newItemForm->addInput(new \Ease\Html\InputTextTag('env[newkey]'), _('New Config field'), _('Keyword'), _('Create New field here')); $newItemForm->addInput(new \Ease\Html\InputTextTag('env[newvalue]'), _('New Config value'), _('Value'), _('Enter New field value here')); - $newItemForm->addItem(new \Ease\TWB4\SubmitButton(_('Add new field'), 'success')); + $newItemForm->addItem(new \Ease\TWB5\SubmitButton(_('Add new field'), 'success')); $this->addRowFooterColumns([new \Ease\Html\DivTag($newItemForm, ['class' => 'form-row']), sprintf(_('%s items'), \count($this->fields))]); $this->includeJavaScript('js/bootstrap-editable.js'); diff --git a/src/MultiFlexi/Ui/EnvironmentView.php b/src/MultiFlexi/Ui/EnvironmentView.php index c5ab7031..5b75c083 100644 --- a/src/MultiFlexi/Ui/EnvironmentView.php +++ b/src/MultiFlexi/Ui/EnvironmentView.php @@ -41,11 +41,11 @@ public function functionName($param): void if ($field->isSecret()) { $envData['value'] = preg_replace('(.)', '*', $envData['value']); } else { - $envData['value'] = new \Ease\TWB4\Badge('inverse', $field->getDefaultValue(), ['title' => _('Default Value')]); + $envData['value'] = new \Ease\TWB5\Badge('inverse', $field->getDefaultValue(), ['title' => _('Default Value')]); } // if(empty($envData['value'])){ - // TODO $envData['value'] = new \Ease\TWB4\Badge('danger',_('Required')); + // TODO $envData['value'] = new \Ease\TWB5\Badge('danger',_('Required')); // } if (\array_key_exists('credential_id', $envData)) { diff --git a/src/MultiFlexi/Ui/EnvsForm.php b/src/MultiFlexi/Ui/EnvsForm.php index df7bc881..043edc3d 100644 --- a/src/MultiFlexi/Ui/EnvsForm.php +++ b/src/MultiFlexi/Ui/EnvsForm.php @@ -20,7 +20,7 @@ * * @author vitex */ -class EnvsForm extends \Ease\TWB4\Form +class EnvsForm extends \Ease\TWB5\Form { public function __construct($environment = [], $formProperties = [], $formContents = null) { @@ -33,6 +33,6 @@ public function __construct($environment = [], $formProperties = [], $formConten $this->addItem(new \Ease\Html\HrTag()); $this->addInput(new \Ease\Html\InputTextTag('env[newkey]', ''), _('New Configuration Key')); $this->addInput(new \Ease\Html\InputTextTag('env[newvalue]', ''), _('New Configuration value')); - $this->addItem(new \Ease\TWB4\SubmitButton(_('Save / Add'), 'success')); + $this->addItem(new \Ease\TWB5\SubmitButton(_('Save / Add'), 'success')); } } diff --git a/src/MultiFlexi/Ui/ExecutorsListing.php b/src/MultiFlexi/Ui/ExecutorsListing.php index b9d5801d..0555381b 100644 --- a/src/MultiFlexi/Ui/ExecutorsListing.php +++ b/src/MultiFlexi/Ui/ExecutorsListing.php @@ -31,7 +31,7 @@ public function __construct($content = null, $properties = []) foreach ($executors as $injector) { $executorClass = '\\MultiFlexi\\Executor\\'.$injector; - $moduleRow = new \Ease\TWB4\Row(); + $moduleRow = new \Ease\TWB5\Row(); $moduleRow->addColumn(2, new ExecutorImage($injector, ['height' => '50px'])); $moduleRow->addColumn(4, [new \Ease\Html\StrongTag($executorClass::name()), new \Ease\Html\PTag(new \Ease\Html\SmallTag($executorClass::description()))]); diff --git a/src/MultiFlexi/Ui/ExitCode.php b/src/MultiFlexi/Ui/ExitCode.php index 503c4804..de47fd70 100644 --- a/src/MultiFlexi/Ui/ExitCode.php +++ b/src/MultiFlexi/Ui/ExitCode.php @@ -20,7 +20,7 @@ * * @author vitex */ -class ExitCode extends \Ease\TWB4\Badge +class ExitCode extends \Ease\TWB5\Badge { public function __construct($exitcode, $properties = []) { diff --git a/src/MultiFlexi/Ui/FieldsForm.php b/src/MultiFlexi/Ui/FieldsForm.php index ced68416..17a8daa3 100644 --- a/src/MultiFlexi/Ui/FieldsForm.php +++ b/src/MultiFlexi/Ui/FieldsForm.php @@ -42,7 +42,7 @@ public function addInput(\MultiFlexi\ConfigField $field, string $prefix = ''): v case 'string': default: $this->addItem( - new \Ease\TWB4\FormGroup( + new \Ease\TWB5\FormGroup( $field->getName(), new \Ease\Html\InputTextTag($prefix ? $prefix.'['.$field->getCode().']' : $field->getCode(), $field->getValue()), $field->getHint(), diff --git a/src/MultiFlexi/Ui/FilterDialog.php b/src/MultiFlexi/Ui/FilterDialog.php index 13fe13bf..a8a00c6e 100644 --- a/src/MultiFlexi/Ui/FilterDialog.php +++ b/src/MultiFlexi/Ui/FilterDialog.php @@ -28,7 +28,7 @@ class FilterDialog extends \Ease\Html\DivTag */ public function __construct($tableId, $columns = []) { - $columnTabs = new \Ease\TWB4\Tabs(null, ['id' => 'filterTabs']); + $columnTabs = new \Ease\TWB5\Tabs(null, ['id' => 'filterTabs']); foreach ($columns as $columnProperies) { $columnName = $columnProperies['name']; @@ -38,9 +38,9 @@ public function __construct($tableId, $columns = []) switch ($columnProperies['type']) { case 'checkbox': $controls->addItem( - new \Ease\TWB4\FormGroup( + new \Ease\TWB5\FormGroup( $columnProperies['label'], - new \Ease\TWB4\Widgets\Toggle( + new \Ease\TWB5\Widgets\Toggle( $columnName, true, null, @@ -168,7 +168,7 @@ public function __construct($tableId, $columns = []) } } - $controls = new \Ease\TWB4\FormGroup( + $controls = new \Ease\TWB5\FormGroup( $columnProperies['label'], $input, ); @@ -180,7 +180,7 @@ public function __construct($tableId, $columns = []) } parent::__construct( - new \Ease\TWB4\Form(['name' => 'filter'.$tableId], [], $columnTabs), + new \Ease\TWB5\Form(['name' => 'filter'.$tableId], [], $columnTabs), ['id' => 'gridFilter'.$tableId, 'class' => 'filterOptions'], ); } diff --git a/src/MultiFlexi/Ui/Form/AbraFlexi.php b/src/MultiFlexi/Ui/Form/AbraFlexi.php index 0d2566fa..d0f7b29c 100644 --- a/src/MultiFlexi/Ui/Form/AbraFlexi.php +++ b/src/MultiFlexi/Ui/Form/AbraFlexi.php @@ -22,22 +22,22 @@ * * @author Vitex */ -class AbraFlexi extends \Ease\TWB4\Panel implements configForm +class AbraFlexi extends \Ease\TWB5\Panel implements configForm { public static string $logo = 'images/AbraFlexi.svg'; public function __construct() { - $header = new \Ease\TWB4\Row(); + $header = new \Ease\TWB5\Row(); $header->addColumn(6, new \Ease\Html\ATag('https://www.abra.eu/flexi/', new \Ease\Html\ImgTag(self::$logo, _('AbraFlexi'), ['height' => 50]))); $header->addColumn(6, new \Ease\Html\H3Tag(_('AbraFlexi'))); $body = new \Ease\Html\DivTag(); - $body->addItem(new \Ease\TWB4\FormGroup('ABRAFLEXI_LOGIN', new \Ease\Html\InputTextTag('ABRAFLEXI_LOGIN'), 'winstrom', _('AbraFlexi user login'))); - $body->addItem(new \Ease\TWB4\FormGroup('ABRAFLEXI_PASSWORD', new \Ease\Html\InputTextTag('ABRAFLEXI_PASSWORD'), 'winstrom', _('AbraFlexi user password'))); - $body->addItem(new \Ease\TWB4\FormGroup('ABRAFLEXI_URL', new \Ease\Html\InputTextTag('ABRAFLEXI_URL'), 'winstrom', _('AbraFlexi server URI'))); - $body->addItem(new \Ease\TWB4\FormGroup('ABRAFLEXI_COMPANY', new \Ease\Html\InputTextTag('ABRAFLEXI_COMPANY'), 'demo', _('Company to be handled'))); + $body->addItem(new \Ease\TWB5\FormGroup('ABRAFLEXI_LOGIN', new \Ease\Html\InputTextTag('ABRAFLEXI_LOGIN'), 'winstrom', _('AbraFlexi user login'))); + $body->addItem(new \Ease\TWB5\FormGroup('ABRAFLEXI_PASSWORD', new \Ease\Html\InputTextTag('ABRAFLEXI_PASSWORD'), 'winstrom', _('AbraFlexi user password'))); + $body->addItem(new \Ease\TWB5\FormGroup('ABRAFLEXI_URL', new \Ease\Html\InputTextTag('ABRAFLEXI_URL'), 'winstrom', _('AbraFlexi server URI'))); + $body->addItem(new \Ease\TWB5\FormGroup('ABRAFLEXI_COMPANY', new \Ease\Html\InputTextTag('ABRAFLEXI_COMPANY'), 'demo', _('Company to be handled'))); parent::__construct($header, 'inverse', $body, ''); } diff --git a/src/MultiFlexi/Ui/Form/FioBank.php b/src/MultiFlexi/Ui/Form/FioBank.php index 1a50d277..7e061a52 100644 --- a/src/MultiFlexi/Ui/Form/FioBank.php +++ b/src/MultiFlexi/Ui/Form/FioBank.php @@ -22,21 +22,21 @@ * * @author vitex */ -class FioBank extends \Ease\TWB4\Panel implements configForm +class FioBank extends \Ease\TWB5\Panel implements configForm { public static string $logo = 'images/FioBank.svg'; public function __construct() { - $header = new \Ease\TWB4\Row(); + $header = new \Ease\TWB5\Row(); $header->addColumn(6, new \Ease\Html\ATag('', new \Ease\Html\ImgTag(self::$logo, _('Fio Api'), ['height' => 50]))); $header->addColumn(6, new \Ease\Html\H3Tag(_('Fio Bank API'))); $body = new \Ease\Html\DivTag(); - $body->addItem(new \Ease\TWB4\FormGroup('ACCOUNT_NUMBER', new \Ease\Html\InputTextTag('ACCOUNT_NUMBER'), '', _('Fio Bank Account Number'))); - $body->addItem(new \Ease\TWB4\FormGroup('FIO_TOKEN', new \Ease\Html\InputTextTag('FIO_TOKEN'), '', _('Token for account'))); - $body->addItem(new \Ease\TWB4\FormGroup('FIO_TOKEN_NAME', new \Ease\Html\InputTextTag('FIO_TOKEN_NAME'), '', _('Name of Token used'))); + $body->addItem(new \Ease\TWB5\FormGroup('ACCOUNT_NUMBER', new \Ease\Html\InputTextTag('ACCOUNT_NUMBER'), '', _('Fio Bank Account Number'))); + $body->addItem(new \Ease\TWB5\FormGroup('FIO_TOKEN', new \Ease\Html\InputTextTag('FIO_TOKEN'), '', _('Token for account'))); + $body->addItem(new \Ease\TWB5\FormGroup('FIO_TOKEN_NAME', new \Ease\Html\InputTextTag('FIO_TOKEN_NAME'), '', _('Name of Token used'))); parent::__construct($header, 'inverse', $body, ''); } diff --git a/src/MultiFlexi/Ui/Form/Office365.php b/src/MultiFlexi/Ui/Form/Office365.php index 9122aadc..dc036ed0 100644 --- a/src/MultiFlexi/Ui/Form/Office365.php +++ b/src/MultiFlexi/Ui/Form/Office365.php @@ -22,24 +22,24 @@ * * @author vitex */ -class Office365 extends \Ease\TWB4\Panel implements configForm +class Office365 extends \Ease\TWB5\Panel implements configForm { public static $logo = 'images/Office365.svg'; public function __construct() { - $header = new \Ease\TWB4\Row(); + $header = new \Ease\TWB5\Row(); $header->addColumn(6, new \Ease\Html\ATag('https://www.office.com', new \Ease\Html\ImgTag(self::$logo, self::name(), ['height' => 50]))); $header->addColumn(6, new \Ease\Html\H3Tag(self::name())); $body = new \Ease\Html\DivTag(); - $body->addItem(new \Ease\TWB4\FormGroup('OFFICE365_USERNAME', new \Ease\Html\InputTextTag('OFFICE365_USERNAME', ''), '', _('Office 365 Username'))); - $body->addItem(new \Ease\TWB4\FormGroup('OFFICE365_PASSWORD', new \Ease\Html\InputPasswordTag('OFFICE365_PASSWORD', ''), '', _('Office 365 Password'))); - $body->addItem(new \Ease\TWB4\FormGroup('OFFICE365_CLIENTID', new \Ease\Html\InputTextTag('OFFICE365_CLIENTID', ''), '', _('Office 365 Client ID'))); - $body->addItem(new \Ease\TWB4\FormGroup('OFFICE365_SECRET', new \Ease\Html\InputTextTag('OFFICE365_SECRET', ''), '', _('Office 365 Secret'))); - $body->addItem(new \Ease\TWB4\FormGroup('OFFICE365_CLSECRET', new \Ease\Html\InputTextTag('OFFICE365_CLSECRET', ''), '', _('Office 365 Client Secret'))); - $body->addItem(new \Ease\TWB4\FormGroup('OFFICE365_TENANT', new \Ease\Html\InputTextTag('OFFICE365_TENANT', ''), '', _('Office 365 Tenant'))); + $body->addItem(new \Ease\TWB5\FormGroup('OFFICE365_USERNAME', new \Ease\Html\InputTextTag('OFFICE365_USERNAME', ''), '', _('Office 365 Username'))); + $body->addItem(new \Ease\TWB5\FormGroup('OFFICE365_PASSWORD', new \Ease\Html\InputPasswordTag('OFFICE365_PASSWORD', ''), '', _('Office 365 Password'))); + $body->addItem(new \Ease\TWB5\FormGroup('OFFICE365_CLIENTID', new \Ease\Html\InputTextTag('OFFICE365_CLIENTID', ''), '', _('Office 365 Client ID'))); + $body->addItem(new \Ease\TWB5\FormGroup('OFFICE365_SECRET', new \Ease\Html\InputTextTag('OFFICE365_SECRET', ''), '', _('Office 365 Secret'))); + $body->addItem(new \Ease\TWB5\FormGroup('OFFICE365_CLSECRET', new \Ease\Html\InputTextTag('OFFICE365_CLSECRET', ''), '', _('Office 365 Client Secret'))); + $body->addItem(new \Ease\TWB5\FormGroup('OFFICE365_TENANT', new \Ease\Html\InputTextTag('OFFICE365_TENANT', ''), '', _('Office 365 Tenant'))); parent::__construct($header, 'inverse', $body, ''); } diff --git a/src/MultiFlexi/Ui/Form/RaiffeisenBank.php b/src/MultiFlexi/Ui/Form/RaiffeisenBank.php index fa83e223..35c9d017 100644 --- a/src/MultiFlexi/Ui/Form/RaiffeisenBank.php +++ b/src/MultiFlexi/Ui/Form/RaiffeisenBank.php @@ -24,23 +24,23 @@ * * @author Vitex */ -class RaiffeisenBank extends \Ease\TWB4\Panel implements configForm +class RaiffeisenBank extends \Ease\TWB5\Panel implements configForm { public static string $logo = 'images/RaiffeisenBank.svg'; public function __construct() { - $header = new \Ease\TWB4\Row(); + $header = new \Ease\TWB5\Row(); $header->addColumn(6, new \Ease\Html\ATag('https://www.rb.cz/firmy/transakcni-bankovnictvi/elektronicke-bankovnictvi/premium-api', new \Ease\Html\ImgTag(self::$logo, _('RB Premium Api'), ['height' => 50]))); $header->addColumn(6, new \Ease\Html\H3Tag(_('Raiffeisen Bank Premium API'))); $body = new \Ease\Html\DivTag(); - $body->addItem(new \Ease\TWB4\FormGroup('ACCOUNT_NUMBER', new \Ease\Html\InputTextTag('ACCOUNT_NUMBER'), '', _('Raiffeisen Bank Account Number'))); - $body->addItem(new \Ease\TWB4\FormGroup('ACCOUNT_CURRENCY', new \Ease\Html\InputTextTag('ACCOUNT_CURRENCY'), 'CZK', _('Raiffeisen Bank Account Currency Code: CZK,EUR,USD,...'))); - $body->addItem(new \Ease\TWB4\FormGroup('CERT_FILE', new \Ease\Html\InputTextTag('CERT_FILE'), '/path/to/certificate/file.p12', _('Path to Certificate File'))); - $body->addItem(new \Ease\TWB4\FormGroup('CERT_PASS', new \Ease\Html\InputTextTag('CERT_PASS'), \Ease\Functions::randomString(20), _('Password for Certificate'))); - $body->addItem(new \Ease\TWB4\FormGroup('XIBMCLIENTID', new \Ease\Html\InputTextTag('XIBMCLIENTID'), '', new ATag('https://developers.rb.cz/premium/applications', _('X-IBM-Client-Id')))); + $body->addItem(new \Ease\TWB5\FormGroup('ACCOUNT_NUMBER', new \Ease\Html\InputTextTag('ACCOUNT_NUMBER'), '', _('Raiffeisen Bank Account Number'))); + $body->addItem(new \Ease\TWB5\FormGroup('ACCOUNT_CURRENCY', new \Ease\Html\InputTextTag('ACCOUNT_CURRENCY'), 'CZK', _('Raiffeisen Bank Account Currency Code: CZK,EUR,USD,...'))); + $body->addItem(new \Ease\TWB5\FormGroup('CERT_FILE', new \Ease\Html\InputTextTag('CERT_FILE'), '/path/to/certificate/file.p12', _('Path to Certificate File'))); + $body->addItem(new \Ease\TWB5\FormGroup('CERT_PASS', new \Ease\Html\InputTextTag('CERT_PASS'), \Ease\Functions::randomString(20), _('Password for Certificate'))); + $body->addItem(new \Ease\TWB5\FormGroup('XIBMCLIENTID', new \Ease\Html\InputTextTag('XIBMCLIENTID'), '', new ATag('https://developers.rb.cz/premium/applications', _('X-IBM-Client-Id')))); parent::__construct($header, 'inverse', $body, ''); } diff --git a/src/MultiFlexi/Ui/Form/SQLServer.php b/src/MultiFlexi/Ui/Form/SQLServer.php index 04bd5e7c..08011f50 100644 --- a/src/MultiFlexi/Ui/Form/SQLServer.php +++ b/src/MultiFlexi/Ui/Form/SQLServer.php @@ -22,25 +22,25 @@ * * @author vitex */ -class SQLServer extends \Ease\TWB4\Panel implements configForm +class SQLServer extends \Ease\TWB5\Panel implements configForm { public static string $logo = 'images/SQLServer.svg'; public function __construct() { - $header = new \Ease\TWB4\Row(); + $header = new \Ease\TWB5\Row(); $header->addColumn(6, new \Ease\Html\ATag('https://www.stormare.eu/', new \Ease\Html\ImgTag(self::$logo, self::name(), ['height' => 50]))); $header->addColumn(6, new \Ease\Html\H3Tag(self::name())); $body = new \Ease\Html\DivTag(); - $body->addItem(new \Ease\TWB4\FormGroup('DB_CONNECTION', new \Ease\Html\InputTextTag('DB_CONNECTION', 'sqlsrv'), 'sqlsrv', _('Database Connection'))); - $body->addItem(new \Ease\TWB4\FormGroup('DB_HOST', new \Ease\Html\InputTextTag('DB_HOST', '127.0.0.1'), '127.0.0.1', _('Database Host'))); - $body->addItem(new \Ease\TWB4\FormGroup('DB_PORT', new \Ease\Html\InputNumberTag('DB_PORT', 1433), 1433, _('Database Port'))); - $body->addItem(new \Ease\TWB4\FormGroup('DB_DATABASE', new \Ease\Html\InputTextTag('DB_DATABASE', 'StwPh_12345678_2023'), 'StwPh_12345678_2023', _('Database Name'))); - $body->addItem(new \Ease\TWB4\FormGroup('DB_USERNAME', new \Ease\Html\InputTextTag('DB_USERNAME', 'sa'), 'sa', _('Database Username'))); - $body->addItem(new \Ease\TWB4\FormGroup('DB_PASSWORD', new \Ease\Html\InputPasswordTag('DB_PASSWORD', 'pohodaSQLpassword'), 'pohodaSQLpassword', _('Database Password'))); - $body->addItem(new \Ease\TWB4\FormGroup('DB_SETTINGS', new \Ease\Html\InputTextTag('DB_SETTINGS', ''), '', _('Database Settings like encrypt=false'))); + $body->addItem(new \Ease\TWB5\FormGroup('DB_CONNECTION', new \Ease\Html\InputTextTag('DB_CONNECTION', 'sqlsrv'), 'sqlsrv', _('Database Connection'))); + $body->addItem(new \Ease\TWB5\FormGroup('DB_HOST', new \Ease\Html\InputTextTag('DB_HOST', '127.0.0.1'), '127.0.0.1', _('Database Host'))); + $body->addItem(new \Ease\TWB5\FormGroup('DB_PORT', new \Ease\Html\InputNumberTag('DB_PORT', 1433), 1433, _('Database Port'))); + $body->addItem(new \Ease\TWB5\FormGroup('DB_DATABASE', new \Ease\Html\InputTextTag('DB_DATABASE', 'StwPh_12345678_2023'), 'StwPh_12345678_2023', _('Database Name'))); + $body->addItem(new \Ease\TWB5\FormGroup('DB_USERNAME', new \Ease\Html\InputTextTag('DB_USERNAME', 'sa'), 'sa', _('Database Username'))); + $body->addItem(new \Ease\TWB5\FormGroup('DB_PASSWORD', new \Ease\Html\InputPasswordTag('DB_PASSWORD', 'pohodaSQLpassword'), 'pohodaSQLpassword', _('Database Password'))); + $body->addItem(new \Ease\TWB5\FormGroup('DB_SETTINGS', new \Ease\Html\InputTextTag('DB_SETTINGS', ''), '', _('Database Settings like encrypt=false'))); parent::__construct($header, 'inverse', $body, ''); } diff --git a/src/MultiFlexi/Ui/Form/mServer.php b/src/MultiFlexi/Ui/Form/mServer.php index d472154b..09985f89 100644 --- a/src/MultiFlexi/Ui/Form/mServer.php +++ b/src/MultiFlexi/Ui/Form/mServer.php @@ -22,22 +22,22 @@ * * @author Vitex */ -class mServer extends \Ease\TWB4\Panel implements configForm +class mServer extends \Ease\TWB5\Panel implements configForm { public static string $logo = 'images/mServer.svg'; public function __construct() { - $header = new \Ease\TWB4\Row(); + $header = new \Ease\TWB5\Row(); $header->addColumn(6, new \Ease\Html\ATag('https://www.stormware.eu/', new \Ease\Html\ImgTag(self::$logo, _('Stormware Pohoda'), ['height' => 50]))); $header->addColumn(6, new \Ease\Html\H3Tag(_('Stormware Pohoda'))); $body = new \Ease\Html\DivTag(); - $body->addItem(new \Ease\TWB4\FormGroup(_('Organization Number'), new \Ease\Html\InputTextTag('POHODA_ICO'), '123245678', _('Organization Number'))); - $body->addItem(new \Ease\TWB4\FormGroup(_('mServer Api Endpoint'), new \Ease\Html\InputTextTag('POHODA_URL'), 'winstrom', _('mServer Api Endpoint'))); - $body->addItem(new \Ease\TWB4\FormGroup(_('mServer Api Username'), new \Ease\Html\InputTextTag('POHODA_USERNAME'), 'http://pohoda:40000', _('mServer Api Username'))); - $body->addItem(new \Ease\TWB4\FormGroup(_('mServer Api Pasword'), new \Ease\Html\InputTextTag('POHODA_PASSWORD'), 'pohoda', _('mServer Api Pasword'))); + $body->addItem(new \Ease\TWB5\FormGroup(_('Organization Number'), new \Ease\Html\InputTextTag('POHODA_ICO'), '123245678', _('Organization Number'))); + $body->addItem(new \Ease\TWB5\FormGroup(_('mServer Api Endpoint'), new \Ease\Html\InputTextTag('POHODA_URL'), 'winstrom', _('mServer Api Endpoint'))); + $body->addItem(new \Ease\TWB5\FormGroup(_('mServer Api Username'), new \Ease\Html\InputTextTag('POHODA_USERNAME'), 'http://pohoda:40000', _('mServer Api Username'))); + $body->addItem(new \Ease\TWB5\FormGroup(_('mServer Api Pasword'), new \Ease\Html\InputTextTag('POHODA_PASSWORD'), 'pohoda', _('mServer Api Pasword'))); parent::__construct($header, 'inverse', $body, ''); } diff --git a/src/MultiFlexi/Ui/JobDotEnv.php b/src/MultiFlexi/Ui/JobDotEnv.php index c4bbae8a..d470a385 100644 --- a/src/MultiFlexi/Ui/JobDotEnv.php +++ b/src/MultiFlexi/Ui/JobDotEnv.php @@ -31,6 +31,6 @@ public function __construct(\MultiFlexi\Job $job, array $properties = []) { parent::__construct(new \Ease\Html\PreTag($job->envFile()), $properties); $this->addTagClass('ui-monospace custom-control'); - $this->addItem(new \Ease\TWB4\LinkButton('jobenv.php?id='.$job->getMyKey(), _('Download').' multiflexi_job_'.$job->getMyKey().'.env', 'info ')); + $this->addItem(new \Ease\TWB5\LinkButton('jobenv.php?id='.$job->getMyKey(), _('Download').' multiflexi_job_'.$job->getMyKey().'.env', 'info ')); } } diff --git a/src/MultiFlexi/Ui/JobHistoryTable.php b/src/MultiFlexi/Ui/JobHistoryTable.php index 201c1954..ee47cd4b 100644 --- a/src/MultiFlexi/Ui/JobHistoryTable.php +++ b/src/MultiFlexi/Ui/JobHistoryTable.php @@ -20,7 +20,7 @@ * * @author vitex */ -class JobHistoryTable extends \Ease\TWB4\Table +class JobHistoryTable extends \Ease\TWB5\Table { public \MultiFlexi\Job $jobber; public int $limit = 50; @@ -75,12 +75,12 @@ public function finalize(): void $company->setDataValue('name', $job['name']); if ($this->showIcon) { - $job['uuid'] = new \Ease\Html\ATag('app.php?id='.$job['app_id'], [new \Ease\TWB4\Badge('light', [new \Ease\Html\ImgTag(empty($job['appimage']) ? 'appimage.php?uuid='.$job['uuid'] : $job['appimage'], _($job['appname']), ['height' => 60, 'title' => $job['appname']]), ' ', _($job['appname'])])]); + $job['uuid'] = new \Ease\Html\ATag('app.php?id='.$job['app_id'], [new \Ease\TWB5\Badge('light', [new \Ease\Html\ImgTag(empty($job['appimage']) ? 'appimage.php?uuid='.$job['uuid'] : $job['appimage'], _($job['appname']), ['height' => 60, 'title' => $job['appname']]), ' ', _($job['appname'])])]); } else { unset($job['uuid']); } - $job['id'] = new \Ease\Html\ATag('job.php?id='.$job['id'], [new ExitCode($exitCode, ['style' => 'font-size: 1.0em; font-family: monospace;']), '
', new \Ease\TWB4\Badge('info', '🏁 '.$job['id'])], ['title' => _('Job Info')]); + $job['id'] = new \Ease\Html\ATag('job.php?id='.$job['id'], [new ExitCode($exitCode, ['style' => 'font-size: 1.0em; font-family: monospace;']), '
', new \Ease\TWB5\Badge('info', '🏁 '.$job['id'])], ['title' => _('Job Info')]); unset($job['appname'], $job['app_id']); if ($job['begin']) { @@ -93,7 +93,7 @@ public function finalize(): void $job['launched_by'] = [ new ExecutorImage($job['executor'], ['align' => 'right', 'height' => '50px']), - new \Ease\Html\DivTag($job['launched_by'] ? new \Ease\Html\ATag('user.php?id='.$job['launched_by'], new \Ease\TWB4\Badge('info', $job['login'])) : _('Timer')), + new \Ease\Html\DivTag($job['launched_by'] ? new \Ease\Html\ATag('user.php?id='.$job['launched_by'], new \Ease\TWB5\Badge('info', $job['login'])) : _('Timer')), new \Ease\Html\DivTag($job['schedule']), new \Ease\Html\DivTag($job['executor']), ]; diff --git a/src/MultiFlexi/Ui/JobInfo.php b/src/MultiFlexi/Ui/JobInfo.php index 4410aaa8..b45df011 100644 --- a/src/MultiFlexi/Ui/JobInfo.php +++ b/src/MultiFlexi/Ui/JobInfo.php @@ -32,7 +32,7 @@ public function __construct(\MultiFlexi\Job $job, $properties = []) $executorClass = '\\MultiFlexi\\Executor\\'.$job->getDataValue('executor'); $executorImage = new ExecutorImage($job->getDataValue('executor'), ['height' => 20]); - $jobInfoRow = new \Ease\TWB4\Row(); + $jobInfoRow = new \Ease\TWB5\Row(); $jobInfoRow->addColumn(1, [_('Exitcode').'
', new ExitCode($job->getDataValue('exitcode'), ['style' => 'font-size: 2.0em; font-family: monospace;'])]); $jobInfoRow->addColumn(4, [_('Commandline').'
', $job->getDataValue('command'), '
', $job->application->getRecordName().' v.:'.$job->getDataValue('app_version')]); $jobInfoRow->addColumn(2, [_('Scheduled').'
', @@ -52,18 +52,18 @@ public function __construct(\MultiFlexi\Job $job, $properties = []) $launcher = new \MultiFlexi\User($job->getDataValue('launched_by')); - $jobInfoRow->addColumn(1, [_('Launched by').'
', $launcher->getMyKey() ? new \Ease\Html\ATag('user.php?id='.$launcher->getMyKey(), new \Ease\TWB4\Badge('info', $launcher->getUserLogin())) : _('Timer')]); + $jobInfoRow->addColumn(1, [_('Launched by').'
', $launcher->getMyKey() ? new \Ease\Html\ATag('user.php?id='.$launcher->getMyKey(), new \Ease\TWB5\Badge('info', $launcher->getUserLogin())) : _('Timer')]); parent::__construct($jobInfoRow, $properties); - $jobTabs = new \Ease\TWB4\Tabs(); + $jobTabs = new \Ease\TWB5\Tabs(); $jobTabs->addTab('🏁 '._('Job').' '.$job->getMyKey().'', ''); // $scheduler = new \MultiFlexi\Scheduler(); // $scheduled = $scheduler->listingQuery()->where('job', $job->getMyKey())->fetch(); - $envTabs = new \Ease\TWB4\Tabs(); + $envTabs = new \Ease\TWB5\Tabs(); $envTabs->addTab(_('Overview'), new EnvironmentView($job->getEnv())); $envTabs->addTab(_('export .env'), new JobDotEnv($job)); diff --git a/src/MultiFlexi/Ui/JobScheduleForm.php b/src/MultiFlexi/Ui/JobScheduleForm.php index daa49ac3..f4eee372 100644 --- a/src/MultiFlexi/Ui/JobScheduleForm.php +++ b/src/MultiFlexi/Ui/JobScheduleForm.php @@ -20,7 +20,7 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\Form; +use Ease\TWB5\Form; use MultiFlexi\Application; use MultiFlexi\Company; @@ -51,7 +51,7 @@ public function finalize(): void { $this->timeSelect(); $this->uploadFields(); - $this->addItem(new \Ease\TWB4\SubmitButton(' '._('Save App Schedule'), 'success btn-lg')); + $this->addItem(new \Ease\TWB5\SubmitButton(' '._('Save App Schedule'), 'success btn-lg')); parent::finalize(); } diff --git a/src/MultiFlexi/Ui/LaunchButton.php b/src/MultiFlexi/Ui/LaunchButton.php index 6542314e..58ee68bb 100644 --- a/src/MultiFlexi/Ui/LaunchButton.php +++ b/src/MultiFlexi/Ui/LaunchButton.php @@ -20,7 +20,7 @@ * * @author vitex */ -class LaunchButton extends \Ease\TWB4\LinkButton +class LaunchButton extends \Ease\TWB5\LinkButton { /** * @param int $appCompanyID diff --git a/src/MultiFlexi/Ui/MainMenu.php b/src/MultiFlexi/Ui/MainMenu.php index a1d4b66a..d6a5f78c 100644 --- a/src/MultiFlexi/Ui/MainMenu.php +++ b/src/MultiFlexi/Ui/MainMenu.php @@ -61,7 +61,7 @@ public function afterAdd(): void if (\count($servers) && \count($customers) && empty($companies)) { \MultiFlexi\User::singleton()->addStatusMessage(_('No company registered yet. Please register one.'), 'warning'); $this->customersMenuEnabled($nav, $customers); - $nav->addMenuItem(new \Ease\TWB4\LinkButton('companysetup.php', '🏭 '._('Companies'), 'warning'), 'right'); + $nav->addMenuItem(new \Ease\TWB5\LinkButton('companysetup.php', '🏭 '._('Companies'), 'warning'), 'right'); } else { // We Got All // $this->customersMenuEnabled($nav, $customers); $this->companiesMenuEnabled($nav, $companies); @@ -71,7 +71,7 @@ public function afterAdd(): void if (empty($apps)) { \MultiFlexi\User::singleton()->addStatusMessage(_('No application registered yet. Please register one.'), 'warning'); - $nav->addMenuItem(new \Ease\TWB4\LinkButton('app.php', ' '._('Applications'), 'warning'), 'right'); + $nav->addMenuItem(new \Ease\TWB5\LinkButton('app.php', ' '._('Applications'), 'warning'), 'right'); } else { $this->appsMenuEnabled($nav, $apps); } @@ -157,7 +157,7 @@ public function companiesMenuEnabled($nav, $companies): void */ public function companiesMenuDisabled($nav): void { - $nav->addMenuItem(new \Ease\TWB4\LinkButton('companysetup.php', ' '._('Companies'), 'warning', ['class' => 'nav-link'])); + $nav->addMenuItem(new \Ease\TWB5\LinkButton('companysetup.php', ' '._('Companies'), 'warning', ['class' => 'nav-link'])); } /** @@ -198,7 +198,7 @@ public function adminMenuEnabled($nav): void 'requirements.php' => '🔘 '._('Requirements'), 'queue.php' => '⏳ '._('Job queue'), '' => '', - 'users.php' => new \Ease\TWB4\Widgets\FaIcon('list').' '._('Users'), + 'users.php' => '\u{1F465} '._('Users'), // Unicode icon for users ], $this->getMenuList(\Ease\Shared::user())), ); } @@ -249,7 +249,7 @@ public function searchFrom() $search = '#'; } - $searchForm = new \Ease\TWB4\Form(['class' => 'form-inline my-2 my-lg-0', 'action' => 'search.php']); + $searchForm = new \Ease\TWB5\Form(['class' => 'form-inline my-2 my-lg-0', 'action' => 'search.php']); $searchForm->addItem(new \Ease\Html\InputTextTag('search', $search, ['aria-label' => _('Search'), 'class' => 'form-control mr-sm-2', 'type' => 'search', 'placeholder' => _('Search'), 'title' => _('#number to jump on record')])); $searchForm->addItem(new SearchSelect('what', [], $search)); $searchForm->addItem(new \Ease\Html\ButtonTag(_('Search'), ['class' => 'btn btn-outline-success my-2 my-sm-0'])); diff --git a/src/MultiFlexi/Ui/PageBottom.php b/src/MultiFlexi/Ui/PageBottom.php index 016d992c..ee81380b 100644 --- a/src/MultiFlexi/Ui/PageBottom.php +++ b/src/MultiFlexi/Ui/PageBottom.php @@ -41,7 +41,7 @@ public function finalize(): void // $this->addItem(new \Ease\Html\WidgetsBrowsingHistory()); // } $this->addItem('
'); - $footrow = new \Ease\TWB4\Row(); + $footrow = new \Ease\TWB5\Row(); $author = 'MultiFlexi '.\Ease\Shared::appVersion().'
   © 2020-2025 Vitex Software'; @@ -58,7 +58,7 @@ public function finalize(): void $lnks->addItem($this->apiLinks()); } - $this->addItem(new \Ease\TWB4\Container($footrow)); + $this->addItem(new \Ease\TWB5\Container($footrow)); parent::finalize(); } diff --git a/src/MultiFlexi/Ui/RegisterCustomerForm.php b/src/MultiFlexi/Ui/RegisterCustomerForm.php index c1524f73..915294b6 100644 --- a/src/MultiFlexi/Ui/RegisterCustomerForm.php +++ b/src/MultiFlexi/Ui/RegisterCustomerForm.php @@ -48,7 +48,7 @@ public function finalize(): void _('Email'), ); - $this->addInput(new \Ease\TWB4\SubmitButton(_('Save'), 'success')); + $this->addInput(new \Ease\TWB5\SubmitButton(_('Save'), 'success')); if (null !== $this->engine->getDataValue('id')) { $this->addItem(new \Ease\Html\InputHiddenTag('id')); diff --git a/src/MultiFlexi/Ui/RegisterServerForm.php b/src/MultiFlexi/Ui/RegisterServerForm.php index 4bfb454d..d40a49be 100644 --- a/src/MultiFlexi/Ui/RegisterServerForm.php +++ b/src/MultiFlexi/Ui/RegisterServerForm.php @@ -45,7 +45,7 @@ public function afterAdd(): void _('Rest API Password'), ); - $this->addItem(new \Ease\TWB4\SubmitButton(_('Save'), 'success')); + $this->addItem(new \Ease\TWB5\SubmitButton(_('Save'), 'success')); if (null !== $this->engine->getDataValue('id')) { $this->addItem(new \Ease\Html\InputHiddenTag('id')); diff --git a/src/MultiFlexi/Ui/RequirementsOverview.php b/src/MultiFlexi/Ui/RequirementsOverview.php index 900136d7..d8a1548e 100644 --- a/src/MultiFlexi/Ui/RequirementsOverview.php +++ b/src/MultiFlexi/Ui/RequirementsOverview.php @@ -30,12 +30,12 @@ public function __construct(array $requirementsRaw, $properties = []) $formClass = '\\MultiFlexi\\Ui\\Form\\'.$req; if (class_exists($formClass)) { - $reqCard = new \Ease\TWB4\Card([ + $reqCard = new \Ease\TWB5\Card([ new \Ease\Html\ImgTag($formClass::$logo, $req, ['title' => $req, 'height' => 40, 'class' => 'card-img-top']), new \Ease\Html\DivTag(new \Ease\Html\H5Tag($formClass::name(), ['class' => 'card-body'])), ]); } else { - $reqCard = new \Ease\TWB4\Card($req); + $reqCard = new \Ease\TWB5\Card($req); } $this->addItem($reqCard); diff --git a/src/MultiFlexi/Ui/RunTemplateDotEnv.php b/src/MultiFlexi/Ui/RunTemplateDotEnv.php index 0fa5bf9d..a83620ec 100644 --- a/src/MultiFlexi/Ui/RunTemplateDotEnv.php +++ b/src/MultiFlexi/Ui/RunTemplateDotEnv.php @@ -31,6 +31,6 @@ public function __construct(\MultiFlexi\RunTemplate $runtemplate, array $propert { parent::__construct(new \Ease\Html\PreTag($runtemplate->envFile()), $properties); $this->addTagClass('ui-monospace custom-control'); - $this->addItem(new \Ease\TWB4\LinkButton('runtemplateenv.php?id='.$runtemplate->getMyKey(), _('Download').' multiflexi_runtemplate_'.$runtemplate->getMyKey().'.env', 'info ')); + $this->addItem(new \Ease\TWB5\LinkButton('runtemplateenv.php?id='.$runtemplate->getMyKey(), _('Download').' multiflexi_runtemplate_'.$runtemplate->getMyKey().'.env', 'info ')); } } diff --git a/src/MultiFlexi/Ui/RunTemplatePanel.php b/src/MultiFlexi/Ui/RunTemplatePanel.php index 8c0957da..dfe8164b 100644 --- a/src/MultiFlexi/Ui/RunTemplatePanel.php +++ b/src/MultiFlexi/Ui/RunTemplatePanel.php @@ -20,7 +20,7 @@ * * @author vitex */ -class RunTemplatePanel extends \Ease\TWB4\Panel +class RunTemplatePanel extends \Ease\TWB5\Panel { private \MultiFlexi\RunTemplate $runtemplate; @@ -31,7 +31,7 @@ public function __construct(\MultiFlexi\RunTemplate $runtemplate) { $this->runtemplate = $runtemplate; $runtemplateId = $runtemplate->getMyKey(); - $runtemplateOptions = new \Ease\TWB4\Row(); + $runtemplateOptions = new \Ease\TWB5\Row(); $intervalChoosen = $runtemplate->getDataValue('interv') ?? 'n'; $delayChoosen = (int) $runtemplate->getDataValue('delay'); $intervalChooser = new \MultiFlexi\Ui\IntervalChooser($runtemplateId.'_interval', $intervalChoosen, ['id' => $runtemplateId.'_interval', 'checked' => 'true', 'data-runtemplate' => $runtemplateId]); @@ -39,14 +39,14 @@ public function __construct(\MultiFlexi\RunTemplate $runtemplate) $delayChooser = new \MultiFlexi\Ui\DelayChooser($runtemplateId.'_delay', $delayChoosen, ['id' => $runtemplateId.'_delay', 'checked' => 'true', 'data-runtemplate' => $runtemplateId]); $executorChooser = new AppExecutorSelect($runtemplate->getApplication(), [], (string) $runtemplate->getDataValue('executor'), ['id' => $runtemplateId.'_executor', 'data-runtemplate' => $runtemplateId]); - $scheduleButton = new \Ease\TWB4\LinkButton('schedule.php?id='.$runtemplateId, [_('Manual Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-lg'); - $runtemplateOptions->addColumn(4, [_('Status'), new \Ease\TWB4\Widgets\Toggle('active', $runtemplate->getDataValue('active') ? true : false, $runtemplate->getDataValue('active') ? 'false' : 'true', ['title' => $runtemplate->getDataValue('active') ? _('Enabled') : _('Disabled'), 'data-runtemplate' => $runtemplateId, 'id' => 'enabler', 'data-on' => _('Enabled'), 'data-off' => _('Disabled')]), new \Ease\Html\SpanTag('', ['id' => 'deactivated'])]); + $scheduleButton = new \Ease\TWB5\LinkButton('schedule.php?id='.$runtemplateId, [_('Manual Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-lg'); + $runtemplateOptions->addColumn(4, [_('Status'), new \Ease\TWB5\Widgets\Toggle('active', $runtemplate->getDataValue('active') ? true : false, $runtemplate->getDataValue('active') ? 'false' : 'true', ['title' => $runtemplate->getDataValue('active') ? _('Enabled') : _('Disabled'), 'data-runtemplate' => $runtemplateId, 'id' => 'enabler', 'data-on' => _('Enabled'), 'data-off' => _('Disabled')]), new \Ease\Html\SpanTag('', ['id' => 'deactivated'])]); $runtemplateOptions->addColumn(4, $scheduleButton); if (WebPage::getRequestValue('delete', 'int') === 1) { - $deleteButton = new \Ease\TWB4\LinkButton('runtemplate.php?delete=2&id='.$runtemplateId, _('Delete !!!').'  ❌', 'danger btn-lg'); + $deleteButton = new \Ease\TWB5\LinkButton('runtemplate.php?delete=2&id='.$runtemplateId, _('Delete !!!').'  ❌', 'danger btn-lg'); } else { - $deleteButton = new \Ease\TWB4\LinkButton('runtemplate.php?delete=1&id='.$runtemplateId, _('Delete ?').'  ❌', 'warning btn-lg'); + $deleteButton = new \Ease\TWB5\LinkButton('runtemplate.php?delete=1&id='.$runtemplateId, _('Delete ?').'  ❌', 'warning btn-lg'); } $runtemplateJobs = new \MultiFlexi\Ui\RuntemplateJobsListing($runtemplate); @@ -54,7 +54,7 @@ public function __construct(\MultiFlexi\RunTemplate $runtemplate) $runtemplateOptions->addColumn(4, [_('automatically schedule in an interval').': ', $intervalChooser, '
', _('Startup delay'), $delayChooser, '
', _('Executor'), $executorChooser]); $nameInput = new \Ease\Html\ATag('#', $runtemplate->getRecordName(), ['class' => 'editable', 'style' => 'font-size: xxx-large;', 'id' => 'name', 'data-pk' => $runtemplate->getMyKey(), 'data-url' => 'runtemplatesave.php', 'data-title' => _('Update RunTemplate name')]); - $runtemplateBottom = new \Ease\TWB4\Row(); + $runtemplateBottom = new \Ease\TWB5\Row(); if ($runtemplate->getMyKey()) { $runtemplateBottom->addColumn(4, new RuntemplateCloneForm($runtemplate)); @@ -79,7 +79,7 @@ public function __construct(\MultiFlexi\RunTemplate $runtemplate) EOD); $this->addJavaScript("$('.editable').editable();", null, true); - $runtemplateTabs = new \Ease\TWB4\Tabs(); + $runtemplateTabs = new \Ease\TWB5\Tabs(); $runtemplateTabs->addTab(_('Jobs'), [$runtemplateJobs, new RunTemplateJobsLastMonthChart($runtemplate)]); $runtemplateTabs->addTab(_('Options'), [new RuntemplateConfigForm($runtemplate)]); $runtemplateTabs->addTab(_('Environment'), [new EnvironmentView($runtemplate->credentialsEnvironment()), new RunTemplateDotEnv($runtemplate)]); @@ -89,7 +89,7 @@ public function __construct(\MultiFlexi\RunTemplate $runtemplate) public function finalize(): void { - \Ease\TWB4\Part::twBootstrapize(); + \Ease\TWB5\Part::twBootstrapize(); $this->addJavaScript(<<<'EOD' diff --git a/src/MultiFlexi/Ui/RuntemplateButton.php b/src/MultiFlexi/Ui/RuntemplateButton.php index 248ab204..47842645 100644 --- a/src/MultiFlexi/Ui/RuntemplateButton.php +++ b/src/MultiFlexi/Ui/RuntemplateButton.php @@ -20,7 +20,7 @@ * * @author Vitex */ -class RuntemplateButton extends \Ease\TWB4\LinkButton +class RuntemplateButton extends \Ease\TWB5\LinkButton { // #[\Override] public function __construct(\MultiFlexi\RunTemplate $runTemplate, array $properties = []) diff --git a/src/MultiFlexi/Ui/RuntemplateCloneForm.php b/src/MultiFlexi/Ui/RuntemplateCloneForm.php index 5e2787f3..6a4dff5b 100644 --- a/src/MultiFlexi/Ui/RuntemplateCloneForm.php +++ b/src/MultiFlexi/Ui/RuntemplateCloneForm.php @@ -20,14 +20,14 @@ * * @author vitex */ -class RuntemplateCloneForm extends \Ease\TWB4\Form +class RuntemplateCloneForm extends \Ease\TWB5\Form { public function __construct(\MultiFlexi\RunTemplate $runtemplate) { $clonename = _($runtemplate->getDataValue('name') ?: $runtemplate->getAppInfo()['app_name']).' '._('Clone'); parent::__construct(['action' => 'runtemplateclone.php?id='.(string) $runtemplate->getMyKey(), 'class' => 'form-inline']); $this->addInput(new \Ease\Html\InputTextTag('clonename', $clonename), _('Save as copy').' ', $clonename); - $this->addItem(new \Ease\TWB4\SubmitButton('💕 '._('Clone'), 'success mb-2', ['type' => 'submit'])); + $this->addItem(new \Ease\TWB5\SubmitButton('💕 '._('Clone'), 'success mb-2', ['type' => 'submit'])); } /** diff --git a/src/MultiFlexi/Ui/RuntemplateConfigForm.php b/src/MultiFlexi/Ui/RuntemplateConfigForm.php index 317f50f3..73b4d235 100644 --- a/src/MultiFlexi/Ui/RuntemplateConfigForm.php +++ b/src/MultiFlexi/Ui/RuntemplateConfigForm.php @@ -51,7 +51,7 @@ public function __construct(\MultiFlexi\RunTemplate $engine) foreach ($appFields as $fieldName => $field) { if ($field->getType() === 'bool') { - $input = new \Ease\Html\DivTag(new \Ease\TWB4\Widgets\Toggle($fieldName, $field->getValue() === 'true' ? true : false, 'true', [])); + $input = new \Ease\Html\DivTag(new \Ease\TWB5\Widgets\Toggle($fieldName, $field->getValue() === 'true' ? true : false, 'true', [])); } else { $input = new \Ease\Html\InputTag($fieldName, $field->getValue(), ['type' => $field->getType()]); } @@ -93,9 +93,9 @@ public function __construct(\MultiFlexi\RunTemplate $engine) $this->addItem(new \Ease\Html\InputHiddenTag('app_id', $engine->getDataValue('app_id'))); $this->addItem(new \Ease\Html\InputHiddenTag('company_id', $engine->getDataValue('company_id'))); - $saveRow = new \Ease\TWB4\Row(); - $saveRow->addColumn(8, new \Ease\TWB4\SubmitButton(_('Save'), 'success btn-lg btn-block')); - $saveRow->addColumn(4, new \Ease\TWB4\LinkButton('actions.php?id='.$engine->getMyKey(), '🛠️ '._('Actions'), 'secondary btn-lg btn-block')); + $saveRow = new \Ease\TWB5\Row(); + $saveRow->addColumn(8, new \Ease\TWB5\SubmitButton(_('Save'), 'success btn-lg btn-block')); + $saveRow->addColumn(4, new \Ease\TWB5\LinkButton('actions.php?id='.$engine->getMyKey(), '🛠️ '._('Actions'), 'secondary btn-lg btn-block')); $this->addItem($saveRow); } diff --git a/src/MultiFlexi/Ui/RuntemplateLaunchForm.php b/src/MultiFlexi/Ui/RuntemplateLaunchForm.php index 35a051d2..305e50f3 100644 --- a/src/MultiFlexi/Ui/RuntemplateLaunchForm.php +++ b/src/MultiFlexi/Ui/RuntemplateLaunchForm.php @@ -21,7 +21,7 @@ * @copyright 2015-2024 Vitex Software * @license https://opensource.org/licenses/MIT MIT */ -class RuntemplateLaunchForm extends \Ease\TWB4\Form +class RuntemplateLaunchForm extends \Ease\TWB5\Form { /** * Application Launch Form. @@ -63,7 +63,7 @@ public function __construct(\MultiFlexi\Application $app, int $companyId) break; case 'checkbox': if (\array_key_exists($fieldKey, $env) === false) { - $this->addInput(new \Ease\TWB4\Widgets\Toggle($fieldKey, $fieldProps['defval']), $fieldKey.' ', $fieldProps['defval'], $fieldProps['description']); + $this->addInput(new \Ease\TWB5\Widgets\Toggle($fieldKey, $fieldProps['defval']), $fieldKey.' ', $fieldProps['defval'], $fieldProps['description']); } break; @@ -78,7 +78,7 @@ public function __construct(\MultiFlexi\Application $app, int $companyId) } $this->addItem(new AppExecutorSelect($app)); - $this->addItem(new \Ease\TWB4\SubmitButton([_('Launch now').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'success btn-lg btn-block ')); - $this->addItem(new \Ease\TWB4\LinkButton('schedule.php?app_id='.$appId.'&company_id='.$companyId, [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-lg')); + $this->addItem(new \Ease\TWB5\SubmitButton([_('Launch now').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'success btn-lg btn-block ')); + $this->addItem(new \Ease\TWB5\LinkButton('schedule.php?app_id='.$appId.'&company_id='.$companyId, [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-lg')); } } diff --git a/src/MultiFlexi/Ui/RuntemplatePopulateForm.php b/src/MultiFlexi/Ui/RuntemplatePopulateForm.php index ad0e9a67..580204fc 100644 --- a/src/MultiFlexi/Ui/RuntemplatePopulateForm.php +++ b/src/MultiFlexi/Ui/RuntemplatePopulateForm.php @@ -20,14 +20,14 @@ * * @author vitex */ -class RuntemplatePopulateForm extends \Ease\TWB4\Form +class RuntemplatePopulateForm extends \Ease\TWB5\Form { public function __construct(\MultiFlexi\RunTemplate $runtemplate) { parent::__construct(['action' => 'runtemplatepopulate.php?id='.(string) $runtemplate->getMyKey(), 'class' => 'form-inline']); $this->addInput(new \Ease\Html\InputFileTag('env', '.env'), _('Load .env').' ', ''); - $this->addItem(new \Ease\TWB4\SubmitButton('🚚 '._('Populate'), 'success mb-2', ['type' => 'submit'])); - $this->addItem([_('Replace Existing'), new \Ease\TWB4\Widgets\Toggle('replace')]); + $this->addItem(new \Ease\TWB5\SubmitButton('🚚 '._('Populate'), 'success mb-2', ['type' => 'submit'])); + $this->addItem([_('Replace Existing'), new \Ease\TWB5\Widgets\Toggle('replace')]); $this->setTagProperty('enctype', 'multipart/form-data'); } diff --git a/src/MultiFlexi/Ui/RuntemplateRequirementsChoser.php b/src/MultiFlexi/Ui/RuntemplateRequirementsChoser.php index 817408bd..8caa4b55 100644 --- a/src/MultiFlexi/Ui/RuntemplateRequirementsChoser.php +++ b/src/MultiFlexi/Ui/RuntemplateRequirementsChoser.php @@ -60,7 +60,7 @@ public function requirementPanel(string $requirement, \MultiFlexi\RunTemplate $r $credTypes = $helper->listingQuery()->where('company_id', $companyId)->where('class', $requirement); foreach ($credTypes as $myCredType) { - $adders->addItem(new \Ease\TWB4\LinkButton('credential.php?company_id='.$companyId.'&credential_type_id='.$myCredType['id'], '️➕ 🔐'.sprintf(_('Create credential based on %s type'), $myCredType['name']), 'info btn-sm btn-block')); + $adders->addItem(new \Ease\TWB5\LinkButton('credential.php?company_id='.$companyId.'&credential_type_id='.$myCredType['id'], '️➕ 🔐'.sprintf(_('Create credential based on %s type'), $myCredType['name']), 'info btn-sm btn-block')); } if (\array_key_exists($requirement, $this->assignedCredentials) === false) { @@ -68,7 +68,7 @@ public function requirementPanel(string $requirement, \MultiFlexi\RunTemplate $r } } else { $state = 'warning'; - $adders->addItem(new \Ease\TWB4\LinkButton('credentialtype.php?company_id='.$companyId.'&class='.$requirement, '️➕ 🔐'._('Create Credential type'), 'success btn-sm', ['title' => _('New Credential Type')])); + $adders->addItem(new \Ease\TWB5\LinkButton('credentialtype.php?company_id='.$companyId.'&class='.$requirement, '️➕ 🔐'._('Create Credential type'), 'success btn-sm', ['title' => _('New Credential Type')])); $runtemplate->addStatusMessage(sprintf(_('Please, define The Credential type using %s'), $requirement)); } } else { @@ -77,6 +77,6 @@ public function requirementPanel(string $requirement, \MultiFlexi\RunTemplate $r $adders->addItem(_('Provider not found')); } - return new \Ease\TWB4\Panel(new \Ease\Html\StrongTag($requirement), $state, $widget, $adders); + return new \Ease\TWB5\Panel(new \Ease\Html\StrongTag($requirement), $state, $widget, $adders); } } diff --git a/src/MultiFlexi/Ui/ServicesForCompanyForm.php b/src/MultiFlexi/Ui/ServicesForCompanyForm.php index a86b7ce2..986d4aaf 100644 --- a/src/MultiFlexi/Ui/ServicesForCompanyForm.php +++ b/src/MultiFlexi/Ui/ServicesForCompanyForm.php @@ -15,8 +15,8 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\Form; -use Ease\TWB4\Part; +use Ease\TWB5\Form; +use Ease\TWB5\Part; use MultiFlexi\Application; use MultiFlexi\Company; use MultiFlexi\RunTemplate; @@ -47,7 +47,7 @@ public function __construct($company, $tagProperties = []) $assigned = $glue->getActiveRunTemplatesForCompany($companyID); parent::__construct($tagProperties); $jobber = new \MultiFlexi\Job(); - $appTabs = new \Ease\TWB4\Tabs(); + $appTabs = new \Ease\TWB5\Tabs(); foreach ($platformApps as $appData) { $apper->setData($appData); diff --git a/src/MultiFlexi/Ui/UserForm.php b/src/MultiFlexi/Ui/UserForm.php index f896ae10..8cfc4789 100644 --- a/src/MultiFlexi/Ui/UserForm.php +++ b/src/MultiFlexi/Ui/UserForm.php @@ -17,8 +17,8 @@ use Ease\Html\InputHiddenTag; use Ease\Html\InputTag; -use Ease\TWB4\Form; -use Ease\TWB4\SubmitButton; +use Ease\TWB5\Form; +use Ease\TWB5\SubmitButton; use MultiFlexi\User; class UserForm extends Form diff --git a/src/MultiFlexi/Ui/WebPage.php b/src/MultiFlexi/Ui/WebPage.php index 99252418..de917bd3 100644 --- a/src/MultiFlexi/Ui/WebPage.php +++ b/src/MultiFlexi/Ui/WebPage.php @@ -20,7 +20,7 @@ * * @author vitex */ -class WebPage extends \Ease\TWB4\WebPage +class WebPage extends \Ease\TWB5\WebPage { /** * Where to look for bootstrap style sheet. @@ -32,7 +32,7 @@ class WebPage extends \Ease\TWB4\WebPage /** * Put page contents here. */ - public \Ease\TWB4\Container $container; + public \Ease\TWB5\Container $container; /** * Current Customer. @@ -47,7 +47,7 @@ class WebPage extends \Ease\TWB4\WebPage public function __construct(string $pageTitle = '') { parent::__construct($pageTitle); - $this->container = $this->addItem(new \Ease\TWB4\Container()); + $this->container = $this->addItem(new \Ease\TWB5\Container()); $this->container->setTagClass('container-fluid'); $this->addCSS(<<<'EOD' diff --git a/src/MultiFlexi/Ui/Wizard.php b/src/MultiFlexi/Ui/Wizard.php index 5c13a86f..eaba4c60 100644 --- a/src/MultiFlexi/Ui/Wizard.php +++ b/src/MultiFlexi/Ui/Wizard.php @@ -20,7 +20,7 @@ * * @author Vitex */ -class Wizard extends \Ease\TWB4\Panel +class Wizard extends \Ease\TWB5\Panel { public $step = 0; diff --git a/src/about.php b/src/about.php index fab99b37..f290faa7 100644 --- a/src/about.php +++ b/src/about.php @@ -20,11 +20,11 @@ WebPage::singleton()->addItem(new PageTop(_('About'))); $infoBlock = WebPage::singleton()->container->addItem( - new \Ease\TWB4\Panel( + new \Ease\TWB5\Panel( _('About Program'), 'default', null, - new \Ease\TWB4\LinkButton( + new \Ease\TWB5\LinkButton( 'http://vitexsoftware.com/', _('Vitex Software'), 'info', diff --git a/src/actionmodules.php b/src/actionmodules.php index e4e7fc21..2311be60 100644 --- a/src/actionmodules.php +++ b/src/actionmodules.php @@ -27,7 +27,7 @@ $modConf->saveFormData($_POST); } -WebPage::singleton()->container->addItem(new \Ease\TWB4\Panel(new \Ease\Html\H2Tag(_('Installed Action Modules')), 'default', new ActionsAdministration($modConf))); +WebPage::singleton()->container->addItem(new \Ease\TWB5\Panel(new \Ease\Html\H2Tag(_('Installed Action Modules')), 'default', new ActionsAdministration($modConf))); WebPage::singleton()->addItem(new PageBottom()); diff --git a/src/actions.php b/src/actions.php index 65a2bde8..0ad65f91 100644 --- a/src/actions.php +++ b/src/actions.php @@ -15,7 +15,7 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\WebPage; +use Ease\TWB5\WebPage; use MultiFlexi\Application; use MultiFlexi\RunTemplate; @@ -52,17 +52,17 @@ $appPanel->headRow->addItem(new RuntemplateButton($runTemplater)); -$actionsRow = new \Ease\TWB4\Tabs(); +$actionsRow = new \Ease\TWB5\Tabs(); $actionsRow->addTab(_('Success Actions'), new ActionsChooser('success', $app, $succesActions), (bool) $periodcalTaskInfo['success']); $actionsRow->addTab(_('Fail Actions'), new ActionsChooser('fail', $app, $failActions), (bool) $periodcalTaskInfo['fail']); $appPanel->addItem($actionsRow); -$jobtempform = new \Ease\TWB4\Form(); +$jobtempform = new \Ease\TWB5\Form(); $jobtempform->addItem(new \Ease\Html\InputHiddenTag('app', $periodcalTaskInfo['app_id'])); $jobtempform->addItem(new \Ease\Html\InputHiddenTag('company_id', $periodcalTaskInfo['company_id'])); $jobtempform->addItem(new \Ease\Html\InputHiddenTag('interval', $periodcalTaskInfo['interv'])); $jobtempform->addItem($appPanel); -$jobtempform->addItem(new \Ease\TWB4\SubmitButton('🍏 '._('Apply'), 'primary btn-lg btn-block')); +$jobtempform->addItem(new \Ease\TWB5\SubmitButton('🍏 '._('Apply'), 'primary btn-lg btn-block')); WebPage::singleton()->container->addItem(new CompanyPanel(new \MultiFlexi\Company($periodcalTaskInfo['company_id']), $jobtempform)); diff --git a/src/adhoc.php b/src/adhoc.php index 3d24f79a..2a8bf488 100644 --- a/src/adhoc.php +++ b/src/adhoc.php @@ -32,7 +32,7 @@ WebPage::singleton()->addItem(new PageTop(_('Applications used by Company'))); -$addAppForm = new \Ease\TWB4\Form(); +$addAppForm = new \Ease\TWB5\Form(); $addAppForm->addItem(new \Ease\Html\InputHiddenTag('company_id', $companer->getMyKey())); $assignedRaw = $companyApp->getAssigned()->fetchAll('app_id'); @@ -41,7 +41,7 @@ $apper = new \MultiFlexi\Application(); -$launchTabs = new \Ease\TWB4\Tabs(); +$launchTabs = new \Ease\TWB5\Tabs(); foreach ($assigned as $assignedAppId) { $apper->loadFromSQL($assignedAppId); diff --git a/src/app.php b/src/app.php index 3483853a..032ac7cf 100644 --- a/src/app.php +++ b/src/app.php @@ -17,10 +17,10 @@ use Ease\Html\ATag; use Ease\Html\SmallTag; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Row; -use Ease\TWB4\Table; -use Ease\TWB4\Tabs; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Row; +use Ease\TWB5\Table; +use Ease\TWB5\Tabs; use MultiFlexi\Application; use MultiFlexi\Conffield; use MultiFlexi\Job; diff --git a/src/companies.php b/src/companies.php index 6243c1f5..7ab213c5 100644 --- a/src/companies.php +++ b/src/companies.php @@ -23,7 +23,7 @@ $companies = new Company(); WebPage::singleton()->addItem(new PageTop(_('Company list'))); -$companyTable = new \Ease\TWB4\Table(); +$companyTable = new \Ease\TWB5\Table(); foreach ($companies->listingQuery() as $companyInfo) { $companies->setData($companyInfo); @@ -33,10 +33,10 @@ $companyColumns['name'] = new \Ease\Html\ATag('company.php?id='.$companyId, $companyInfo['name']); $companyColumns['ic'] = $companyInfo['ic']; - $companyColumns['setup'] = new \Ease\TWB4\LinkButton('companysetup.php?id='.$companyId, '🛠️ '._('Setup'), 'secondary btn-lg btn-block '); - $companyColumns['tasks'] = new \Ease\TWB4\LinkButton('tasks.php?company_id='.$companyId, '🔧 '._('Tasks'), 'secondary btn-lg btn-block'); - $companyColumns['apps'] = new \Ease\TWB4\LinkButton('companyapps.php?company_id='.$companyId, '📌 '._('Applications'), 'secondary btn-lg btn-block'); - $companyColumns['delete'] = new \Ease\TWB4\LinkButton('companydelete.php?id='.$companyId, '☠️ '._('Delete'), 'danger'); + $companyColumns['setup'] = new \Ease\TWB5\LinkButton('companysetup.php?id='.$companyId, '🛠️ '._('Setup'), 'secondary btn-lg btn-block '); + $companyColumns['tasks'] = new \Ease\TWB5\LinkButton('tasks.php?company_id='.$companyId, '🔧 '._('Tasks'), 'secondary btn-lg btn-block'); + $companyColumns['apps'] = new \Ease\TWB5\LinkButton('companyapps.php?company_id='.$companyId, '📌 '._('Applications'), 'secondary btn-lg btn-block'); + $companyColumns['delete'] = new \Ease\TWB5\LinkButton('companydelete.php?id='.$companyId, '☠️ '._('Delete'), 'danger'); $companyTable->addRowColumns($companyColumns); } diff --git a/src/company.php b/src/company.php index 81b82de7..14ea9509 100644 --- a/src/company.php +++ b/src/company.php @@ -54,24 +54,24 @@ } $jobs = $jobber->listingQuery()->select(['apps.name AS appname', 'apps.uuid AS uuid', 'job.id', 'begin', 'exitcode', 'launched_by', 'job.executor', 'job.schedule_type', 'login', 'job.app_id AS app_id', 'runtemplate.id AS runtemplate_id', 'runtemplate.name AS runtemplate_name', 'schedule AS scheduled'], true)->leftJoin('apps ON apps.id = job.app_id')->leftJoin('user ON user.id = job.launched_by')->leftJoin('runtemplate ON runtemplate.id = job.runtemplate_id')->where('job.company_id', $companies->getMyKey())->limit(20)->orderBy('job.id DESC')->where($condition)->fetchAll(); -$jobList = new \Ease\TWB4\Table(); +$jobList = new \Ease\TWB5\Table(); $jobList->addRowHeaderColumns([_('Run template').' / '._('Application'), _('Job ID'), _('Launch time'), _('Launcher'), _('Schedule Launch')]); foreach ($jobs as $job) { $job['appname'] = ''.(empty($job['runtemplate_name']) ? '#'.$job['runtemplate_id'] : $job['runtemplate_name']).' / '.$job['appname']; unset($job['runtemplate_name']); - // $job['launch'] = new \Ease\TWB4\LinkButton('launch.php?id='.$job['runtemplate_id'].'&app_id='.$job['app_id'].'&company_id='.$companies->getMyKey(), [_('Launch').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'warning btn-lg'); + // $job['launch'] = new \Ease\TWB5\LinkButton('launch.php?id='.$job['runtemplate_id'].'&app_id='.$job['app_id'].'&company_id='.$companies->getMyKey(), [_('Launch').'  ', new \Ease\Html\ImgTag('images/rocket.svg', _('Launch'), ['height' => '30px'])], 'warning btn-lg'); if ($job['begin']) { - $job['schedule'] = new \Ease\TWB4\LinkButton('schedule.php?id='.$job['runtemplate_id'].'&app_id='.$job['app_id'].'&company_id='.$companies->getMyKey(), [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'light btn-block'); + $job['schedule'] = new \Ease\TWB5\LinkButton('schedule.php?id='.$job['runtemplate_id'].'&app_id='.$job['app_id'].'&company_id='.$companies->getMyKey(), [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'light btn-block'); } else { - $job['schedule'] = new \Ease\TWB4\LinkButton('schedule.php?cancel='.$job['id'].'&templateid='.$job['runtemplate_id'].'&app_id='.$job['app_id'].'&company_id='.$companies->getMyKey(), [_('Cancel').'  ', new \Ease\Html\ImgTag('images/cancel.svg', _('Cancel'), ['height' => '30px'])], 'warning'); + $job['schedule'] = new \Ease\TWB5\LinkButton('schedule.php?cancel='.$job['id'].'&templateid='.$job['runtemplate_id'].'&app_id='.$job['app_id'].'&company_id='.$companies->getMyKey(), [_('Cancel').'  ', new \Ease\Html\ImgTag('images/cancel.svg', _('Cancel'), ['height' => '30px'])], 'warning'); } - $job['uuid'] = new ATag('runtemplate.php?id='.$job['runtemplate_id'], [new \Ease\TWB4\Badge('light', [new \Ease\Html\ImgTag('appimage.php?uuid='.$job['uuid'], $job['appname'], ['height' => 50, 'title' => $job['appname']]), ' ', $job['appname']])]); + $job['uuid'] = new ATag('runtemplate.php?id='.$job['runtemplate_id'], [new \Ease\TWB5\Badge('light', [new \Ease\Html\ImgTag('appimage.php?uuid='.$job['uuid'], $job['appname'], ['height' => 50, 'title' => $job['appname']]), ' ', $job['appname']])]); unset($job['appname'], $job['runtemplate_id'], $job['app_id']); - $job['id'] = new \Ease\Html\ATag('job.php?id='.$job['id'], [new ExitCode($job['exitcode'], ['style' => 'font-size: 1.0em; font-family: monospace;']), '
', new \Ease\TWB4\Badge('info', '🏁 '.$job['id'])], ['title' => _('Job Info')]); + $job['id'] = new \Ease\Html\ATag('job.php?id='.$job['id'], [new ExitCode($job['exitcode'], ['style' => 'font-size: 1.0em; font-family: monospace;']), '
', new \Ease\TWB5\Badge('info', '🏁 '.$job['id'])], ['title' => _('Job Info')]); if ($job['begin']) { $job['begin'] = [$job['begin'], '
', new \Ease\Html\SmallTag(new \Ease\Html\Widgets\LiveAge(new \DateTime($job['begin'])))]; @@ -81,7 +81,7 @@ $job['launched_by'] = [ new ExecutorImage($job['executor'], ['align' => 'right', 'height' => '50px']), - new \Ease\Html\DivTag($job['launched_by'] ? new \Ease\Html\ATag('user.php?id='.$job['launched_by'], new \Ease\TWB4\Badge('info', $job['login'])) : _('Timer')), + new \Ease\Html\DivTag($job['launched_by'] ? new \Ease\Html\ATag('user.php?id='.$job['launched_by'], new \Ease\TWB5\Badge('info', $job['login'])) : _('Timer')), new \Ease\Html\DivTag(\MultiFlexi\RunTemplate::getIntervalEmoji(\MultiFlexi\RunTemplate::intervalToCode((string) $job['schedule_type'])).' '.$job['scheduled']), ]; unset($job['executor'], $job['scheduled'], $job['login'], $job['schedule_type'], $job['exitcode']); @@ -130,7 +130,7 @@ ['style' => 'margin-top: 20px;'], ); -$graphRow = new \Ease\TWB4\Row(); +$graphRow = new \Ease\TWB5\Row(); $graphRow->addColumn(2, [$imageTag, $legend]); $graphRow->addColumn(10, $companyJobChart); diff --git a/src/companyapp.php b/src/companyapp.php index f4b21097..693dc19c 100644 --- a/src/companyapp.php +++ b/src/companyapp.php @@ -21,9 +21,9 @@ use Ease\Html\ImgTag; use Ease\Html\SmallTag; use Ease\Html\SpanTag; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Row; -use Ease\TWB4\Table; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Row; +use Ease\TWB5\Table; use MultiFlexi\Application; use MultiFlexi\Company; use MultiFlexi\Job; diff --git a/src/companyapps.php b/src/companyapps.php index 3ecf1f17..cbd3e54a 100644 --- a/src/companyapps.php +++ b/src/companyapps.php @@ -36,7 +36,7 @@ WebPage::singleton()->addItem(new PageTop(_('Applications used by Company'))); -$addAppForm = new \Ease\TWB4\Form(); +$addAppForm = new \Ease\TWB5\Form(); $addAppForm->addItem(new \Ease\Html\InputHiddenTag('company_id', $companer->getMyKey())); $assignedRaw = $companyApp->getAssigned()->fetchAll('app_id'); @@ -47,13 +47,13 @@ $addAppForm->addItem($chooseApp); -$addAppForm->addItem(new \Ease\TWB4\SubmitButton('🍏 '._('Apply'), 'success btn-lg btn-block')); +$addAppForm->addItem(new \Ease\TWB5\SubmitButton('🍏 '._('Apply'), 'success btn-lg btn-block')); WebPage::singleton()->container->addItem(new CompanyPanel($companer, $addAppForm)); // $apper = new \MultiFlexi\Application(); // -// $launchTabs = new \Ease\TWB4\Tabs(); +// $launchTabs = new \Ease\TWB5\Tabs(); // foreach ($assigned as $assignedAppId) { // $apper->loadFromSQL($assignedAppId); // $launchTabs->addTab($apper->getRecordName(), new AppInfo($apper, $companer->getMyKey())); diff --git a/src/companycreds.php b/src/companycreds.php index c9b424ab..71442f31 100644 --- a/src/companycreds.php +++ b/src/companycreds.php @@ -31,7 +31,7 @@ $kredenc->setDataValue('company_id', $companies->getMyKey()); $creds = $kredenc->listingQuery()->where(['company_id' => $companies->getMyKey()])->fetchAll(); -$credList = new \Ease\TWB4\Table(); +$credList = new \Ease\TWB5\Table(); $credList->addRowHeaderColumns(['', _('Name'), _('Type'), _('Used by'), _('Convert')]); // Added new column header $rtplcr = new \MultiFlexi\RunTplCreds(); @@ -42,9 +42,9 @@ $convertUrl = 'credup.php?id='.$crd['id']; if ($crd['credential_type_id'] === 0) { - $crd['convert'] = new \Ease\TWB4\LinkButton($convertUrl, _('Convert to dynamic Credential type'), 'warning btn-sm'); + $crd['convert'] = new \Ease\TWB5\LinkButton($convertUrl, _('Convert to dynamic Credential type'), 'warning btn-sm'); } else { - $crd['convert'] = new \Ease\TWB4\LinkButton('credentialtype.php?id='.$crd['credential_type_id'], _('🔑'), 'success btn-sm'); + $crd['convert'] = new \Ease\TWB5\LinkButton('credentialtype.php?id='.$crd['credential_type_id'], _('🔑'), 'success btn-sm'); } $class = '\\MultiFlexi\\Ui\\Form\\'.$crd['formType']; @@ -67,7 +67,7 @@ if ($lastJobInfo) { $companyAppStatus = new \Ease\Html\ATag('job.php?id='.$lastJobInfo[0]['id'], new ExitCode($lastJobInfo[0]['exitcode'], ['style' => 'font-size: 1.0em; font-family: monospace;']), ['class' => 'btn btn-inverse btn-sm']); } else { - $companyAppStatus = new \Ease\TWB4\Badge('disabled', '🪤', ['style' => 'font-size: 1.0em; font-family: monospace;']); + $companyAppStatus = new \Ease\TWB5\Badge('disabled', '🪤', ['style' => 'font-size: 1.0em; font-family: monospace;']); } $runtemplatesDiv->addItem(new \Ease\Html\SpanTag([new \Ease\Html\ATag('runtemplate.php?id='.$runtemplateData['id'], '⚗️#'.$runtemplateData['id'], ['class' => 'btn btn-inverse btn-sm', 'title' => $runtemplateData['name']]), $companyAppStatus], ['class' => 'btn-group', 'role' => 'group'])); @@ -82,7 +82,7 @@ } $companyPanelContents[] = $credList; -$bottomLine = new \Ease\TWB4\LinkButton('credential.php?company_id='.$companies->getMyKey(), '️➕ 🔐'._('Create'), 'info btn-lg btn-block disabled'); +$bottomLine = new \Ease\TWB5\LinkButton('credential.php?company_id='.$companies->getMyKey(), '️➕ 🔐'._('Create'), 'info btn-lg btn-block disabled'); WebPage::singleton()->container->addItem(new CompanyPanel($companies, $companyPanelContents, $bottomLine)); WebPage::singleton()->addItem(new PageBottom('company/'.$companies->getMyKey())); diff --git a/src/companydelete.php b/src/companydelete.php index b4995453..e7806360 100644 --- a/src/companydelete.php +++ b/src/companydelete.php @@ -16,7 +16,7 @@ namespace MultiFlexi\Ui; use Ease\Html\ATag; -use Ease\TWB4\Row; +use Ease\TWB5\Row; use MultiFlexi\Company; require_once './init.php'; diff --git a/src/companyenv.php b/src/companyenv.php index 50f9f987..b5e4d362 100644 --- a/src/companyenv.php +++ b/src/companyenv.php @@ -18,9 +18,9 @@ require_once './init.php'; WebPage::singleton()->onlyForLogged(); $result = false; -$name = \Ease\TWB4\WebPage::getRequestValue('name'); -$value = \Ease\TWB4\WebPage::getRequestValue('value'); -$pk = \Ease\TWB4\WebPage::getRequestValue('pk', 'int'); +$name = \Ease\TWB5\WebPage::getRequestValue('name'); +$value = \Ease\TWB5\WebPage::getRequestValue('value'); +$pk = \Ease\TWB5\WebPage::getRequestValue('pk', 'int'); if (null !== $pk) { $companyEnver = new \MultiFlexi\CompanyEnv(); diff --git a/src/companysetup.php b/src/companysetup.php index feb90cb7..047a2814 100644 --- a/src/companysetup.php +++ b/src/companysetup.php @@ -16,7 +16,7 @@ namespace MultiFlexi\Ui; use Ease\Html\ATag; -use Ease\TWB4\Row; +use Ease\TWB5\Row; use MultiFlexi\Company; require_once './init.php'; @@ -73,7 +73,7 @@ $rightColumn[] = new EnvironmentEditor($companyEnver->getEnvFields()); $instanceRow->addColumn(8, $rightColumn); -WebPage::singleton()->container->addItem(new CompanyPanel($companies, $instanceRow, $companies->getMyKey() ? new \Ease\TWB4\LinkButton('companydelete.php?id='.$companies->getMyKey(), '☠️ '._('Delete company'), 'danger') : '')); +WebPage::singleton()->container->addItem(new CompanyPanel($companies, $instanceRow, $companies->getMyKey() ? new \Ease\TWB5\LinkButton('companydelete.php?id='.$companies->getMyKey(), '☠️ '._('Delete company'), 'danger') : '')); WebPage::singleton()->addItem(new PageBottom()); WebPage::singleton()->draw(); diff --git a/src/conffield.php b/src/conffield.php index 3c39c50c..1fae520b 100644 --- a/src/conffield.php +++ b/src/conffield.php @@ -16,7 +16,7 @@ namespace MultiFlexi\Ui; use Ease\Html\ATag; -use Ease\TWB4\Row; +use Ease\TWB5\Row; use MultiFlexi\Conffield; require_once './init.php'; @@ -75,15 +75,15 @@ foreach ($conffields->appConfigs($appId) as $configInfo) { $cnfRow = new Row(); $cnfRow->addColumn(2, $configInfo['type']); - $cnfRow->addColumn(4, new ATag('conffield.php?app_id='.$appId.'&id='.$configInfo['id'], new \Ease\TWB4\Badge('success', $configInfo['keyname']))); + $cnfRow->addColumn(4, new ATag('conffield.php?app_id='.$appId.'&id='.$configInfo['id'], new \Ease\TWB5\Badge('success', $configInfo['keyname']))); $cnfRow->addColumn(4, $configInfo['description']); - $cnfRow->addColumn(2, new \Ease\TWB4\LinkButton('?app_id='.$appId.'&delete='.$configInfo['id'], 'X', 'danger btn-sm')); + $cnfRow->addColumn(2, new \Ease\TWB5\LinkButton('?app_id='.$appId.'&delete='.$configInfo['id'], 'X', 'danger btn-sm')); $cfgs->addItemSmart($cnfRow); } -$cfgs->addItem(new \Ease\TWB4\LinkButton('app.php?id='.WebPage::getRequestValue('app_id', 'int'), [_('Back to app'), $appliacation->getRecordName()], 'warning')); +$cfgs->addItem(new \Ease\TWB5\LinkButton('app.php?id='.WebPage::getRequestValue('app_id', 'int'), [_('Back to app'), $appliacation->getRecordName()], 'warning')); -$editorRow = new \Ease\TWB4\Row(); +$editorRow = new \Ease\TWB5\Row(); $editorRow->addColumn(8, $instanceRow); $editorRow->addColumn(2, new AppLogo($appliacation)); diff --git a/src/createaccount.php b/src/createaccount.php index 5a8e0085..21ba6e66 100644 --- a/src/createaccount.php +++ b/src/createaccount.php @@ -147,7 +147,7 @@ WebPage::singleton()->addItem(new PageTop(_('New Administrator'))); -$regFace = new \Ease\TWB4\Panel(_('Singn On')); +$regFace = new \Ease\TWB5\Panel(_('Singn On')); $regForm = $regFace->addItem(new ColumnsForm(new \MultiFlexi\User())); diff --git a/src/credentialclone.php b/src/credentialclone.php index 34fc0645..13583859 100644 --- a/src/credentialclone.php +++ b/src/credentialclone.php @@ -23,7 +23,7 @@ $credential = new Credential(WebPage::getRequestValue('id', 'int')); $originalEnv = $credential->getData(); -$cloneName = \Ease\TWB4\WebPage::getRequestValue('clonename'); +$cloneName = \Ease\TWB5\WebPage::getRequestValue('clonename'); $credential->unsetDataValue($credential->getKeyColumn()); $credential->setDataValue('name', $cloneName); diff --git a/src/credtypes.php b/src/credtypes.php index 8388957f..bd92d29e 100644 --- a/src/credtypes.php +++ b/src/credtypes.php @@ -21,7 +21,7 @@ WebPage::singleton()->addItem(new PageTop(_('MultiFlexi - Credential Type helpers'))); -WebPage::singleton()->container->addItem(new \Ease\TWB4\Panel(new \Ease\Html\H2Tag(_('Installed CredentialType helper Modules')), 'default', new CtHelpersListing())); +WebPage::singleton()->container->addItem(new \Ease\TWB5\Panel(new \Ease\Html\H2Tag(_('Installed CredentialType helper Modules')), 'default', new CtHelpersListing())); WebPage::singleton()->addItem(new PageBottom()); diff --git a/src/credup.php b/src/credup.php index 026d1b0c..97a4bdfb 100644 --- a/src/credup.php +++ b/src/credup.php @@ -18,7 +18,7 @@ require_once './init.php'; use Ease\Html\DivTag; -use Ease\TWB4\Panel; +use Ease\TWB5\Panel; use MultiFlexi\Credential; use MultiFlexi\CredentialType; diff --git a/src/customer.php b/src/customer.php index 88488ed0..1526a510 100644 --- a/src/customer.php +++ b/src/customer.php @@ -16,8 +16,8 @@ namespace MultiFlexi\Ui; use Ease\Html\ATag; -use Ease\TWB4\Panel; -use Ease\TWB4\Row; +use Ease\TWB5\Panel; +use Ease\TWB5\Row; use MultiFlexi\Customer; require_once './init.php'; diff --git a/src/customers.php b/src/customers.php index 102fcab1..3da61226 100644 --- a/src/customers.php +++ b/src/customers.php @@ -15,7 +15,7 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\Container; +use Ease\TWB5\Container; use MultiFlexi\Customer; require_once './init.php'; diff --git a/src/custserviceconfig.php b/src/custserviceconfig.php index a012c5df..12f88c72 100644 --- a/src/custserviceconfig.php +++ b/src/custserviceconfig.php @@ -53,7 +53,7 @@ $appPanel = new ApplicationPanel($app, new CustomAppConfigForm($configurator)); -$runTemplateButton = new \Ease\TWB4\LinkButton('runtemplate.php?id='.$runTemplater->getMyKey(), '⚗️ '._('Run Template'), 'dark btn-lg btn-block'); +$runTemplateButton = new \Ease\TWB5\LinkButton('runtemplate.php?id='.$runTemplater->getMyKey(), '⚗️ '._('Run Template'), 'dark btn-lg btn-block'); $appPanel->headRow->addColumn(2, $runTemplateButton); WebPage::singleton()->container->addItem(new CompanyPanel($company, $appPanel)); diff --git a/src/envmods.php b/src/envmods.php index 8dffc3c1..0bf6a7ba 100644 --- a/src/envmods.php +++ b/src/envmods.php @@ -21,7 +21,7 @@ WebPage::singleton()->addItem(new PageTop(_('MultiFlexi - Environment Modules'))); -WebPage::singleton()->container->addItem(new \Ease\TWB4\Panel(new \Ease\Html\H2Tag(_('Installed Environment Modules')), 'default', new EnvModulesListing())); +WebPage::singleton()->container->addItem(new \Ease\TWB5\Panel(new \Ease\Html\H2Tag(_('Installed Environment Modules')), 'default', new EnvModulesListing())); WebPage::singleton()->addItem(new PageBottom()); diff --git a/src/executors.php b/src/executors.php index 7fe19026..bea51b66 100644 --- a/src/executors.php +++ b/src/executors.php @@ -21,7 +21,7 @@ WebPage::singleton()->addItem(new PageTop(_('MultiFlexi - Executor Modules'))); -WebPage::singleton()->container->addItem(new \Ease\TWB4\Panel(new \Ease\Html\H2Tag(_('Installed Executor Modules')), 'default', new ExecutorsListing())); +WebPage::singleton()->container->addItem(new \Ease\TWB5\Panel(new \Ease\Html\H2Tag(_('Installed Executor Modules')), 'default', new ExecutorsListing())); WebPage::singleton()->addItem(new PageBottom()); diff --git a/src/index.php b/src/index.php index 4b98c0c1..5fb2f56b 100644 --- a/src/index.php +++ b/src/index.php @@ -15,7 +15,7 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\LinkButton; +use Ease\TWB5\LinkButton; require_once './init.php'; @@ -30,7 +30,7 @@ \Ease\Shared::user()->addStatusMessage($exc->getMessage()); } -$imageRow = new \Ease\TWB4\Row(); +$imageRow = new \Ease\TWB5\Row(); $imageRow->addTagClass('justify-content-md-center'); $imageRow->addColumn(4); diff --git a/src/intervals.php b/src/intervals.php index c8f21c05..ad7c930a 100644 --- a/src/intervals.php +++ b/src/intervals.php @@ -21,21 +21,21 @@ WebPage::singleton()->addItem(new PageTop(_('Intervals Setup'))); -$addAppForm = new \Ease\TWB4\Form(); +$addAppForm = new \Ease\TWB5\Form(); $addAppForm->addItem(new \Ease\Html\H1Tag(_('Periodical tasks'))); -$periodSelectorsRow = new \Ease\TWB4\Row(); +$periodSelectorsRow = new \Ease\TWB5\Row(); $content = new \Ease\Html\InputTag('x'); $helptext = 'h'; $periodSelectorsRow->addColumn(2, new \Ease\Html\ImgTag('images/stopwatch.svg', _('StopWatch'), ['class' => 'img-fluid'])); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Hourly'), 'default', new \Ease\TWB4\FormGroup(_('Minute'), $content, 1, _('At which minute to run hourly jobs?')))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Daily'), 'default', new \Ease\TWB4\FormGroup(_('Hour'), $content, 1, _('At which hour to run daily jobs?')))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Weekly'), 'default', new \Ease\TWB4\FormGroup(_('Day'), $content, 1, _('Which day of the week to run the weekly tasks?')))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Monthly'), 'default', new \Ease\TWB4\FormGroup(_('Day'), $content, 1, _('Which day of the month to run the monthly tasks?')))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Yearly'), 'default', new \Ease\TWB4\FormGroup(_('Day'), $content, 1, _('Which day of the year to run the yearly tasks?')))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Hourly'), 'default', new \Ease\TWB5\FormGroup(_('Minute'), $content, 1, _('At which minute to run hourly jobs?')))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Daily'), 'default', new \Ease\TWB5\FormGroup(_('Hour'), $content, 1, _('At which hour to run daily jobs?')))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Weekly'), 'default', new \Ease\TWB5\FormGroup(_('Day'), $content, 1, _('Which day of the week to run the weekly tasks?')))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Monthly'), 'default', new \Ease\TWB5\FormGroup(_('Day'), $content, 1, _('Which day of the month to run the monthly tasks?')))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Yearly'), 'default', new \Ease\TWB5\FormGroup(_('Day'), $content, 1, _('Which day of the year to run the yearly tasks?')))); // // $assignedRaw = $companyApp->getAssigned()->fetchAll('app_id'); @@ -46,7 +46,7 @@ $addAppForm->addItem($periodSelectorsRow); $addAppForm->addItem(new \Ease\Html\PTag()); -$addAppForm->addItem(new \Ease\TWB4\SubmitButton('🍏 '._('Apply'), 'success btn-lg btn-block')); +$addAppForm->addItem(new \Ease\TWB5\SubmitButton('🍏 '._('Apply'), 'success btn-lg btn-block')); WebPage::singleton()->container->addItem($addAppForm); diff --git a/src/job.php b/src/job.php index cc677041..435cd5d1 100644 --- a/src/job.php +++ b/src/job.php @@ -50,9 +50,9 @@ ); } -$outputTabs = new \Ease\TWB4\Tabs(); -$outputTabs->addTab(_('Output').' '.(\strlen($jobber->getOutput()) ? ' '.substr_count($jobber->getOutput(), "\n").'' : '💭'), [$stdTerminal, \strlen($jobber->getOutput()) ? new \Ease\TWB4\LinkButton('joboutput.php?id='.$jobID.'&mode=std', _('Download'), 'secondary btn-block') : _('No output'), new \Ease\Html\PreTag('', ['id' => 'live-output'])]); -$outputTabs->addTab(_('Errors').' '.(empty($jobber->getErrorOutput()) ? ' 0' : ''.substr_count($jobber->getErrorOutput(), "\n").''), [$errorTerminal, \strlen($jobber->getErrorOutput()) ? new \Ease\TWB4\LinkButton('joboutput.php?id='.$jobID.'&mode=err', _('Download'), 'secondary btn-block') : _('No errors')], empty($jobber->getOutput())); +$outputTabs = new \Ease\TWB5\Tabs(); +$outputTabs->addTab(_('Output').' '.(\strlen($jobber->getOutput()) ? ' '.substr_count($jobber->getOutput(), "\n").'' : '💭'), [$stdTerminal, \strlen($jobber->getOutput()) ? new \Ease\TWB5\LinkButton('joboutput.php?id='.$jobID.'&mode=std', _('Download'), 'secondary btn-block') : _('No output'), new \Ease\Html\PreTag('', ['id' => 'live-output'])]); +$outputTabs->addTab(_('Errors').' '.(empty($jobber->getErrorOutput()) ? ' 0' : ''.substr_count($jobber->getErrorOutput(), "\n").''), [$errorTerminal, \strlen($jobber->getErrorOutput()) ? new \Ease\TWB5\LinkButton('joboutput.php?id='.$jobID.'&mode=err', _('Download'), 'secondary btn-block') : _('No errors')], empty($jobber->getOutput())); $artifactor = new \MultiFlexi\Artifact(); $artifacts = $artifactor->listingQuery()->where('job_id', $jobID); @@ -76,7 +76,7 @@ break; } - $artifactsDiv->addItem(new \Ease\TWB4\Panel([new \Ease\Html\ATag('getartifact.php?id='.$artifactData['id'], '💾', ['class' => 'btn btn-info btn-sm']), ' '.$artifactData['filename']], 'inverse', new \Ease\Html\DivTag(new \Ease\Html\PreTag(''.$code.''), ['style' => 'font-family: monospace; color: black']), $artifactData['note'])); + $artifactsDiv->addItem(new \Ease\TWB5\Panel([new \Ease\Html\ATag('getartifact.php?id='.$artifactData['id'], '💾', ['class' => 'btn btn-info btn-sm']), ' '.$artifactData['filename']], 'inverse', new \Ease\Html\DivTag(new \Ease\Html\PreTag(''.$code.''), ['style' => 'font-family: monospace; color: black']), $artifactData['note'])); } $outputTabs->addTab(_('Artifacts').' '.$artifacts->count().'', $artifactsDiv); @@ -84,31 +84,31 @@ $runTemplateButton = new RuntemplateButton($runTemplate); -// $relaunchButton = new \Ease\TWB4\LinkButton('launch.php?id='.$runTemplate->getMyKey().'&app_id='.$appInfo['app_id'].'&company_id='.$appInfo['company_id'], '<'._('Relaunch').'💨', 'success btn-lg btn-block'); +// $relaunchButton = new \Ease\TWB5\LinkButton('launch.php?id='.$runTemplate->getMyKey().'&app_id='.$appInfo['app_id'].'&company_id='.$appInfo['company_id'], '<'._('Relaunch').'💨', 'success btn-lg btn-block'); if ($jobber->getDataValue('begin')) { - $scheduleButton = new \Ease\TWB4\LinkButton('schedule.php?id='.$runTemplate->getMyKey().'&app_id='.$appInfo['app_id'].'&company_id='.$appInfo['company_id'], [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-block'); + $scheduleButton = new \Ease\TWB5\LinkButton('schedule.php?id='.$runTemplate->getMyKey().'&app_id='.$appInfo['app_id'].'&company_id='.$appInfo['company_id'], [_('Schedule').'  ', new \Ease\Html\ImgTag('images/launchinbackground.svg', _('Launch'), ['height' => '30px'])], 'primary btn-block'); } else { - $scheduleButton = new \Ease\TWB4\LinkButton('schedule.php?cancel='.$jobber->getMyKey().'&templateid='.$runTemplate->getMyKey().'&app_id='.$jobber->getDataValue('app_id').'&company_id='.$runTemplate->getDataValue('company_id'), [_('Cancel').'  ', new \Ease\Html\ImgTag('images/cancel.svg', _('Cancel').'  ', ['height' => '60px'])], 'warning btn-block'); + $scheduleButton = new \Ease\TWB5\LinkButton('schedule.php?cancel='.$jobber->getMyKey().'&templateid='.$runTemplate->getMyKey().'&app_id='.$jobber->getDataValue('app_id').'&company_id='.$runTemplate->getDataValue('company_id'), [_('Cancel').'  ', new \Ease\Html\ImgTag('images/cancel.svg', _('Cancel').'  ', ['height' => '60px'])], 'warning btn-block'); } $previousJobId = $jobber->getPreviousJobId(true, true, true); if ($previousJobId) { - $previousButton = new \Ease\TWB4\LinkButton('job.php?id='.$previousJobId, '◀️ '._('Previous').' 🏁', 'info btn-lg btn-block'); + $previousButton = new \Ease\TWB5\LinkButton('job.php?id='.$previousJobId, '◀️ '._('Previous').' 🏁', 'info btn-lg btn-block'); } else { - $previousButton = new \Ease\TWB4\LinkButton('#', '◀️ '._('Previous').' 🏁', 'info btn-lg btn-block disabled'); + $previousButton = new \Ease\TWB5\LinkButton('#', '◀️ '._('Previous').' 🏁', 'info btn-lg btn-block disabled'); } $nextJobId = $jobber->getNextJobId(true, true, true); if ($nextJobId) { - $nextButton = new \Ease\TWB4\LinkButton('job.php?id='.$nextJobId, '🏁 '._('Next').' ▶️️', 'info btn-lg btn-block'); + $nextButton = new \Ease\TWB5\LinkButton('job.php?id='.$nextJobId, '🏁 '._('Next').' ▶️️', 'info btn-lg btn-block'); } else { - $nextButton = new \Ease\TWB4\LinkButton('#', '🏁 '._('Next').' ▶️️', 'info btn-lg btn-block disabled'); + $nextButton = new \Ease\TWB5\LinkButton('#', '🏁 '._('Next').' ▶️️', 'info btn-lg btn-block disabled'); } -$jobFoot = new \Ease\TWB4\Row(); +$jobFoot = new \Ease\TWB5\Row(); $jobFoot->addColumn(2, $previousButton); $jobFoot->addColumn(2, $nextButton); $jobFoot->addColumn(2, $scheduleButton); diff --git a/src/launch.php b/src/launch.php index 87e335eb..eb128449 100644 --- a/src/launch.php +++ b/src/launch.php @@ -15,8 +15,8 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\Panel; -use Ease\TWB4\Row; +use Ease\TWB5\Panel; +use Ease\TWB5\Row; use MultiFlexi\Application; require_once './init.php'; diff --git a/src/login.php b/src/login.php index 52194b35..69e03674 100644 --- a/src/login.php +++ b/src/login.php @@ -20,13 +20,13 @@ use Ease\Html\InputPasswordTag; use Ease\Html\InputTextTag; use Ease\Shared; -use Ease\TWB4\Col; -use Ease\TWB4\Form; -use Ease\TWB4\FormGroup; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Panel; -use Ease\TWB4\Row; -use Ease\TWB4\SubmitButton; +use Ease\TWB5\Col; +use Ease\TWB5\Form; +use Ease\TWB5\FormGroup; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Panel; +use Ease\TWB5\Row; +use Ease\TWB5\SubmitButton; require_once './init.php'; diff --git a/src/logout.php b/src/logout.php index 6c9fd725..a9c8c7b7 100644 --- a/src/logout.php +++ b/src/logout.php @@ -23,7 +23,7 @@ WebPage::singleton()->addItem(new PageTop(_('Sign Off'))); -$byerow = new \Ease\TWB4\Row(); +$byerow = new \Ease\TWB5\Row(); $byerow->addColumn(6, new \Ease\Html\ImgTag('images/openclipart/'.\MultiFlexi\Ui\OpenClipart::randomImage('images/openclipart'))); $byeInfo = $byerow->addColumn(6, new \Ease\Html\H1Tag(_('Good bye'))); diff --git a/src/main.php b/src/main.php index fa61120e..068f4f99 100644 --- a/src/main.php +++ b/src/main.php @@ -25,7 +25,7 @@ WebPage::singleton()->container->addItem(new AllJobsLastMonthChart(new \MultiFlexi\Job(), ['id' => 'container'])); -WebPage::singleton()->container->addItem(new \Ease\TWB4\Panel(_('Last 20 Jobs'), 'default', new JobHistoryTable(), new DbStatus())); +WebPage::singleton()->container->addItem(new \Ease\TWB5\Panel(_('Last 20 Jobs'), 'default', new JobHistoryTable(), new DbStatus())); WebPage::singleton()->addItem(new PageBottom('jobs')); diff --git a/src/newjob.php b/src/newjob.php index 62e20a53..3a651dc3 100644 --- a/src/newjob.php +++ b/src/newjob.php @@ -71,8 +71,8 @@ WebPage::singleton()->addItem(new PageTop(_('Schedule Job run'))); -$runTemplateButton = new \Ease\TWB4\LinkButton('runtemplate.php?id='.$runTemplate->getMyKey(), '⚗️ '._('Run Template'), 'dark btn-lg btn-block'); -$jobInfoButton = new \Ease\TWB4\LinkButton('job.php?id='.$jobber->getMyKey(), _('Job details'), 'info btn-block'); +$runTemplateButton = new \Ease\TWB5\LinkButton('runtemplate.php?id='.$runTemplate->getMyKey(), '⚗️ '._('Run Template'), 'dark btn-lg btn-block'); +$jobInfoButton = new \Ease\TWB5\LinkButton('job.php?id='.$jobber->getMyKey(), _('Job details'), 'info btn-block'); $appPanel = new ApplicationPanel($apps, _('Job Run Scheduled'), $jobInfoButton); $appPanel->headRow->addColumn(2, $runTemplateButton); diff --git a/src/passwordrecovery.php b/src/passwordrecovery.php index 7b4073ec..17764dd1 100644 --- a/src/passwordrecovery.php +++ b/src/passwordrecovery.php @@ -70,7 +70,7 @@ WebPage::singleton()->addItem(new PageTop(_('Lost password recovery'))); -$pageRow = new \Ease\TWB4\Row(); +$pageRow = new \Ease\TWB5\Row(); $columnI = $pageRow->addColumn('4'); $columnII = $pageRow->addColumn('4'); @@ -79,23 +79,23 @@ WebPage::singleton()->addItem($pageRow); if (!$success) { - $columnIII->addItem(new \Ease\TWB4\Label('info', _('Tip'))); + $columnIII->addItem(new \Ease\TWB5\Label('info', _('Tip'))); - $columnIII->addItem(new \Ease\TWB4\Well( + $columnIII->addItem(new \Ease\TWB5\Well( _('Forgot your password? Enter your e-mail address you entered during the registration and we will send you a new one.'), )); - $titlerow = new \Ease\TWB4\Row(); + $titlerow = new \Ease\TWB5\Row(); $titlerow->addColumn(4, new \Ease\Html\ImgTag('images/password.png')); $titlerow->addColumn(8, new \Ease\Html\H3Tag(_('Password Recovery'))); - $loginPanel = new \Ease\TWB4\Panel( - new \Ease\TWB4\Container($titlerow), + $loginPanel = new \Ease\TWB5\Panel( + new \Ease\TWB5\Container($titlerow), 'success', null, - new \Ease\TWB4\SubmitButton(_('Sent New Password'), 'success'), + new \Ease\TWB5\SubmitButton(_('Sent New Password'), 'success'), ); - $loginPanel->addItem(new \Ease\TWB4\FormGroup( + $loginPanel->addItem(new \Ease\TWB5\FormGroup( _('Email'), new \Ease\Html\InputTextTag( 'Email', @@ -105,14 +105,14 @@ )); $loginPanel->body->setTagProperties(['style' => 'margin: 20px']); - $mailForm = $columnII->addItem(new \Ease\TWB4\Form(['name' => 'PasswordRecovery'])); + $mailForm = $columnII->addItem(new \Ease\TWB5\Form(['name' => 'PasswordRecovery'])); $mailForm->addItem($loginPanel); if (WebPage::singleton()->isPosted()) { $mailForm->fillUp($_POST); } } else { - $columnII->addItem(new \Ease\TWB4\LinkButton( + $columnII->addItem(new \Ease\TWB5\LinkButton( 'login.php', _('Continue'), )); diff --git a/src/periodical.php b/src/periodical.php index 13987111..851bee1e 100644 --- a/src/periodical.php +++ b/src/periodical.php @@ -63,18 +63,18 @@ function aIDs($apps) WebPage::singleton()->addItem(new PageTop(_('Periodical tasks'))); -$addAppForm = new \Ease\TWB4\Form(); +$addAppForm = new \Ease\TWB5\Form(); $addAppForm->addItem(new \Ease\Html\H1Tag(_('Periodical tasks'))); $addAppForm->addItem(new \Ease\Html\InputHiddenTag('company_id', $companer->getMyKey())); -$periodSelectorsRow = new \Ease\TWB4\Row(); +$periodSelectorsRow = new \Ease\TWB5\Row(); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Minutely'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'minutly', \count($appsByIntrv['i']) ? implode(',', array_keys($appsByIntrv['i'])) : '', 'actions.php'))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Hourly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'hourly', \count($appsByIntrv['h']) ? implode(',', array_keys($appsByIntrv['h'])) : '', 'actions.php'))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Daily'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'daily', \count($appsByIntrv['d']) ? implode(',', array_keys($appsByIntrv['d'])) : '', 'actions.php'))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Weekly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'weekly', \count($appsByIntrv['w']) ? implode(',', array_keys($appsByIntrv['w'])) : '', 'actions.php'))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Monthly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'monthly', \count($appsByIntrv['m']) ? implode(',', array_keys($appsByIntrv['m'])) : '', 'actions.php'))); -$periodSelectorsRow->addColumn(2, new \Ease\TWB4\Panel(_('Yearly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'yearly', \count($appsByIntrv['y']) ? implode(',', array_keys($appsByIntrv['y'])) : '', 'actions.php'))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Minutely'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'minutly', \count($appsByIntrv['i']) ? implode(',', array_keys($appsByIntrv['i'])) : '', 'actions.php'))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Hourly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'hourly', \count($appsByIntrv['h']) ? implode(',', array_keys($appsByIntrv['h'])) : '', 'actions.php'))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Daily'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'daily', \count($appsByIntrv['d']) ? implode(',', array_keys($appsByIntrv['d'])) : '', 'actions.php'))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Weekly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'weekly', \count($appsByIntrv['w']) ? implode(',', array_keys($appsByIntrv['w'])) : '', 'actions.php'))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Monthly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'monthly', \count($appsByIntrv['m']) ? implode(',', array_keys($appsByIntrv['m'])) : '', 'actions.php'))); +$periodSelectorsRow->addColumn(2, new \Ease\TWB5\Panel(_('Yearly'), 'default', new CompanyRuntemplateIntervalSelector($companer, 'yearly', \count($appsByIntrv['y']) ? implode(',', array_keys($appsByIntrv['y'])) : '', 'actions.php'))); // // $assignedRaw = $companyApp->getAssigned()->fetchAll('app_id'); @@ -85,7 +85,7 @@ function aIDs($apps) $addAppForm->addItem($periodSelectorsRow); $addAppForm->addItem(new \Ease\Html\PTag()); -$addAppForm->addItem(new \Ease\TWB4\SubmitButton(_('🍏 Apply'), 'success btn-lg btn-block')); +$addAppForm->addItem(new \Ease\TWB5\SubmitButton(_('🍏 Apply'), 'success btn-lg btn-block')); WebPage::singleton()->container->addItem(new CompanyPanel($companer, $addAppForm)); diff --git a/src/requirements.php b/src/requirements.php index 0c5eb4e0..afe2a380 100644 --- a/src/requirements.php +++ b/src/requirements.php @@ -44,7 +44,7 @@ } foreach ($reqs as $reqirement => $apps) { - $head = new \Ease\TWB4\Row(); + $head = new \Ease\TWB5\Row(); $fields = []; $applications = []; @@ -59,15 +59,15 @@ $head->addColumn(4, new \Ease\Html\H2Tag($forms[$reqirement]::name())); foreach ($forms[$reqirement]::fields() as $name => $fieldsInfo) { - $fields[] = new \Ease\TWB4\Badge('info', $name, ['title' => $fieldsInfo['type'], 'style' => 'margin: 4px;']); + $fields[] = new \Ease\TWB5\Badge('info', $name, ['title' => $fieldsInfo['type'], 'style' => 'margin: 4px;']); } - $reqPanel = new \Ease\TWB4\Panel($head, 'success', $applications, $fields); + $reqPanel = new \Ease\TWB5\Panel($head, 'success', $applications, $fields); } else { $head->addColumn(4, new \Ease\Html\ImgTag('images/cancel.svg', $reqirement, ['height' => '40px'])); $head->addColumn(4, $reqirement); $head->addColumn(4, new \Ease\Html\H2Tag($reqirement)); - $reqPanel = new \Ease\TWB4\Panel($head, 'warning', $applications, $fields); + $reqPanel = new \Ease\TWB5\Panel($head, 'warning', $applications, $fields); } WebPage::singleton()->container->addItem($reqPanel); diff --git a/src/rtactive.php b/src/rtactive.php index 8972e93f..2fab78b1 100644 --- a/src/rtactive.php +++ b/src/rtactive.php @@ -19,8 +19,8 @@ WebPage::singleton()->onlyForLogged(); -$runtemplate_id = \Ease\TWB4\WebPage::getRequestValue('runtemplate', 'int'); -$active = \Ease\TWB4\WebPage::getRequestValue('active', 'bool'); +$runtemplate_id = \Ease\TWB5\WebPage::getRequestValue('runtemplate', 'int'); +$active = \Ease\TWB5\WebPage::getRequestValue('active', 'bool'); if (null !== $runtemplate_id) { $switcher = new \MultiFlexi\RunTemplate(); diff --git a/src/rtdelay.php b/src/rtdelay.php index f95930ae..a20454ee 100644 --- a/src/rtdelay.php +++ b/src/rtdelay.php @@ -41,8 +41,8 @@ function timeStringToSeconds(string $timeString): int return $seconds; } -$runtemplate_id = \Ease\TWB4\WebPage::getRequestValue('runtemplate', 'int'); -$delay = \Ease\TWB4\WebPage::getRequestValue('delay'); +$runtemplate_id = \Ease\TWB5\WebPage::getRequestValue('runtemplate', 'int'); +$delay = \Ease\TWB5\WebPage::getRequestValue('delay'); $state = $delay !== 'n'; $result = false; diff --git a/src/rtexecutor.php b/src/rtexecutor.php index 466f6084..e36fa375 100644 --- a/src/rtexecutor.php +++ b/src/rtexecutor.php @@ -19,8 +19,8 @@ WebPage::singleton()->onlyForLogged(); -$runtemplate_id = \Ease\TWB4\WebPage::getRequestValue('runtemplate', 'int'); -$executor = \Ease\TWB4\WebPage::getRequestValue('executor'); +$runtemplate_id = \Ease\TWB5\WebPage::getRequestValue('runtemplate', 'int'); +$executor = \Ease\TWB5\WebPage::getRequestValue('executor'); $state = $executor !== 'n'; $result = false; diff --git a/src/rtinterval.php b/src/rtinterval.php index a8cff77b..19af2aaa 100644 --- a/src/rtinterval.php +++ b/src/rtinterval.php @@ -19,8 +19,8 @@ WebPage::singleton()->onlyForLogged(); -$runtemplate_id = \Ease\TWB4\WebPage::getRequestValue('runtemplate', 'int'); -$interval = \Ease\TWB4\WebPage::getRequestValue('interval'); +$runtemplate_id = \Ease\TWB5\WebPage::getRequestValue('runtemplate', 'int'); +$interval = \Ease\TWB5\WebPage::getRequestValue('interval'); $state = $interval !== 'n'; $result = false; diff --git a/src/runtemplateclone.php b/src/runtemplateclone.php index faa1c64d..653f5374 100644 --- a/src/runtemplateclone.php +++ b/src/runtemplateclone.php @@ -23,7 +23,7 @@ $runTemplate = new RunTemplate(WebPage::getRequestValue('id', 'int')); $originalEnv = $runTemplate->getRuntemplateEnvironment(); -$cloneName = \Ease\TWB4\WebPage::getRequestValue('clonename'); +$cloneName = \Ease\TWB5\WebPage::getRequestValue('clonename'); $runTemplate->unsetDataValue($runTemplate->getKeyColumn()); $runTemplate->setDataValue('name', $cloneName); diff --git a/src/runtemplatepopulate.php b/src/runtemplatepopulate.php index cb15fa16..26d8790e 100644 --- a/src/runtemplatepopulate.php +++ b/src/runtemplatepopulate.php @@ -28,8 +28,8 @@ require_once './init.php'; WebPage::singleton()->onlyForLogged(); $result = false; -$id = \Ease\TWB4\WebPage::getRequestValue('id', 'int'); -$replace = \Ease\TWB4\WebPage::getRequestValue('replace', 'string') === 'on'; +$id = \Ease\TWB5\WebPage::getRequestValue('id', 'int'); +$replace = \Ease\TWB5\WebPage::getRequestValue('replace', 'string') === 'on'; if (null !== $id) { $runtemplater = new \MultiFlexi\RunTemplate($id); diff --git a/src/runtemplatesave.php b/src/runtemplatesave.php index 626f3a6e..40c1e15d 100644 --- a/src/runtemplatesave.php +++ b/src/runtemplatesave.php @@ -28,9 +28,9 @@ require_once './init.php'; WebPage::singleton()->onlyForLogged(); $result = false; -$name = \Ease\TWB4\WebPage::getRequestValue('name'); -$value = \Ease\TWB4\WebPage::getRequestValue('value'); -$pk = \Ease\TWB4\WebPage::getRequestValue('pk', 'int'); +$name = \Ease\TWB5\WebPage::getRequestValue('name'); +$value = \Ease\TWB5\WebPage::getRequestValue('value'); +$pk = \Ease\TWB5\WebPage::getRequestValue('pk', 'int'); if (null !== $pk) { $runtemplater = new \MultiFlexi\RunTemplate(); diff --git a/src/schedule.php b/src/schedule.php index fb4f751e..2c077281 100644 --- a/src/schedule.php +++ b/src/schedule.php @@ -25,7 +25,7 @@ WebPage::singleton()->addItem(new PageTop(_('Schedule Job'))); if (null === $runTemplate->getMyKey()) { - WebPage::singleton()->container->addItem(new \Ease\TWB4\Alert('error', _('RunTemplate id not specified'))); + WebPage::singleton()->container->addItem(new \Ease\TWB5\Alert('error', _('RunTemplate id not specified'))); $runTemplate->addStatusMessage(_('RunTemplate id not specified'), 'error'); } else { $app = $runTemplate->getApplication(); @@ -63,7 +63,7 @@ $jobber->scheduleJobRun(new \DateTime($when)); - $glassHourRow = new \Ease\TWB4\Row(); + $glassHourRow = new \Ease\TWB5\Row(); $glassHourRow->addTagClass('justify-content-md-center'); $glassHourRow->addColumn(4); $glassHourRow->addColumn(4, new \Ease\Html\DivTag(new \Ease\Html\Widgets\SandClock(['class' => 'mx-auto d-block img-fluid'])), 'sm'); @@ -77,7 +77,7 @@ $waitTime = $beginTime->getTimestamp() - $currentTime->getTimestamp(); - $waitRow = new \Ease\TWB4\Row(); + $waitRow = new \Ease\TWB5\Row(); $waitRow->addTagClass('justify-content-md-center'); $waitRow->addColumn(4, sprintf(_('Start after %s'), $when)); $waitRow->addColumn(4, new \Ease\Html\Widgets\LiveAge($beginTime), 'sm'); @@ -159,7 +159,7 @@ function wait(seconds) { $appPanel = new ApplicationPanel( $app, - [$glassHourRow, $waitRow, new \Ease\Html\DivTag(nl2br($prepared)), new \Ease\TWB4\LinkButton('job.php?id='.$jobber->getMyKey(), _('Job details'), 'info btn-block')], + [$glassHourRow, $waitRow, new \Ease\Html\DivTag(nl2br($prepared)), new \Ease\TWB5\LinkButton('job.php?id='.$jobber->getMyKey(), _('Job details'), 'info btn-block')], ); $appPanel->headRow->addItem(new RuntemplateButton($runTemplate)); @@ -171,9 +171,9 @@ function wait(seconds) { $canceller = new \MultiFlexi\Job($jobID); $canceller->deleteFromSQL(); - WebPage::singleton()->container->addItem(new \Ease\TWB4\Label('success', _('Job Canceled'))); + WebPage::singleton()->container->addItem(new \Ease\TWB5\Label('success', _('Job Canceled'))); - WebPage::singleton()->container->addItem(new \Ease\TWB4\LinkButton('queue.php', sprintf(_('remaining %d 🏁 jobs scheduled'), $scheduler->listingQuery()->count()), 'info btn-large')); + WebPage::singleton()->container->addItem(new \Ease\TWB5\LinkButton('queue.php', sprintf(_('remaining %d 🏁 jobs scheduled'), $scheduler->listingQuery()->count()), 'info btn-large')); } else { $appPanel = new ApplicationPanel($app, new JobScheduleForm($app, $company)); $appPanel->headRow->addItem(new RuntemplateButton($runTemplate)); diff --git a/src/server.php b/src/server.php index dc64ee36..227f8919 100644 --- a/src/server.php +++ b/src/server.php @@ -16,8 +16,8 @@ namespace MultiFlexi\Ui; use Ease\Html\ATag; -use Ease\TWB4\Panel; -use Ease\TWB4\Row; +use Ease\TWB5\Panel; +use Ease\TWB5\Row; use MultiFlexi\Servers; require_once './init.php'; diff --git a/src/servers.php b/src/servers.php index dead0f71..44c53e6c 100644 --- a/src/servers.php +++ b/src/servers.php @@ -15,9 +15,9 @@ namespace MultiFlexi\Ui; -use Ease\TWB4\LinkButton; -use Ease\TWB4\Panel; -use Ease\TWB4\Table; +use Ease\TWB5\LinkButton; +use Ease\TWB5\Panel; +use Ease\TWB5\Table; use MultiFlexi\Servers; require_once './init.php'; @@ -33,7 +33,7 @@ $serverInfo = []; $serverInfo['type'] = new \Ease\Html\ImgTag('images/'.strtolower($fbData['type']).'.svg', $fbData['type'], ['width' => '60px']); - $serverInfo['id'] = new \Ease\TWB4\Badge('success', $fbData['id']); + $serverInfo['id'] = new \Ease\TWB5\Badge('success', $fbData['id']); $serverInfo['name'] = new \Ease\Html\ATag('server.php?id='.$fbData['id'], new \Ease\Html\StrongTag($fbData['name'])); $serverInfo['url'] = new \Ease\Html\ATag($fbData['url'], $fbData['url']); $serverInfo['user'] = $fbData['user']; diff --git a/src/toggleapp.php b/src/toggleapp.php index 38950cd3..1eeb22b8 100644 --- a/src/toggleapp.php +++ b/src/toggleapp.php @@ -19,9 +19,9 @@ WebPage::singleton()->onlyForLogged(); -$app_id = \Ease\TWB4\WebPage::getRequestValue('app'); -$company_id = \Ease\TWB4\WebPage::getRequestValue('company'); -$interval = \Ease\TWB4\WebPage::getRequestValue('interval'); +$app_id = \Ease\TWB5\WebPage::getRequestValue('app'); +$company_id = \Ease\TWB5\WebPage::getRequestValue('company'); +$interval = \Ease\TWB5\WebPage::getRequestValue('interval'); $state = $interval !== 'n'; $result = false; diff --git a/src/user.php b/src/user.php index 214c698d..b1f8b14d 100644 --- a/src/user.php +++ b/src/user.php @@ -44,15 +44,15 @@ switch (WebPage::singleton()->getRequestValue('action')) { case 'delete': - $confirmBlock = new \Ease\TWB4\Well(); + $confirmBlock = new \Ease\TWB5\Well(); $confirmBlock->addItem($user); - $confirmator = $confirmBlock->addItem(new \Ease\TWB4\Panel(_('Are you sure ?'), 'danger')); - $confirmator->addItem(new \Ease\TWB4\LinkButton('user.php?id='.$user->getId(), _('Ne').' '.\Ease\TWB4\Part::glyphIcon('ok'), 'success')); - $confirmator->addItem(new \Ease\TWB4\LinkButton('?delete=true&'.$user->keyColumn.'='.$user->getID(), _('Ano').' '.\Ease\TWB4\Part::glyphIcon('remove'), 'danger')); + $confirmator = $confirmBlock->addItem(new \Ease\TWB5\Panel(_('Are you sure ?'), 'danger')); + $confirmator->addItem(new \Ease\TWB5\LinkButton('user.php?id='.$user->getId(), _('Ne').' '.\Ease\TWB5\Part::glyphIcon('ok'), 'success')); + $confirmator->addItem(new \Ease\TWB5\LinkButton('?delete=true&'.$user->keyColumn.'='.$user->getID(), _('Ano').' '.\Ease\TWB5\Part::glyphIcon('remove'), 'danger')); - WebPage::singleton()->container->addItem(new \Ease\TWB4\Panel(''.$user->getUserName().'', 'info', $confirmBlock)); + WebPage::singleton()->container->addItem(new \Ease\TWB5\Panel(''.$user->getUserName().'', 'info', $confirmBlock)); break; @@ -61,7 +61,7 @@ // $operationsMenu->setTagCss(['float' => 'right']); // $operationsMenu->dropdown->addTagClass('pull-right'); - WebPage::singleton()->container->addItem(new \Ease\TWB4\Panel([''.$user->getUserName().''/* $operationsMenu */], 'info', new UserForm($user))); + WebPage::singleton()->container->addItem(new \Ease\TWB5\Panel([''.$user->getUserName().''/* $operationsMenu */], 'info', new UserForm($user))); break; } diff --git a/src/users.php b/src/users.php index aba8f521..9ccafbbd 100644 --- a/src/users.php +++ b/src/users.php @@ -23,7 +23,7 @@ WebPage::singleton()->addItem(new PageTop(_('Users'))); -// WebPage::singleton()->addItem(new \Ease\TWB4\Container(new DBDataTable(new \MultiFlexi\User()))); TODO +// WebPage::singleton()->addItem(new \Ease\TWB5\Container(new DBDataTable(new \MultiFlexi\User()))); TODO WebPage::singleton()->addItem(new PageBottom());