first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace KupShop\POSBundle\Admin\Tabs;
use KupShop\AdminBundle\Admin\WindowTab;
class PosTerminalSettingsTab extends WindowTab
{
protected $title = 'flapPosTerminalSettings';
protected $template = 'window/PosTerminalSettings.tpl';
public function handleUpdate(): void
{
$data = getVal('data');
if ($data['data']['terminal']['ip'] && !filter_var($data['data']['terminal']['ip'] ?? false, FILTER_VALIDATE_IP) !== false) {
$this->getWindow()->addError(translate('invalid_ip', 'posSettings'));
}
}
public function getLabel()
{
return translate($this->title, 'posSettings');
}
public static function getTypes(): array
{
return [
'posSettings' => 1,
];
}
public static function isAllowed()
{
return findModule(\Modules::NEW_POS, \Modules::SUB_TERMINAL);
}
}