bug and media fixes

This commit is contained in:
Dennis Eichhorn 2021-10-29 14:49:55 +02:00
parent 01d4320fa3
commit 5766dae413
9 changed files with 24 additions and 27 deletions

View File

@ -274,8 +274,8 @@ echo $this->getData('nav')->render();
<div class="form-group"> <div class="form-group">
<label><?= $this->getHtml('Currencyformat'); ?></label> <label><?= $this->getHtml('Currencyformat'); ?></label>
<select form="fLocalization" name="settings_currencyformat"> <select form="fLocalization" name="settings_currencyformat">
<option value="0"<?= $this->printHtml('0' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?> <option value="0"<?= $this->printHtml($l11n->getCurrencyFormat() === '0' ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?>
<option value="1"<?= $this->printHtml('1' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?> <option value="1"<?= $this->printHtml($l11n->getCurrencyFormat() === '1' ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?>
</select> </select>
</div> </div>

View File

@ -464,8 +464,8 @@ echo $this->getData('nav')->render(); ?>
<div class="form-group"> <div class="form-group">
<label><?= $this->getHtml('Currencyformat'); ?></label> <label><?= $this->getHtml('Currencyformat'); ?></label>
<select form="fLocalization" name="settings_currencyformat"> <select form="fLocalization" name="settings_currencyformat">
<option value="0"<?= $this->printHtml('0' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?> <option value="0"<?= $this->printHtml($l11n->getCurrencyFormat() === '0' ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?>
<option value="1"<?= $this->printHtml('1' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?> <option value="1"<?= $this->printHtml($l11n->getCurrencyFormat() === '1' ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -275,8 +275,8 @@ $l11n = $this->getData('defaultlocalization') ?? new NullLocalization();
<div class="form-group"> <div class="form-group">
<label><?= $this->getHtml('Currencyformat'); ?></label> <label><?= $this->getHtml('Currencyformat'); ?></label>
<select form="fLocalization" name="settings_currencyformat"> <select form="fLocalization" name="settings_currencyformat">
<option value="0"<?= $this->printHtml('0' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?> <option value="0"<?= $this->printHtml($l11n->getCurrencyFormat() === '0' ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?>
<option value="1"<?= $this->printHtml('1' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?> <option value="1"<?= $this->printHtml($l11n->getCurrencyFormat() === '1' ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?>
</select> </select>
</div> </div>

View File

@ -392,4 +392,4 @@ function phpServe() : void
}); });
} }
phpServe(); \phpServe();

View File

@ -14,7 +14,6 @@ declare(strict_types=1);
namespace Modules\Admin\tests\Controller\Api; namespace Modules\Admin\tests\Controller\Api;
use phpOMS\Account\GroupStatus;
use phpOMS\Account\AccountStatus; use phpOMS\Account\AccountStatus;
use phpOMS\Account\AccountType; use phpOMS\Account\AccountType;
use phpOMS\Message\Http\HttpRequest; use phpOMS\Message\Http\HttpRequest;

View File

@ -22,11 +22,11 @@ use Modules\Admin\tests\Controller\Api\ApiControllerGroupTrait;
use Modules\Admin\tests\Controller\Api\ApiControllerModuleTrait; use Modules\Admin\tests\Controller\Api\ApiControllerModuleTrait;
use Modules\Admin\tests\Controller\Api\ApiControllerPermissionTrait; use Modules\Admin\tests\Controller\Api\ApiControllerPermissionTrait;
use Modules\Admin\tests\Controller\Api\ApiControllerSettingsTrait; use Modules\Admin\tests\Controller\Api\ApiControllerSettingsTrait;
use phpOMS\DataStorage\Session\HttpSession;
use phpOMS\Account\Account; use phpOMS\Account\Account;
use phpOMS\Account\AccountManager; use phpOMS\Account\AccountManager;
use phpOMS\Account\PermissionType; use phpOMS\Account\PermissionType;
use phpOMS\Application\ApplicationAbstract; use phpOMS\Application\ApplicationAbstract;
use phpOMS\DataStorage\Session\HttpSession;
use phpOMS\Dispatcher\Dispatcher; use phpOMS\Dispatcher\Dispatcher;
use phpOMS\Event\EventManager; use phpOMS\Event\EventManager;
use phpOMS\Module\ModuleAbstract; use phpOMS\Module\ModuleAbstract;

View File

@ -16,7 +16,6 @@ namespace Modules\Admin\tests\Models;
use Modules\Admin\Models\Address; use Modules\Admin\Models\Address;
use Modules\Admin\Models\AddressMapper; use Modules\Admin\Models\AddressMapper;
use phpOMS\Utils\TestUtils;
use phpOMS\Stdlib\Base\AddressType; use phpOMS\Stdlib\Base\AddressType;
/** /**
@ -27,16 +26,16 @@ use phpOMS\Stdlib\Base\AddressType;
final class AddressMapperTest extends \PHPUnit\Framework\TestCase final class AddressMapperTest extends \PHPUnit\Framework\TestCase
{ {
/** /**
* @covers Modules\Admin\Models\AddressMapper * @covers Modules\Admin\Models\AddressMapper
* @group module * @group module
*/ */
public function testCR() : void public function testCR() : void
{ {
$address = new Address(); $address = new Address();
$address->name = 'name'; $address->name = 'name';
$address->addition = 'addition'; $address->addition = 'addition';
$address->postal = '0123456789'; $address->postal = '0123456789';
$address->setType(AddressType::BUSINESS); $address->setType(AddressType::BUSINESS);
$address->city = 'city'; $address->city = 'city';
$address->address = 'Some address here'; $address->address = 'Some address here';

View File

@ -50,7 +50,7 @@ final class AddressTest extends \PHPUnit\Framework\TestCase
'lat' => 0, 'lat' => 0,
'long' => 0, 'long' => 0,
], ],
'name' => '', 'name' => '',
'addition' => '', 'addition' => '',
]; ];
@ -72,13 +72,13 @@ final class AddressTest extends \PHPUnit\Framework\TestCase
'lat' => 12.1, 'lat' => 12.1,
'long' => 11.2, 'long' => 11.2,
], ],
'name' => 'name', 'name' => 'name',
'addition' => 'addition', 'addition' => 'addition',
]; ];
$this->address->name = 'name'; $this->address->name = 'name';
$this->address->addition = 'addition'; $this->address->addition = 'addition';
$this->address->postal = '0123456789'; $this->address->postal = '0123456789';
$this->address->setType(AddressType::BUSINESS); $this->address->setType(AddressType::BUSINESS);
$this->address->city = 'city'; $this->address->city = 'city';
$this->address->address = 'Some address here'; $this->address->address = 'Some address here';
@ -101,13 +101,13 @@ final class AddressTest extends \PHPUnit\Framework\TestCase
'lat' => 12.1, 'lat' => 12.1,
'long' => 11.2, 'long' => 11.2,
], ],
'name' => 'name', 'name' => 'name',
'addition' => 'addition', 'addition' => 'addition',
]; ];
$this->address->name = 'name'; $this->address->name = 'name';
$this->address->addition = 'addition'; $this->address->addition = 'addition';
$this->address->postal = '0123456789'; $this->address->postal = '0123456789';
$this->address->setType(AddressType::BUSINESS); $this->address->setType(AddressType::BUSINESS);
$this->address->city = 'city'; $this->address->city = 'city';
$this->address->address = 'Some address here'; $this->address->address = 'Some address here';
@ -131,7 +131,7 @@ final class AddressTest extends \PHPUnit\Framework\TestCase
'lat' => 12.1, 'lat' => 12.1,
'long' => 11.2, 'long' => 11.2,
], ],
'name' => 'name', 'name' => 'name',
'addition' => 'addition', 'addition' => 'addition',
]; ];

View File

@ -17,7 +17,6 @@ namespace Modules\Admin\tests\Models;
use Modules\Admin\Models\App; use Modules\Admin\Models\App;
use Modules\Admin\Models\AppMapper; use Modules\Admin\Models\AppMapper;
use phpOMS\Application\ApplicationStatus; use phpOMS\Application\ApplicationStatus;
use phpOMS\Utils\TestUtils;
/** /**
* @testdox Modules\Admin\tests\Models\AppMapperTest: App database mapper * @testdox Modules\Admin\tests\Models\AppMapperTest: App database mapper
@ -35,8 +34,8 @@ final class AppMapperTest extends \PHPUnit\Framework\TestCase
{ {
$app = new App(); $app = new App();
$app->name = 'TestAppName'; $app->name = 'TestAppName';
$app->theme = 'Default'; $app->theme = 'Default';
$app->status = ApplicationStatus::NORMAL; $app->status = ApplicationStatus::NORMAL;
$id = AppMapper::create($app); $id = AppMapper::create($app);