Add new status when edit customers
This commit is contained in:
parent
1bada918b9
commit
41161ebc7c
@ -315,6 +315,7 @@ switch ($action) {
|
|||||||
->find_many();
|
->find_many();
|
||||||
if ($d) {
|
if ($d) {
|
||||||
$ui->assign('d', $d);
|
$ui->assign('d', $d);
|
||||||
|
$ui->assign('statuses', ORM::for_table('tbl_customers')->getEnum("status"));
|
||||||
$ui->assign('customFields', $customFields);
|
$ui->assign('customFields', $customFields);
|
||||||
$ui->assign('xheader', $leafletpickerHeader);
|
$ui->assign('xheader', $leafletpickerHeader);
|
||||||
$ui->display('customers-edit.tpl');
|
$ui->display('customers-edit.tpl');
|
||||||
|
@ -18,7 +18,7 @@ if (isset($_GET['renewal'])) {
|
|||||||
|
|
||||||
if (_post('send') == 'balance') {
|
if (_post('send') == 'balance') {
|
||||||
if ($config['enable_balance'] == 'yes' && $config['allow_balance_transfer'] == 'yes') {
|
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', "");
|
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||||
}
|
}
|
||||||
$target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one();
|
$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'));
|
r2(U . 'home', 'd', Lang::T('Failed, balance is not available'));
|
||||||
}
|
}
|
||||||
} else if (_post('send') == 'plan') {
|
} else if (_post('send') == 'plan') {
|
||||||
if ($user['status'] == 'Disabled') {
|
if ($user['status'] == 'Active') {
|
||||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||||
}
|
}
|
||||||
$actives = ORM::for_table('tbl_user_recharges')
|
$actives = ORM::for_table('tbl_user_recharges')
|
||||||
@ -98,7 +98,7 @@ if (_post('send') == 'balance') {
|
|||||||
$ui->assign('_bills', User::_billing());
|
$ui->assign('_bills', User::_billing());
|
||||||
|
|
||||||
if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
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', "");
|
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||||
}
|
}
|
||||||
if (!empty(App::getTokenValue(_get('stoken')))) {
|
if (!empty(App::getTokenValue(_get('stoken')))) {
|
||||||
@ -128,7 +128,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!empty(_get('extend'))) {
|
} else if (!empty(_get('extend'))) {
|
||||||
if ($user['status'] == 'Disabled') {
|
if ($user['status'] == 'Active') {
|
||||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||||
}
|
}
|
||||||
if (!$config['extend_expired']) {
|
if (!$config['extend_expired']) {
|
||||||
|
@ -589,5 +589,7 @@
|
|||||||
"Don_t_forget_to_deactivate_all_active_plan_too": "Don't forget to deactivate all active plan too",
|
"Don_t_forget_to_deactivate_all_active_plan_too": "Don't forget to deactivate all active plan too",
|
||||||
"Ascending": "Ascending",
|
"Ascending": "Ascending",
|
||||||
"Descending": "Descending",
|
"Descending": "Descending",
|
||||||
"Created_Date": "Created Date"
|
"Created_Date": "Created Date",
|
||||||
|
"Inactive": "Inactive",
|
||||||
|
"Suspended": "Suspended"
|
||||||
}
|
}
|
@ -474,5 +474,7 @@
|
|||||||
"SMS_and_WhatsApp": "SMS dan WhatsApp",
|
"SMS_and_WhatsApp": "SMS dan WhatsApp",
|
||||||
"The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna",
|
"The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna",
|
||||||
"Disabled": "Dinonaktifkan",
|
"Disabled": "Dinonaktifkan",
|
||||||
"Banned": "Banned"
|
"Banned": "Dicekal",
|
||||||
|
"Inactive": "Tidak Aktif",
|
||||||
|
"Suspended": "Disuspend"
|
||||||
}
|
}
|
||||||
|
@ -112,14 +112,10 @@
|
|||||||
<label class="col-md-3 control-label">{Lang::T('Status')}</label>
|
<label class="col-md-3 control-label">{Lang::T('Status')}</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<select class="form-control" id="status" name="status">
|
<select class="form-control" id="status" name="status">
|
||||||
<option value="Active" {if $d['status'] eq 'Active' }selected{/if}>{Lang::T('Active')}
|
{foreach $statuses as $status}
|
||||||
</option>
|
<option value="{$status}" {if $d['status'] eq $status }selected{/if}>{Lang::T($status)}
|
||||||
<option value="Disabled" {if $d['status'] eq 'Disabled' }selected{/if}>
|
|
||||||
{Lang::T('Disabled')}
|
|
||||||
</option>
|
|
||||||
<option value="Banned" {if $d['status'] eq 'Banned' }selected{/if}>
|
|
||||||
{Lang::T('Banned')}
|
|
||||||
</option>
|
</option>
|
||||||
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block">
|
<span class="help-block">
|
||||||
{Lang::T('Banned')}: {Lang::T('Customer cannot login again')}.<br>
|
{Lang::T('Banned')}: {Lang::T('Customer cannot login again')}.<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user