From 5e474e4bf79fdb916ab0352486da7d2ec2ae342a Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 18 Jul 2023 16:30:12 +0700 Subject: [PATCH] Add Setting to disable Voucher --- CHANGELOG.md | 6 ++++++ system/controllers/settings.php | 12 ++++++++++++ system/lan/english/common.lan.php | 1 + ui/ui/app-settings.tpl | 30 +++++++++++++++++++++--------- ui/ui/sections/header.tpl | 10 ++++++---- ui/ui/sections/user-header.tpl | 2 ++ ui/ui/user-dashboard.tpl | 14 +++++++++++++- 7 files changed, 61 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c5b4135..4c32f1d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ # CHANGELOG +## 2023 + +- Fix link buy Voucher +- Add email field to registration form +- Change registration design Form +- Add Setting to disable Voucher ## 2023.6.20 - Hide time for Created date. diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 8a5e818e..6a5625c6 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -206,6 +206,7 @@ switch ($action) { case 'app-post': $company = _post('company'); $footer = _post('footer'); + $disable_voucher = _post('disable_voucher'); $telegram_bot = _post('telegram_bot'); $telegram_target_id = _post('telegram_target_id'); $sms_url = _post('sms_url'); @@ -245,6 +246,17 @@ switch ($action) { $d->save(); } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one(); + if($d){ + $d->value = $disable_voucher; + $d->save(); + }else{ + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'disable_voucher'; + $d->value = $disable_voucher; + $d->save(); + } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_bot')->find_one(); if($d){ $d->value = $telegram_bot; diff --git a/system/lan/english/common.lan.php b/system/lan/english/common.lan.php index 31702f9a..73f54b21 100644 --- a/system/lan/english/common.lan.php +++ b/system/lan/english/common.lan.php @@ -331,3 +331,4 @@ $_L['Your_account_not_connected_to_internet'] = 'Your account not connected to i $_L['Failed_to_create_transaction_'] = 'Failed to create transaction. '; $_L['Failed_to_check_status_transaction_'] = 'Failed to check status transaction. '; +$_L['Disable_Voucher'] = 'Disable Voucher'; diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 683276d6..f8ffb419 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -56,6 +56,16 @@

edit at config.php

+
+ +
+ +

Voucher activation menu will be hidden

+
+
Telegram Notification
@@ -155,17 +165,19 @@ add dst-host=*.tawk.to {$_L['You_can_use_html_tag']}
-
-
- -
-
-
/ip hotspot walled-garden
-add dst-host={$_domain}
-add dst-host=*.{$_domain}
+ +
+
+ +
+
+ +
/ip hotspot walled-garden
+            add dst-host={$_domain}
+            add dst-host=*.{$_domain}
diff --git a/ui/ui/sections/header.tpl b/ui/ui/sections/header.tpl index 2da993e0..187b5dad 100644 --- a/ui/ui/sections/header.tpl +++ b/ui/ui/sections/header.tpl @@ -129,10 +129,12 @@