From a8bcfe3b3897eee20837a87c36bec31abfd3b4f3 Mon Sep 17 00:00:00 2001 From: BudsieBuds Date: Tue, 2 Dec 2025 22:19:52 +0100 Subject: [PATCH] Bootstrap 5 WIP - work in progress build of conversion from bootstrap 3 to 5 --- README.md | 4 + app/Controllers/Config.php | 27 +- app/Database/tables.sql | 8 +- app/Views/attributes/manage.php | 17 +- app/Views/cashups/manage.php | 36 +- app/Views/configs/appearance_config.php | 124 ++ app/Views/configs/barcode_config.php | 417 +++--- app/Views/configs/config_header.php | 5 + app/Views/configs/email_config.php | 173 +-- app/Views/configs/general_config.php | 646 +++------ app/Views/configs/info_config.php | 242 ++-- app/Views/configs/integrations_config.php | 95 +- app/Views/configs/invoice_config.php | 309 ++--- app/Views/configs/license_config.php | 42 +- app/Views/configs/locale_config.php | 503 ++++--- app/Views/configs/manage.php | 264 +++- app/Views/configs/message_config.php | 107 +- app/Views/configs/receipt_config.php | 505 +++---- app/Views/configs/reward_config.php | 48 +- app/Views/configs/stock_config.php | 31 +- app/Views/configs/system_config.php | 17 - app/Views/configs/system_info.php | 416 +++--- app/Views/configs/table_config.php | 47 +- app/Views/configs/tax_config.php | 216 ++- app/Views/customers/form_csv_import.php | 2 +- app/Views/expenses/manage.php | 36 +- app/Views/expenses_categories/manage.php | 17 +- app/Views/giftcards/manage.php | 17 +- app/Views/home/form_change_password.php | 138 -- app/Views/home/home.php | 15 +- app/Views/home/modules.php | 16 + app/Views/home/office.php | 15 +- app/Views/home/profile.php | 137 ++ app/Views/item_kits/manage.php | 22 +- app/Views/items/form_csv_import.php | 2 +- app/Views/items/manage.php | 67 +- app/Views/login.php | 39 +- app/Views/messages/sms.php | 54 +- app/Views/partial/customer_rewards.php | 37 +- app/Views/partial/daterangepicker.php | 390 +++--- app/Views/partial/dinner_tables.php | 27 +- app/Views/partial/footer.php | 32 +- app/Views/partial/header.php | 116 +- app/Views/partial/stock_locations.php | 27 +- app/Views/people/manage.php | 31 +- app/Views/receivings/receipt.php | 4 +- app/Views/receivings/receiving.php | 14 +- app/Views/reports/date_input.php | 25 +- app/Views/reports/graphical.php | 9 +- app/Views/reports/inventory_summary_input.php | 9 +- app/Views/reports/listing.php | 88 +- app/Views/reports/specific_customer_input.php | 9 +- app/Views/reports/specific_input.php | 8 +- app/Views/reports/tabular.php | 16 +- app/Views/reports/tabular_details.php | 10 +- app/Views/sales/form.php | 1 + app/Views/sales/invoice.php | 11 +- app/Views/sales/manage.php | 37 +- app/Views/sales/quote.php | 11 +- app/Views/sales/receipt.php | 9 +- app/Views/sales/register.php | 211 ++- app/Views/sales/tax_invoice.php | 11 +- app/Views/sales/work_order.php | 11 +- app/Views/taxes/manage.php | 41 +- app/Views/taxes/tax_categories.php | 25 +- app/Views/taxes/tax_codes.php | 25 +- app/Views/taxes/tax_jurisdictions.php | 25 +- app/Views/taxes/tax_rates.php | 12 +- gulpfile.js | 81 +- package-lock.json | 1227 ++++++++++++----- package.json | 31 +- public/css/interface.css | 71 + public/css/ospos.css | 186 --- public/css/register.css | 108 -- public/js/bs-modal_switch_content.js | 17 + public/js/bs-tab_anchor_linking.js | 22 + public/js/bs-tooltips.js | 3 + public/js/bs-validation.js | 20 + public/js/clipboard.min.js | 7 - public/js/manage_tables.js | 5 +- 80 files changed, 3998 insertions(+), 3938 deletions(-) create mode 100644 app/Views/configs/appearance_config.php create mode 100644 app/Views/configs/config_header.php delete mode 100644 app/Views/configs/system_config.php delete mode 100644 app/Views/home/form_change_password.php create mode 100644 app/Views/home/modules.php create mode 100644 app/Views/home/profile.php create mode 100644 public/css/interface.css delete mode 100644 public/css/ospos.css delete mode 100644 public/css/register.css create mode 100644 public/js/bs-modal_switch_content.js create mode 100644 public/js/bs-tab_anchor_linking.js create mode 100644 public/js/bs-tooltips.js create mode 100644 public/js/bs-validation.js delete mode 100644 public/js/clipboard.min.js diff --git a/README.md b/README.md index 755c73f60..c10dd69bb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@

