diff --git a/system/controllers/customers.php b/system/controllers/customers.php index dfff613c..b21ffd12 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -315,6 +315,7 @@ switch ($action) { ->find_many(); if ($d) { $ui->assign('d', $d); + $ui->assign('statuses', ORM::for_table('tbl_customers')->getEnum("status")); $ui->assign('customFields', $customFields); $ui->assign('xheader', $leafletpickerHeader); $ui->display('customers-edit.tpl'); diff --git a/system/controllers/home.php b/system/controllers/home.php index 7bba5d1d..d1a24a9a 100644 --- a/system/controllers/home.php +++ b/system/controllers/home.php @@ -18,7 +18,7 @@ if (isset($_GET['renewal'])) { if (_post('send') == 'balance') { if ($config['enable_balance'] == 'yes' && $config['allow_balance_transfer'] == 'yes') { - if ($user['status'] == 'Disabled') { + if ($user['status'] == 'Active') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } $target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one(); @@ -80,7 +80,7 @@ if (_post('send') == 'balance') { r2(U . 'home', 'd', Lang::T('Failed, balance is not available')); } } else if (_post('send') == 'plan') { - if ($user['status'] == 'Disabled') { + if ($user['status'] == 'Active') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } $actives = ORM::for_table('tbl_user_recharges') @@ -98,7 +98,7 @@ if (_post('send') == 'balance') { $ui->assign('_bills', User::_billing()); if (isset($_GET['recharge']) && !empty($_GET['recharge'])) { - if ($user['status'] == 'Disabled') { + if ($user['status'] == 'Active') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } if (!empty(App::getTokenValue(_get('stoken')))) { @@ -128,7 +128,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) { } } } else if (!empty(_get('extend'))) { - if ($user['status'] == 'Disabled') { + if ($user['status'] == 'Active') { _alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', ""); } if (!$config['extend_expired']) { diff --git a/system/lan/english.json b/system/lan/english.json index 5f8ec277..fefadfc5 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -589,5 +589,7 @@ "Don_t_forget_to_deactivate_all_active_plan_too": "Don't forget to deactivate all active plan too", "Ascending": "Ascending", "Descending": "Descending", - "Created_Date": "Created Date" + "Created_Date": "Created Date", + "Inactive": "Inactive", + "Suspended": "Suspended" } \ No newline at end of file diff --git a/system/lan/indonesia.json b/system/lan/indonesia.json index 609fb862..f1ce7be2 100644 --- a/system/lan/indonesia.json +++ b/system/lan/indonesia.json @@ -474,5 +474,7 @@ "SMS_and_WhatsApp": "SMS dan WhatsApp", "The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna", "Disabled": "Dinonaktifkan", - "Banned": "Banned" + "Banned": "Dicekal", + "Inactive": "Tidak Aktif", + "Suspended": "Disuspend" } diff --git a/ui/ui/customers-edit.tpl b/ui/ui/customers-edit.tpl index f0564cb8..23c59ff7 100644 --- a/ui/ui/customers-edit.tpl +++ b/ui/ui/customers-edit.tpl @@ -112,14 +112,10 @@