Index: branches/5.2.x/core/units/country_states/country_state_eh.php =================================================================== diff -u -N -r14628 -r14820 --- branches/5.2.x/core/units/country_states/country_state_eh.php (.../country_state_eh.php) (revision 14628) +++ branches/5.2.x/core/units/country_states/country_state_eh.php (.../country_state_eh.php) (revision 14820) @@ -1,6 +1,6 @@ Array ('self' => true), + ); + + $this->permMapping = array_merge($this->permMapping, $permissions); + } + /** * Applies edit picker filters * @@ -114,4 +125,22 @@ return ; } } + + /** + * Returns given country states in JSON format + * + * @param kEvent $event + * @return void + * @access protected + */ + protected function OnGetStatesJSON(kEvent &$event) + { + $event->status = kEvent::erSTOP; + + $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); + /* @var $cs_helper kCountryStatesHelper */ + + $states = $cs_helper->getStates( (string)$this->Application->GetVar('country_iso') ); + echo json_encode($states); + } }