Open Source Point of Sale Logo

Open Source Point of Sale

+## ☢️ Bootstrap 5 conversion WIP + +This is a heavily under construction build converting OSPOS from Bootstrap 3 to Bootstrap 5. Please do not use! +

Introduction · Demo · Installation · Contributing · Bugs · FAQ · diff --git a/app/Controllers/Config.php b/app/Controllers/Config.php index 9f1da31f3..0a661c3aa 100644 --- a/app/Controllers/Config.php +++ b/app/Controllers/Config.php @@ -80,7 +80,7 @@ class Config extends Secure_Controller $npmDev = false; $license = []; - $license[$i]['title'] = 'Open Source Point Of Sale ' . config('App')->application_version; + $license[$i]['title'] = 'Open Source Point of Sale ' . config('App')->application_version; if (file_exists('license/LICENSE')) { $license[$i]['text'] = file_get_contents('license/LICENSE', false, null, 0, 3000); @@ -363,8 +363,6 @@ class Config extends Secure_Controller public function postSaveGeneral(): void { $batch_save_data = [ - 'theme' => $this->request->getPost('theme'), - 'login_form' => $this->request->getPost('login_form'), 'default_sales_discount_type' => $this->request->getPost('default_sales_discount_type') != null, 'default_sales_discount' => parse_decimals($this->request->getPost('default_sales_discount')), 'default_receivings_discount_type' => $this->request->getPost('default_receivings_discount_type') != null, @@ -372,8 +370,6 @@ class Config extends Secure_Controller 'enforce_privacy' => $this->request->getPost('enforce_privacy') != null, 'receiving_calculate_average_price' => $this->request->getPost('receiving_calculate_average_price') != null, 'lines_per_page' => $this->request->getPost('lines_per_page', FILTER_SANITIZE_NUMBER_INT), - 'notify_horizontal_position' => $this->request->getPost('notify_horizontal_position'), - 'notify_vertical_position' => $this->request->getPost('notify_vertical_position'), 'image_max_width' => $this->request->getPost('image_max_width', FILTER_SANITIZE_NUMBER_INT), 'image_max_height' => $this->request->getPost('image_max_height', FILTER_SANITIZE_NUMBER_INT), 'image_max_size' => $this->request->getPost('image_max_size', FILTER_SANITIZE_NUMBER_INT), @@ -410,6 +406,26 @@ class Config extends Secure_Controller echo json_encode(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]); } + /** + * Saves Appearance configuration. Used in app/Views/configs/appearance_config.php + */ + public function postSaveAppearance(): void + { + $batch_save_data = [ + 'theme' => $this->request->getPost('theme'), + 'login_form' => $this->request->getPost('login_form'), + 'notify_horizontal_position' => $this->request->getPost('notify_horizontal_position'), + 'notify_vertical_position' => $this->request->getPost('notify_vertical_position'), + 'color_mode' => $this->request->getPost('color_mode'), + 'config_menu_position' => $this->request->getPost('config_menu_position'), + 'responsive_design' => $this->request->getPost('responsive_design') != null + ]; + + $success = $this->appconfig->batch_save($batch_save_data); + + echo json_encode(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]); + } + /** * Checks a number against the currently selected locale. Used in app/Views/configs/locale_config.php * @@ -462,6 +478,7 @@ class Config extends Secure_Controller 'currency_code' => $this->request->getPost('currency_code'), 'language_code' => $exploded[0], 'language' => $exploded[1], + 'rtl_language' => $this->request->getPost('rtl_language') != null, 'timezone' => $this->request->getPost('timezone'), 'dateformat' => $this->request->getPost('dateformat'), 'timeformat' => $this->request->getPost('timeformat'), diff --git a/app/Database/tables.sql b/app/Database/tables.sql index 943706722..203bb2943 100644 --- a/app/Database/tables.sql +++ b/app/Database/tables.sql @@ -79,10 +79,14 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('smtp_timeout', '5'), ('smtp_crypto', 'ssl'), ('receipt_template', 'receipt_default'), - ('theme', 'flatly'), + ('theme', 'bootstrap'), ('statistics', '1'), ('language', 'english'), - ('language_code', 'en'); + ('language_code', 'en'), + ('rtl_language', '0'), + ('color_mode', 'light'), + ('config_menu_position', 'start'), + ('responsive_design', '1'); -- -------------------------------------------------------- diff --git a/app/Views/attributes/manage.php b/app/Views/attributes/manage.php index 91e9e5478..41e2a2355 100644 --- a/app/Views/attributes/manage.php +++ b/app/Views/attributes/manage.php @@ -8,6 +8,11 @@ + + -

-
diff --git a/app/Views/cashups/manage.php b/app/Views/cashups/manage.php index ac7e1adaf..7e236840a 100644 --- a/app/Views/cashups/manage.php +++ b/app/Views/cashups/manage.php @@ -9,6 +9,11 @@ + + diff --git a/app/Views/configs/barcode_config.php b/app/Views/configs/barcode_config.php index d20bcd328..3bc5c6fa5 100644 --- a/app/Views/configs/barcode_config.php +++ b/app/Views/configs/barcode_config.php @@ -6,251 +6,194 @@ */ ?> - 'barcode_config_form', 'class' => 'form-horizontal']) ?> -
-
+ 'barcode_config_form']) ?> -
-
    + -
    - 'control-label col-xs-2']) ?> -
    - -
    +
      + +
      +
      + +
      + +
      +
      -
      - 'control-label col-xs-2 required']) ?> -
      - '5', - 'max' => '350', - 'min' => '60', - 'type' => 'number', - 'name' => 'barcode_width', - 'id' => 'barcode_width', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_width'] - ]) ?> -
      +
      + +
      + + + px
      +
      -
      - 'control-label col-xs-2 required']) ?> -
      - 'number', - 'min' => 10, - 'max' => 120, - 'name' => 'barcode_height', - 'id' => 'barcode_height', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_height'] - ]) ?> -
      +
      + +
      + + + px
      - -
      - 'control-label col-xs-2 required']) ?> -
      - -
      -
      - 'number', - 'min' => '1', - 'max' => '30', - 'name' => 'barcode_font_size', - 'id' => 'barcode_font_size', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_font_size'] - ]) ?> -
      -
      - -
      - 'control-label col-xs-2']) ?> -
      - 'allow_duplicate_barcodes', - 'id' => 'allow_duplicate_barcodes', - 'value' => 'allow_duplicate_barcodes', - 'checked' => $config['allow_duplicate_barcodes'] == 1 - ]) ?> -   - -
      -
      - -
      - 'control-label col-xs-2']) ?> -
      - - -   -   - -
      -
      - -
      - 'control-label col-xs-2']) ?> -
      - settings['barcode_formats']); - echo form_dropdown([ - 'name' => 'barcode_formats[]', - 'id' => 'barcode_formats', - 'options' => !empty($barcode_formats) ? array_combine($barcode_formats, $barcode_formats) : [], - 'multiple' => 'multiple', - 'data-role' => 'tagsinput' - ]) ?> -
      -
      - -
      - 'control-label col-xs-2']) ?> -
      -
      - -
      - lang('Config.none'), - 'name' => lang('Items.name'), - 'category' => lang('Items.category'), - 'cost_price' => lang('Items.cost_price'), - 'unit_price' => lang('Items.unit_price'), - 'company_name' => lang('Suppliers.company_name') - ], - $config['barcode_first_row'], - ['class' => 'form-control input-sm'] - ); ?> -
      - -
      - lang('Config.none'), - 'name' => lang('Items.name'), - 'category' => lang('Items.category'), - 'cost_price' => lang('Items.cost_price'), - 'unit_price' => lang('Items.unit_price'), - 'item_code' => lang('Items.item_number'), - 'company_name' => lang('Suppliers.company_name') - ], - $config['barcode_second_row'], - ['class' => 'form-control input-sm'] - ) ?> -
      - -
      - lang('Config.none'), - 'name' => lang('Items.name'), - 'category' => lang('Items.category'), - 'cost_price' => lang('Items.cost_price'), - 'unit_price' => lang('Items.unit_price'), - 'item_code' => lang('Items.item_number'), - 'company_name' => lang('Suppliers.company_name') - ], - $config['barcode_third_row'], - ['class' => 'form-control input-sm'] - ) ?> -
      -
      -
      -
      - -
      - 'control-label col-xs-2 required']) ?> -
      - 'barcode_num_in_row', - 'id' => 'barcode_num_in_row', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_num_in_row'] - ]) ?> -
      -
      - -
      - 'control-label col-xs-2 required']) ?> -
      -
      - 'barcode_page_width', - 'id' => 'barcode_page_width', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_page_width'] - ]) ?> - % -
      -
      -
      - -
      - 'control-label col-xs-2 required']) ?> -
      -
      - 'barcode_page_cellspacing', - 'id' => 'barcode_page_cellspacing', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_page_cellspacing'] - ]) ?> - px -
      -
      -
      - - 'submit_barcode', - 'id' => 'submit_barcode', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
      +
      + +
      +
      + +
      + + +
      +
      + +
      + +
      + + + px +
      +
      +
      + +
      + > + +
      +
      + + +
      +
      +
      + > + +
      + +
      + > + +
      + +
      + > + +
      +
      +
      + +
      +
      + +
      + + + +
      +
      +
      + +
      + +
      +
      + + +
      +
      + +
      +
      + + +
      +
      + +
      +
      + + +
      +
      +
      + +
      +
      + +
      + + +
      +
      + +
      + +
      + + + +
      +
      + +
      + +
      + + + px +
      +
      +
      + +
      + +
      + + + - +
      +
      +
      + + + + + + + + + + + + + + + + +
      -
      -
      - +
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - -
      -
      - + +
      +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + + + diff --git a/app/Views/configs/message_config.php b/app/Views/configs/message_config.php index fcd6402f9..744ef30e6 100644 --- a/app/Views/configs/message_config.php +++ b/app/Views/configs/message_config.php @@ -5,85 +5,50 @@ ?> 'message_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> -
      -
      -
      -
        + -
        - 'control-label col-xs-2 required']) ?> -
        -
        - - - - 'msg_uid', - 'id' => 'msg_uid', - 'class' => 'form-control input-sm required', - 'value' => $config['msg_uid'] - ]) ?> -
        -
        +
          + +
          +
          + +
          + +
          +
          -
          - 'control-label col-xs-2 required']) ?> -
          -
          - - - - 'msg_pwd', - 'id' => 'msg_pwd', - 'class' => 'form-control input-sm required', - 'value' => $config['msg_pwd'] - ]) ?> -
          -
          +
          + +
          + +
          +
          -
          - 'control-label col-xs-2 required']) ?> -
          -
          - - - - 'msg_src', - 'id' => 'msg_src', - 'class' => 'form-control input-sm required', - 'value' => $config['msg_src'] == null ? $config['company'] : $config['msg_src'] - ]) ?> -
          -
          +
          + +
          + +
          - -
          - 'control-label col-xs-2']) ?> -
          - 'msg_msg', - 'id' => 'msg_msg', - 'class' => 'form-control input-sm', - 'value' => $config['msg_msg'], - 'placeholder' => lang('Config.msg_msg_placeholder') - ]) ?> -
          -
          - - 'submit_message', - 'id' => 'submit_message', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
          +
          + + +
          + + +
          + +
          + +
          + +
          -
          - -
          -
          -

          - -

          General Info

          -

          User Setup


          -

          Permissions

          -
          + +
          ' . lang('Config.security_issue') . '
          +
          +

          ' . lang('Config.perm_risk') . '

          +
            '; + } + if (substr(decoct(fileperms($logs)), -4) != 750) { + echo '
          • ' . $bullet . 'writable/logs ' . lang('Config.is_writable') . '
          • '; + } + + if (substr(decoct(fileperms($uploads)), -4) != 750) { + echo '
          • ' . $bullet . 'public/uploads ' . lang('Config.is_writable') . '
          • '; + } + + if (substr(decoct(fileperms($images)), -4) != 750) { + echo '
          • ' . $bullet . 'public/uploads/item_pics ' . lang('Config.is_writable') . '
          • '; + } + + if (!((substr(decoct(fileperms($importCustomers)), -4) == 640) + || (substr(decoct(fileperms($importCustomers)), -4) == 660))) { + echo '
          • ' . $bullet . 'importCustomers.csv ' . lang('Config.is_readable') . '
          • '; + } + echo '
          '; + ?> + +
          + +
          + application_version) . ' - ' . esc(substr(config(OSPOS::class)->commit_sha1, 0, 6)); ?>
          +
          Language Code:

          +
          +
          +
          + +
          +
          +
          + +
          +
          -

          - - application_version) ?> - commit_sha1, 0, 6)) ?>
          - Language Code:

          -
          - Extensions & Modules:
          - Enabled ✓' : 'Disabled ✗', '
          '; - echo "» BC Math: ", extension_loaded('bcmath') ? 'Enabled ✓' : 'Disabled ✗', '
          '; - echo "» INTL: ", extension_loaded('intl') ? 'Enabled ✓' : 'Disabled ✗', '
          '; - echo "» OpenSSL: ", extension_loaded('openssl') ? 'Enabled ✓' : 'Disabled ✗', '
          '; - echo "» MBString: ", extension_loaded('mbstring') ? 'Enabled ✓' : 'Disabled ✗', '
          '; - echo "» Curl: ", extension_loaded('curl') ? 'Enabled ✓' : 'Disabled ✗', '
          '; - echo "» Json: ", extension_loaded('json') ? 'Enabled ✓' : 'Disabled ✗', '

          '; - echo "» Xml: ", extension_loaded('xml') ? 'Enabled ✓' : 'Disabled ✗', '

          '; - ?> - User Configuration:
          - .Browser: - Extensions & Modules:
          +
            +
          • +
          • +
          • +
          • +
          • +
          • +
          • +
          +
          +
          + +
          + +
          +
            + 'Opera', - strpos($userAgent, 'Edge') !== false => 'Edge', - strpos($userAgent, 'Chrome') !== false => 'Chrome', - strpos($userAgent, 'Safari') !== false => 'Safari', + strpos($userAgent, 'Opera') !== false || strpos($userAgent, 'OPR/') !== false => 'Opera', + strpos($userAgent, 'Edge') !== false => 'Edge', + strpos($userAgent, 'Chrome') !== false => 'Chrome', + strpos($userAgent, 'Safari') !== false => 'Safari', strpos($userAgent, 'Firefox') !== false => 'Firefox', - strpos($userAgent, 'MSIE') !== false || strpos($userAgent, 'Trident/7') !== false => 'Internet Explorer', - default => 'Other', + strpos($userAgent, 'MSIE') !== false || strpos($userAgent, 'Trident/7') !== false => 'Internet Explorer', + default => 'Other', }; $version = match ($browser) { - 'Opera' => preg_match('/(Opera|OPR)\/([0-9.]+)/', $userAgent, $matches) ? $matches[2] : '', - 'Edge' => preg_match('/Edge\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', - 'Chrome' => preg_match('/Chrome\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', - 'Safari' => preg_match('/Version\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', - 'Firefox' => preg_match('/Firefox\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Opera' => preg_match('/(Opera|OPR)\/([0-9.]+)/', $userAgent, $matches) ? $matches[2] : '', + 'Edge' => preg_match('/Edge\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Chrome' => preg_match('/Chrome\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Safari' => preg_match('/Version\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Firefox' => preg_match('/Firefox\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', 'Internet Explorer' => preg_match('/(MSIE|rv:)([0-9.]+)/', $userAgent, $matches) ? $matches[2] : '', - default => '', + default => '', }; return $browser . ($version ? ' ' . $version : ''); } - echo esc(getBrowserNameAndVersion($_SERVER['HTTP_USER_AGENT'])); - ?>
            - Server Software:
            - PHP Version:
            - DB Version:
            - Server Port:
            - OS:

            -

            - - File Permissions:
            - » [writable/logs:] - Writable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($logs)), -4) . ' | ' . ' Not Writable ✗ '; - } - - clearstatcache(); - if (is_writable($logs) && substr(decoct(fileperms($logs)), -4) != 750) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓'; - } - clearstatcache(); - ?> -
            - » [public/uploads:] - Writable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($uploads)), -4) . ' | ' . ' Not Writable ✗ '; - } - - clearstatcache(); - - if (is_writable($uploads) && substr(decoct(fileperms($uploads)), -4) != 750) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓ '; - } - - clearstatcache(); - ?> -
            - » [public/uploads/item_pics:] - Writable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($images)), -4) . ' | ' . ' Not Writable ✗ '; - } - - clearstatcache(); - - if (substr(decoct(fileperms($images)), -4) != 750) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓ '; - } - - clearstatcache(); - ?> -
            - » [importCustomers.csv:] - Readable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($importCustomers)), -4) . ' | ' . ' Not Readable ✗ '; - } - clearstatcache(); - - if (!((substr(decoct(fileperms($importCustomers)), -4) == 640) || (substr(decoct(fileperms($importCustomers)), -4) == 660))) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓ '; - } - clearstatcache(); - ?> -
            - ' . lang('Config.security_issue') . '
            ' . lang('Config.perm_risk') . '

            '; - } else { - echo '
            ' . lang('Config.no_risk') . '
            '; - } - - if (substr(decoct(fileperms($logs)), -4) != 750) { - echo '
            » [writable/logs:] ' . lang('Config.is_writable') . ''; - } - - if (substr(decoct(fileperms($uploads)), -4) != 750) { - echo '
            » [writable/uploads:] ' . lang('Config.is_writable') . ''; - } - - if (substr(decoct(fileperms($images)), -4) != 750) { - echo '
            » [writable/uploads/item_pics:] ' . lang('Config.is_writable') . ''; - } - - if (!((substr(decoct(fileperms($importCustomers)), -4) == 640) - || (substr(decoct(fileperms($importCustomers)), -4) == 660))) { - echo '
            » [importCustomers.csv:] ' . lang('Config.is_readable') . ''; - } - ?> -
          + ?> +
        • +
        • +
        • +
        • +
        • +
        • +
          + +
          + +
          +
            +
          • + writable/logs + +
          • +
          • + public/uploads + +
          • +
          • + public/uploads/item_pics + +
          • +
          • + importCustomers.csv + +
          • +
          + ' . lang('Config.no_risk') . ''; + } + ?> +
          +
          + + +
          + +
          -
          - Copy Info | - -
          + document.getElementById("timezone").innerText = Intl.DateTimeFormat().resolvedOptions().timeZone; + + $(function() { + $('#timezone').clone().appendTo('#timezoneE'); + }); + + if ($('#timezone').html() !== $('#ostimezone').html()) { + $('#time-error').removeClass('d-none'); + }; + diff --git a/app/Views/configs/table_config.php b/app/Views/configs/table_config.php index d54452283..a84cb71f7 100644 --- a/app/Views/configs/table_config.php +++ b/app/Views/configs/table_config.php @@ -5,38 +5,28 @@ */ ?> - 'table_config_form', 'class' => 'form-horizontal']) ?> -
          -
          + 'table_config_form']) ?> -
          -
            + -
            - 'control-label col-xs-2']) ?> -
            - 'dinner_table_enable', - 'value' => 'dinner_table_enable', - 'id' => 'dinner_table_enable', - 'checked' => $config['dinner_table_enable'] == 1 - ]) ?> -
            -
            +
              -
              - $dinner_tables]) ?> -
              - - 'submit_table', - 'id' => 'submit_table', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
              +
              + > +
              + +
              + $dinner_tables]) ?> +
              + +
              + +
              + -
              -
              -
              diff --git a/app/Views/giftcards/manage.php b/app/Views/giftcards/manage.php index 4dc0b8fe9..26be29b7e 100644 --- a/app/Views/giftcards/manage.php +++ b/app/Views/giftcards/manage.php @@ -8,6 +8,11 @@ + + -
              -
              -
              -
              diff --git a/app/Views/home/form_change_password.php b/app/Views/home/form_change_password.php deleted file mode 100644 index 53d0191fe..000000000 --- a/app/Views/home/form_change_password.php +++ /dev/null @@ -1,138 +0,0 @@ - - -
              -
                - -person_id", ['id' => 'employee_form', 'class' => 'form-horizontal']) ?> -
                -
                -
                - -
                - 'required control-label col-xs-3']) ?> -
                -
                - - - - 'username', - 'id' => 'username', - 'class' => 'form-control input-sm', - 'value' => $person_info->username, - 'readonly' => 'true' - ]) ?> -
                -
                -
                - - person_id == "" ? ['class' => 'required'] : []; ?> - -
                - 'control-label col-xs-3'])) ?> -
                -
                - - - - 'current_password', - 'id' => 'current_password', - 'class' => 'form-control input-sm' - ]) ?> -
                -
                -
                - -
                - 'control-label col-xs-3'])) ?> -
                -
                - - - - 'password', - 'id' => 'password', - 'class' => 'form-control input-sm' - ]) ?> -
                -
                -
                - -
                - 'control-label col-xs-3'])) ?> -
                -
                - - - - 'repeat_password', - 'id' => 'repeat_password', - 'class' => 'form-control input-sm' - ]) ?> -
                -
                -
                - -
                -
                -
                - - - diff --git a/app/Views/home/home.php b/app/Views/home/home.php index 84237c90f..1cc66f368 100644 --- a/app/Views/home/home.php +++ b/app/Views/home/home.php @@ -6,19 +6,6 @@ - - -

                - - + diff --git a/app/Views/home/modules.php b/app/Views/home/modules.php new file mode 100644 index 000000000..d1749cfa6 --- /dev/null +++ b/app/Views/home/modules.php @@ -0,0 +1,16 @@ +

                + +
                + + + +
                diff --git a/app/Views/home/office.php b/app/Views/home/office.php index 8509c63dc..1cc66f368 100644 --- a/app/Views/home/office.php +++ b/app/Views/home/office.php @@ -6,19 +6,6 @@ - - -

                - - + diff --git a/app/Views/home/profile.php b/app/Views/home/profile.php new file mode 100644 index 000000000..0d9932d65 --- /dev/null +++ b/app/Views/home/profile.php @@ -0,0 +1,137 @@ +email; +$size = 96; +$default = 'https://ui-avatars.com/api/?name=' . $user_info->first_name . '+' . $user_info->last_name . '&format=svg&size=' . $size; +$grav_url = 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($email))) . '?d=' . urlencode($default) . '&s=' . $size; +?> + + diff --git a/app/Views/item_kits/manage.php b/app/Views/item_kits/manage.php index 99a401190..e259a823d 100644 --- a/app/Views/item_kits/manage.php +++ b/app/Views/item_kits/manage.php @@ -8,6 +8,11 @@ + + -
                -
                -
                - - -
                diff --git a/app/Views/items/form_csv_import.php b/app/Views/items/form_csv_import.php index cb4e1b985..740dc90f7 100644 --- a/app/Views/items/form_csv_import.php +++ b/app/Views/items/form_csv_import.php @@ -12,7 +12,7 @@
                -
                +
                diff --git a/app/Views/items/manage.php b/app/Views/items/manage.php index 72920a505..25820033e 100644 --- a/app/Views/items/manage.php +++ b/app/Views/items/manage.php @@ -13,6 +13,11 @@ use App\Models\Employee; + + -
                -
                diff --git a/app/Views/login.php b/app/Views/login.php index ac47bef1c..ee5b3874f 100644 --- a/app/Views/login.php +++ b/app/Views/login.php @@ -7,32 +7,51 @@ * @var array $config * @var $validation */ + +// Manually setting some error messages for testing +// $validation->setError('test', 'The test error is testing.'); +// $validation->setError('email', 'The email field is required.'); +// $has_errors = $validation->hasError('email'); +// $has_errors = $validation->hasError('test'); + +// Manually set database migration message to show +// $is_latest = false; +// $latest_version = '1.0.0'; + +// Manually set language for page, doesn't work for dynamic elements +// \Config\Services::language()->setLocale('de-DE'); + +// Manually set login form appearence +// $config['login_form'] = 'input_groups'; + +// Manually set theme +// $config['theme'] = 'cerulean'; + ?> - +> <?= $config['company'] . ' | ' . lang('Common.software_short') . ' | ' . lang('Login.login') ?> - + ' : '' ?> - - /bootstrap.min.css"> + + /bootstrap.min.css"> + +
                -