Index: branches/5.2.x/units/payment_type/payment_type_config.php =================================================================== diff -u -N -r15376 -r16385 --- branches/5.2.x/units/payment_type/payment_type_config.php (.../payment_type_config.php) (revision 15376) +++ branches/5.2.x/units/payment_type/payment_type_config.php (.../payment_type_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'pt', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'PaymentTypeEventHandler', 'file' => 'payment_type_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'PaymentTypeTagProcessor', 'file' => 'payment_type_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'pt', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PaymentTypeEventHandler', 'file' => 'payment_type_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PaymentTypeTagProcessor', 'file' => 'payment_type_tag_processor.php', 'build_event' => 'OnBuild'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'IDField' => 'PaymentTypeId', - 'StatusField' => Array ('Status', 'IsPrimary'), - 'TableName' => TABLE_PREFIX.'PaymentTypes', + 'AutoLoad' => true, - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('pt' => '!la_title_AddingPaymentType!'), - 'edit_status_labels' => Array ('pt' => '!la_title_EditingPaymentType!'), - 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'payment_type_list' =>Array ( 'prefixes' => Array ('pt_List'), - 'format' => "!la_title_PaymentTypes!", - ), + 'IDField' => 'PaymentTypeId', + 'StatusField' => Array ('Status', 'IsPrimary'), + 'TableName' => TABLE_PREFIX.'PaymentTypes', - 'payment_type_edit' =>Array ( 'prefixes' => Array ('pt'), - 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), - 'format' => "#pt_status# '#pt_titlefield#' - !la_title_General!", - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('pt' => '!la_title_AddingPaymentType!'), + 'edit_status_labels' => Array ('pt' => '!la_title_EditingPaymentType!'), + 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), + ), - 'gateway' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Gateway!"), - 'group_list' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Groups!"), + 'payment_type_list' =>Array ( + 'prefixes' => Array ('pt_List'), 'format' => "!la_title_PaymentTypes!", + ), - 'payment_currencies_edit' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"), - ), + 'payment_type_edit' =>Array ( + 'prefixes' => Array ('pt'), + 'new_titlefield' => Array ('pt' => '!la_title_NewPaymentType!'), + 'format' => "#pt_status# '#pt_titlefield#' - !la_title_General!", + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/payment_type/payment_type_edit', 'priority' => 1), - 'gateway' => Array ('title' => 'la_tab_Gateway', 't' => 'in-commerce/payment_type/payment_type_gateway', 'priority' => 2), - 'currencies' => Array ('title' => 'la_tab_Currencies', 't' => 'in-commerce/payment_type/payment_type_currencies', 'priority' => 3), - 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4), - ), - ), + 'gateway' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Gateway!"), + 'group_list' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Groups!"), - 'PermSection' => Array ('main' => 'in-commerce:payment_types'), + 'payment_currencies_edit' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"), + ), - 'Sections' => Array ( - 'in-commerce:payment_types' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_payment_types', - 'label' => 'la_tab_PaymentTypes', - 'url' => Array ('t' => 'in-commerce/payment_type/payment_type_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/payment_type/payment_type_edit', 'priority' => 1), + 'gateway' => Array ('title' => 'la_tab_Gateway', 't' => 'in-commerce/payment_type/payment_type_gateway', 'priority' => 2), + 'currencies' => Array ('title' => 'la_tab_Currencies', 't' => 'in-commerce/payment_type/payment_type_currencies', 'priority' => 3), + 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4), + ), + ), - 'TitleField' => 'Name', // field, used in bluebar when editing existing item - 'SubItems' => Array ('gwfv', 'ptc'), + 'PermSection' => Array ('main' => 'in-commerce:payment_types'), - 'CalculatedFields' => Array ( - '' => Array ( - 'Gateway' => TABLE_PREFIX . 'Gateways.Name', - ), - ), + 'Sections' => Array ( + 'in-commerce:payment_types' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_payment_types', + 'label' => 'la_tab_PaymentTypes', + 'url' => Array ('t' => 'in-commerce/payment_type/payment_type_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 5, + 'type' => stTREE, + ), + ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN ' . TABLE_PREFIX . 'Gateways ON %1$s.GatewayId = ' . TABLE_PREFIX . 'Gateways.GatewayId', - ), + 'TitleField' => 'Name', // field, used in bluebar when editing existing item + 'SubItems' => Array ('gwfv', 'ptc'), - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('Priority' => 'desc'), - 'Sorting' => Array ('Name' => 'asc'), - ) - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'Gateway' => TABLE_PREFIX . 'Gateways.Name', + ), + ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' =>true, 'max_len' => 100), - 'Description' => Array ( - 'type' => 'string', 'max_len' => 255, - 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', - 'default' => null - ), - 'Instructions' => Array ( - 'type' => 'string', - 'formatter' => 'kMultiLanguage', 'db_type' => 'text', 'using_fck' => 1, - 'default' => null - ), - 'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'IsPrimary' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'BuiltIn' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ), - 'GatewayId' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Gateways', - 'option_key_field' => 'GatewayId', - 'option_title_field' => 'Name', - 'default' => 1, 'not_null' => 1, - ), - 'PlacedOrdersEdit' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.00'), - 'PortalGroups' => Array ('type' => 'string', 'default' => null), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN ' . TABLE_PREFIX . 'Gateways ON %1$s.GatewayId = ' . TABLE_PREFIX . 'Gateways.GatewayId', + ), - 'VirtualFields' => Array ( - 'Gateway' => Array ('type' => 'string', 'default' => ''), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), - 'Name' => Array ( 'title' => 'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200), - 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 200), - 'BuiltIn' => Array ( 'title' => 'la_col_BuiltIn', 'filter_block' => 'grid_options_filter', 'width' => 100), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100), - ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' =>true, 'max_len' => 100), + 'Description' => Array ( + 'type' => 'string', 'max_len' => 255, + 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', + 'default' => null + ), + 'Instructions' => Array ( + 'type' => 'string', + 'formatter' => 'kMultiLanguage', 'db_type' => 'text', 'using_fck' => 1, + 'default' => null + ), + 'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'IsPrimary' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'BuiltIn' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ), + 'GatewayId' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Gateways', + 'option_key_field' => 'GatewayId', + 'option_title_field' => 'Name', + 'default' => 1, 'not_null' => 1, + ), + 'PlacedOrdersEdit' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.00'), + 'PortalGroups' => Array ('type' => 'string', 'default' => null), + ), + + 'VirtualFields' => Array ( + 'Gateway' => Array ('type' => 'string', 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), + 'Name' => Array ( 'title' => 'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200), + 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 200), + 'BuiltIn' => Array ( 'title' => 'la_col_BuiltIn', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100), + ), + ), + ), +); \ No newline at end of file