diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 8423c91b..3c10a010 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -394,6 +394,7 @@ switch ($action) { case 'localisation-post': $tzone = _post('tzone'); $date_format = _post('date_format'); + $country_code_phone = _post('country_code_phone'); $lan = _post('lan'); run_hook('save_localisation'); #HOOK if ($tzone == '' or $date_format == '' or $lan == '') { @@ -421,6 +422,18 @@ switch ($action) { $d->save(); } + + $d = ORM::for_table('tbl_appconfig')->where('setting', 'country_code_phone')->find_one(); + if($d){ + $d->value = $country_code_phone; + $d->save(); + }else{ + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'country_code_phone'; + $d->value = $country_code_phone; + $d->save(); + } + $currency_code = $_POST['currency_code']; $d = ORM::for_table('tbl_appconfig')->where('setting', 'currency_code')->find_one(); $d->value = $currency_code; diff --git a/ui/ui/app-localisation.tpl b/ui/ui/app-localisation.tpl index ebbc960a..a5ca2ba5 100644 --- a/ui/ui/app-localisation.tpl +++ b/ui/ui/app-localisation.tpl @@ -1,80 +1,107 @@ {include file="sections/header.tpl"} -