@@ -91,7 +91,30 @@ class LocationDropdown extends Widget
9191 * @var bool $isHorizontal If you want to make it form horizontal
9292 */
9393 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 " ;
95118 /**
96119 * @var string[] $dataLocation1 Array of options for location 1
97120 */
@@ -322,7 +345,7 @@ protected function selectCountry()
322345 $ isRequired = $ this ->model ->isAttributeRequired ($ this ->attributeCountry );
323346
324347 $ dropdown = Html::beginTag ('div ' , ['style ' =>'padding-top:5px; ' ]);
325- $ dropdown .= ' Negara ' ;
348+ $ dropdown .= $ this -> countryLabel ;
326349 $ dropdown .= ($ isRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null );
327350 $ dropdown .= Html::endTag ('div ' );
328351 $ dropdown .= Select2::widget ([
@@ -342,7 +365,7 @@ protected function selectCountry()
342365 protected function textAddress ()
343366 {
344367 return Html::beginTag ('div ' , ['style ' =>'padding-top:5px; ' ]) .
345- ' Alamat (<small>hanya menuliskan Nama jalan, No rumah, Rt/Rw</small>) ' .
368+ $ this -> addressLabel .
346369 ($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
347370 Html::endTag ('div ' ) .
348371 Html::activeTextarea ($ this ->model , $ this ->attributeAddress , array (
@@ -356,7 +379,7 @@ protected function textAddress()
356379 protected function selectProvince ()
357380 {
358381 return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
359- ' Provinsi ' .
382+ $ this -> provinceLabel .
360383 ($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
361384 Html::endTag ('div ' ) .
362385 Select2::widget ([
@@ -374,7 +397,7 @@ protected function selectProvince()
374397 protected function selectDistrict ()
375398 {
376399 return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
377- ' Kota/Kabupaten ' .
400+ $ this -> districtLabel .
378401 ($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
379402 Html::endTag ('div ' ) .
380403 Select2::widget ([
@@ -392,7 +415,7 @@ protected function selectDistrict()
392415 protected function selectSubDistrict ()
393416 {
394417 return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
395- ' Kecamatan ' .
418+ $ this -> subdistrictLabel .
396419 ($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
397420 Html::endTag ('div ' ) .
398421 Select2::widget ([
@@ -410,7 +433,7 @@ protected function selectSubDistrict()
410433 protected function selectVillage ()
411434 {
412435 return Html::beginTag ('div ' , ['class ' =>'padding-top:5px; ' ]) .
413- ' Kelurahan/Desa ' .
436+ $ this -> villageLabel .
414437 ($ this ->allRequired ? Html::tag ('span ' , '* ' , ['class ' =>'required ' ]) : null ) .
415438 Html::endTag ('div ' ) .
416439 Select2::widget ([
0 commit comments