Index: branches/5.2.x/core/units/country_states/country_states_config.php =================================================================== diff -u -N -r15177 -r16388 --- branches/5.2.x/core/units/country_states/country_states_config.php (.../country_states_config.php) (revision 15177) +++ branches/5.2.x/core/units/country_states/country_states_config.php (.../country_states_config.php) (revision 16388) @@ -1,6 +1,6 @@ 'country-state', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'CountryStateEventHandler', 'file' => 'country_state_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => 'country-state', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'CountryStateEventHandler', 'file' => 'country_state_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'event', - 4 => 'mode', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'event', + 4 => 'mode', + ), - 'IDField' => 'CountryStateId', + 'IDField' => 'CountryStateId', - 'TableName' => TABLE_PREFIX . 'CountryStates', + 'TableName' => TABLE_PREFIX . 'CountryStates', - 'TitleField' => 'Translation', + 'TitleField' => 'Translation', - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('country-state' => '!la_title_AddingCountryState!'), - 'edit_status_labels' => Array ('country-state' => '!la_title_EditingCountryState!'), - ), - - 'country_state_list' => Array ( - 'prefixes' => Array ('country-state_List'), 'format' => "!la_title_CountryStates!", - 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'), - ), - - 'country_state_edit' => Array ( - 'prefixes' => Array ('country-state'), 'format' => "#country-state_status# '#country-state_titlefield#'", - 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('country-state' => '!la_title_AddingCountryState!'), + 'edit_status_labels' => Array ('country-state' => '!la_title_EditingCountryState!'), ), - 'PermSection' => Array('main' => 'in-portal:country_states'), - - 'Sections' => Array ( - 'in-portal:country_states' => Array ( - 'parent' => 'in-portal:website_setting_folder', - 'icon' => 'conf_country_states', - 'label' => 'la_title_CountryStates', - 'url' => Array('t' => 'country_states/country_state_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), - 'priority' => 10, - 'type' => stTREE, - ), + 'country_state_list' => Array ( + 'prefixes' => Array ('country-state_List'), 'format' => "!la_title_CountryStates!", + 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'view', 'dbl-click'), ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s FROM %1$s', + 'country_state_edit' => Array ( + 'prefixes' => Array ('country-state'), 'format' => "#country-state_status# '#country-state_titlefield#'", + 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), ), + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('Type' => 'asc', 'Translation' => 'asc'), - ) - ), + 'PermSection' => Array ('main' => 'in-portal:country_states'), - 'CalculatedFields' => Array ( - '' => Array ( - 'Translation' => '%1$s.l%2$s_Name', - ), + 'Sections' => Array ( + 'in-portal:country_states' => Array ( + 'parent' => 'in-portal:website_setting_folder', + 'icon' => 'conf_country_states', + 'label' => 'la_title_CountryStates', + 'url' => Array ('t' => 'country_states/country_state_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 10, + 'type' => stTREE, ), + ), - 'Fields' => Array ( - 'CountryStateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'Type' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Country', 2 => 'la_opt_State'), 'use_phrases' => 1, - 'not_null' => 1, 'required' => 1, 'default' => 1 - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Type' => 'asc', 'Translation' => 'asc'), + ) + ), - 'StateCountryId' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, CountryStateId - FROM ' . TABLE_PREFIX . 'CountryStates - WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' - ORDER BY Name', - 'option_key_field' => 'CountryStateId', 'option_title_field' => 'Name', - 'default' => NULL - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'Translation' => '%1$s.l%2$s_Name', + ), + ), - 'Name' => Array ( - 'type' => 'string', 'max_len' => 255, - 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', - 'not_null' => 1, 'required' => 1, 'default' => '' - ), + 'Fields' => Array ( + 'CountryStateId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'IsoCode' => Array ('type' => 'string', 'max_len' => 3, 'not_null' => 1, 'unique' => Array ('Type', 'StateCountryId'), 'required' => 1, 'default' => ''), - 'ShortIsoCode' => Array ('type' => 'string', 'max_len' => 2, 'default' => NULL), + 'Type' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Country', 2 => 'la_opt_State'), 'use_phrases' => 1, + 'not_null' => 1, 'required' => 1, 'default' => 1 ), - 'VirtualFields' => Array ( - 'Translation' => Array ('type' => 'string', 'default' => ''), + 'StateCountryId' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, CountryStateId + FROM ' . TABLE_PREFIX . 'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'CountryStateId', 'option_title_field' => 'Name', + 'default' => NULL ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ('default' => 'icon16_item.png'), - 'Fields' => Array ( - 'CountryStateId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ), - 'IsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), - 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'StateCountryId' => Array ('title' => 'column:la_fld_StateCountry', 'filter_block' => 'grid_options_filter', 'width' => 200, ), - 'ShortIsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 125, ), - ), + 'Name' => Array ( + 'type' => 'string', 'max_len' => 255, + 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', + 'not_null' => 1, 'required' => 1, 'default' => '' + ), + + 'IsoCode' => Array ('type' => 'string', 'max_len' => 3, 'not_null' => 1, 'unique' => Array ('Type', 'StateCountryId'), 'required' => 1, 'default' => ''), + 'ShortIsoCode' => Array ('type' => 'string', 'max_len' => 2, 'default' => NULL), + ), + + 'VirtualFields' => Array ( + 'Translation' => Array ('type' => 'string', 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ('default' => 'icon16_item.png'), + 'Fields' => Array ( + 'CountryStateId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ), + 'IsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'StateCountryId' => Array ('title' => 'column:la_fld_StateCountry', 'filter_block' => 'grid_options_filter', 'width' => 200, ), + 'ShortIsoCode' => Array ('filter_block' => 'grid_like_filter', 'width' => 125, ), ), ), - ); + ), +); \ No newline at end of file