|
@@ -95,6 +95,8 @@ class DistAdminDistributorController extends AdminController
|
|
|
$show->field('dist_email',admin_trans_label('email'));
|
|
|
$show->field('dist_contact_number',admin_trans_label('contact_number'));
|
|
|
$show->field('country');
|
|
|
+ $show->field('country_alpha_2');
|
|
|
+ $show->field('country_lang');
|
|
|
$show->field('address');
|
|
|
|
|
|
|
|
@@ -122,17 +124,13 @@ class DistAdminDistributorController extends AdminController
|
|
|
$form->select('country')
|
|
|
->options(BaseIso3166::selectOptions())
|
|
|
->width(9,3)->required();
|
|
|
+ $form->text('country_lang')->width(9,3)->required()->help('Please enter the language code, such as en ru es');
|
|
|
$form->text('address')->width(9,3);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
$form->switch('enabled')->width(9,3)->default(1);
|
|
|
-
|
|
|
+
|
|
|
+ $form->saving(function (Form $form) {
|
|
|
+ $form->country_alpha_2 = BaseIso3166::getAlpha2($form->country);
|
|
|
+ });
|
|
|
|
|
|
$form->saved(function (Form $form, $result) {
|
|
|
if ($form->isCreating()) {
|