@@ -91,7 +91,30 @@ class LocationDropdown extends Widget
91
91
* @var bool $isHorizontal If you want to make it form horizontal
92
92
*/
93
93
public $ isHorizontal = true ;
94
-
94
+ /**
95
+ * @var string $countryLabel label for Country
96
+ */
97
+ public $ countryLabel = "Negara " ;
98
+ /**
99
+ * @var string $addressLabel label for Address
100
+ */
101
+ public $ addressLabel = "Alamat (<small>hanya menuliskan Nama jalan, No rumah, Rt/Rw</small>) " ;
102
+ /**
103
+ * @var string $provinceLabel label for Province
104
+ */
105
+ public $ provinceLabel = "Provinsi " ;
106
+ /**
107
+ * @var string $districtLabel label for District
108
+ */
109
+ public $ districtLabel = "Kota/Kabupaten " ;
110
+ /**
111
+ * @var string $subdistrictLabel label for Sub-District
112
+ */
113
+ public $ subdistrictLabel = "Kecamatan " ;
114
+ /**
115
+ * @var string $villageLabel label for Village
116
+ */
117
+ public $ villageLabel = "Kelurahan/Desa " ;
95
118
/**
96
119
* @var string[] $dataLocation1 Array of options for location 1
97
120
*/
@@ -322,7 +345,7 @@ protected function selectCountry()
322
345
$ isRequired = $ this ->model ->isAttributeRequired ($ this ->attributeCountry );
323
346
324
347
$ dropdown = Html::beginTag ('div ' , ['style ' =>'padding-top:5px; ' ]);
325
- $ dropdown .= ' Negara ' ;
348
+ $ dropdown .= $ this -> countryLabel ;
326
349
$ dropdown .= ($ isRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null );
327
350
$ dropdown .= Html::endTag ('div ' );
328
351
$ dropdown .= Select2::widget ([
@@ -342,7 +365,7 @@ protected function selectCountry()
342
365
protected function textAddress ()
343
366
{
344
367
return Html::beginTag ('div ' , ['style ' =>'padding-top:5px; ' ]) .
345
- ' Alamat (<small>hanya menuliskan Nama jalan, No rumah, Rt/Rw</small>) ' .
368
+ $ this -> addressLabel .
346
369
($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
347
370
Html::endTag ('div ' ) .
348
371
Html::activeTextarea ($ this ->model , $ this ->attributeAddress , array (
@@ -356,7 +379,7 @@ protected function textAddress()
356
379
protected function selectProvince ()
357
380
{
358
381
return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
359
- ' Provinsi ' .
382
+ $ this -> provinceLabel .
360
383
($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
361
384
Html::endTag ('div ' ) .
362
385
Select2::widget ([
@@ -374,7 +397,7 @@ protected function selectProvince()
374
397
protected function selectDistrict ()
375
398
{
376
399
return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
377
- ' Kota/Kabupaten ' .
400
+ $ this -> districtLabel .
378
401
($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
379
402
Html::endTag ('div ' ) .
380
403
Select2::widget ([
@@ -392,7 +415,7 @@ protected function selectDistrict()
392
415
protected function selectSubDistrict ()
393
416
{
394
417
return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
395
- ' Kecamatan ' .
418
+ $ this -> subdistrictLabel .
396
419
($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
397
420
Html::endTag ('div ' ) .
398
421
Select2::widget ([
@@ -410,7 +433,7 @@ protected function selectSubDistrict()
410
433
protected function selectVillage ()
411
434
{
412
435
return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
413
- ' Kelurahan/Desa ' .
436
+ $ this -> villageLabel .
414
437
($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
415
438
Html::endTag ('div ' ) .
416
439
Select2::widget ([
0 commit comments