Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F860135
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Apr 30, 8:55 AM
Size
48 KB
Mime Type
text/x-diff
Expires
Fri, May 2, 8:55 AM (1 h, 32 m)
Engine
blob
Format
Raw Data
Handle
611824
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/5.1.x/core/units/languages/languages_config.php
===================================================================
--- branches/5.1.x/core/units/languages/languages_config.php (revision 13949)
+++ branches/5.1.x/core/units/languages/languages_config.php (revision 13950)
@@ -1,245 +1,271 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
- 'Prefix' => 'lang',
- 'ItemClass' => Array('class'=>'LanguagesItem','file'=>'languages_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'LanguagesEventHandler','file'=>'languages_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'LanguagesTagProcessor','file'=>'languages_tag_processor.php','build_event'=>'OnBuild'),
-
- 'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'lang',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnSave'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnUpdatePrimary',
- ),
-
- Array(
- 'Mode' => hAFTER,
- 'Conditional' => false,
- 'HookToPrefix' => 'lang',
- 'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnSave','OnMassDelete'),
- 'DoPrefix' => '',
- 'DoSpecial' => '',
- 'DoEvent' => 'OnScheduleTopFrameReload',
- ),
-
- ),
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'PerPage',
- 4 => 'event',
- 5 => 'mode',
- ),
- 'IDField' => 'LanguageId',
-
- 'StatusField' => Array('Enabled','PrimaryLang'), // field, that is affected by Approve/Decline events
-
- 'TitleField' => 'PackName', // field, used in bluebar when editing existing item
-
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('lang'=>'!la_title_Adding_Language!'),
- 'edit_status_labels' => Array('lang'=>'!la_title_Editing_Language!'),
- 'new_titlefield' => Array('lang'=>''),
- ),
-
- 'languages_list' => Array(
- 'prefixes' => Array('lang_List'), 'format' => "!la_title_Configuration! - !la_title_LanguagePacks!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'export', 'import', 'setprimary', 'refresh', 'view', 'dbl-click'),
- ),
-
- 'languages_edit_general' => Array( 'prefixes' => Array('lang'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_General!"),
-
- 'phrases_list' => Array( 'prefixes' => Array('lang','phrases_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_Labels!"),
-
- 'phrase_edit' => Array (
- 'prefixes' => Array('phrases'),
- 'new_status_labels' => Array('phrases'=>'!la_title_Adding_Phrase!'),
- 'edit_status_labels' => Array('phrases' => '!la_title_Editing_Phrase!'),
- 'format' => "#phrases_status# '#phrases_titlefield#'"
- ),
-
- 'import_language' => Array( 'prefixes' => Array('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep1!"),
-
- 'import_language_step2' => Array( 'prefixes' => Array('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep2!"),
-
- 'export_language' => Array( 'prefixes' => Array('phrases.export'), 'format' => "!la_title_ExportLanguagePackStep1!"),
-
- 'export_language_results' => Array( 'prefixes' => Array(), 'format' => "!la_title_ExportLanguagePackResults!"),
-
- 'events_list' => Array( 'prefixes' => Array('lang','emailevents_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EmailEvents!"),
-
- 'event_edit' => Array( 'prefixes' => Array('emailevents'),
- 'edit_status_labels' => Array('emailevents' => '!la_title_Editing_EmailEvent!'),
- 'format' => '#emailevents_status# - #emailevents_titlefield#'),
-
- 'email_messages_edit' => Array( 'prefixes' => Array('lang','emailevents'),
- 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EditingEmailEvent! '#emailevents_titlefield#'"),
-
- // for separate language list
- 'languages_list_st' => Array ('prefixes' => Array ('lang_List'), 'format' => "!la_title_LanguagesManagement!"),
- ),
- 'EditTabPresets' => Array (
- 'Default' => Array (
- 'general' => Array ('title' => 'la_tab_General', 't' => 'regional/languages_edit', 'priority' => 1),
- 'labels' => Array ('title' => 'la_tab_Labels', 't' => 'regional/languages_edit_phrases', 'priority' => 2),
- 'email_events' => Array ('title' => 'la_tab_EmailEvents', 't' => 'regional/languages_edit_email_events', 'priority' => 3),
- ),
- ),
-
- 'PermSection' => Array('main' => 'in-portal:configure_lang'),
-
- 'Sections' => Array (
- 'in-portal:configure_lang' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_regional',
- 'label' => 'la_tab_Regional',
- 'url' => Array('t' => 'regional/languages_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:set_primary', 'advanced:import', 'advanced:export'),
- 'priority' => 4,
- 'type' => stTREE,
- ),
-
- // "Lang. Management"
- /*'in-portal:lang_management' => Array (
- 'parent' => 'in-portal:system',
- 'icon' => 'core:settings_general',
- 'label' => 'la_title_LangManagement',
- 'url' => Array ('t' => 'languages/language_list', 'pass' => 'm'),
- 'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'perm_prefix' => 'lang',
- 'priority' => 10.03,
- 'show_mode' => smSUPER_ADMIN,
- 'type' => stTREE,
- ),*/
- ),
-
- 'TableName' => TABLE_PREFIX . 'Language',
-
- 'AutoDelete' => true,
-
- 'AutoClone' => true,
-
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
- ),
- 'ListSortings' => Array (
- '' => Array (
- 'Sorting' => Array ('Priority' => 'desc', 'PackName' => 'asc'),
- ),
- ),
-
- 'Fields' => Array(
- 'LanguageId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
-
- 'PackName' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter',
- 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Language ORDER BY PackName',
- 'option_title_field' => 'PackName',
- 'option_key_field' => 'PackName',
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'LocalName' => Array (
- 'type' => 'string',
- 'formatter' => 'kOptionsFormatter',
- 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Language ORDER BY PackName',
- 'option_title_field' => 'LocalName',
- 'option_key_field' => 'LocalName',
- 'not_null' => 1, 'required' => 1, 'default' => ''
- ),
- 'Enabled' => Array(
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter',
- 'options' => Array(
- 0 => 'la_Disabled',
- 1 => 'la_Active',
- ),
- 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
- ),
- 'PrimaryLang' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'AdminInterfaceLang' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'IconURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
- 'IconDisabledURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
- 'DateFormat' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'TimeFormat' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'InputDateFormat' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('m/d/Y' => 'mm/dd/yyyy', 'd/m/Y' => 'dd/mm/yyyy', 'm.d.Y' => 'mm.dd.yyyy', 'd.m.Y' => 'dd.mm.yyyy'), 'not_null' => '1','default' => 'm/d/Y', 'required' => 1),
- 'InputTimeFormat' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('g:i:s A' => 'g:i:s A', 'g:i A' => 'g:i A', 'H:i:s' => 'H:i:s', 'H:i' => 'H:i' ), 'not_null' => '1','default' => 'g:i:s A', 'required' => 1),
- 'DecimalPoint' => Array('type' => 'string','not_null' => 1, 'required' => 1, 'default' => ''),
- 'ThousandSep' => Array('type' => 'string','not_null' => 1, 'default' => ''),
- 'Charset' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'UnitSystem' => Array('type' => 'int','not_null' => 1, 'default' => 1, 'formatter' => 'kOptionsFormatter','options' => Array(1 => 'la_Metric', 2 => 'la_US_UK'),'use_phrases' => 1),
- 'FilenameReplacements' => Array ('type' => 'string', 'default' => NULL),
- 'Locale' => Array('type' => 'string','not_null' => 1, 'default' => 'en-US', 'formatter' => 'kOptionsFormatter',
- 'options' => Array('' => ''),
- 'options_sql' => "SELECT CONCAT(LocaleName, ' ' ,'\/',Locale,'\/') AS name, Locale FROM ".TABLE_PREFIX."LocalesList ORDER BY LocaleId", 'option_title_field' => "name", 'option_key_field' => 'Locale',
- ),
- 'UserDocsUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
- ),
-
- 'VirtualFields' => Array(
- 'CopyLabels' => Array('type' => 'int', 'default' => 0),
- 'CopyFromLanguage' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Language ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId'),
- ),
-
- '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',
- ),
- 'Fields' => Array(
- 'LanguageId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
- 'PackName' => Array ('title' => 'la_col_PackName', 'filter_block' => 'grid_options_filter', 'width' => 150, ),//
- 'PrimaryLang' => Array ('title' => 'la_col_IsPrimaryLanguage', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
- 'AdminInterfaceLang' => Array ('title' => 'la_col_AdminInterfaceLang', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
- 'Charset' => Array ('title' => 'la_col_Charset', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Priority' => Array ('title' => 'la_col_Priority', 'filter_block' => 'grid_like_filter', 'width' => 60, ),
- 'Enabled' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 60, ),
- ),
- ),
-
- /*'LangManagement' => 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',
- ),
- 'Fields' => Array (
- 'LanguageId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
- 'PackName' => Array ('title' => 'la_col_Language', 'filter_block' => 'grid_options_filter', 'width' => 120),
- 'LocalName' => Array ('title' => 'la_col_Prefix', 'filter_block' => 'grid_options_filter', 'width' => 120),
- 'IconURL' => Array ('title' => 'la_col_Image', 'filter_block' => 'grid_empty_filter', 'width' => 80),
- ),
- ),*/
- ),
- );
\ No newline at end of file
+$config = Array (
+ 'Prefix' => 'lang',
+ 'ItemClass' => Array ('class' => 'LanguagesItem', 'file' => 'languages_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'LanguagesEventHandler', 'file' => 'languages_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'LanguagesTagProcessor', 'file' => 'languages_tag_processor.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+ 'Hooks' => Array (
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'lang',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnUpdatePrimary',
+ ),
+ Array (
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'lang',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnSave', 'OnMassDelete'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnScheduleTopFrameReload',
+ ),
+ ),
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'LanguageId',
+
+ 'StatusField' => Array ('Enabled', 'PrimaryLang'), // field, that is affected by Approve/Decline events
+
+ 'TitleField' => 'PackName', // field, used in bluebar when editing existing item
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('lang' => '!la_title_Adding_Language!'),
+ 'edit_status_labels' => Array ('lang' => '!la_title_Editing_Language!'),
+ ),
+ 'languages_list' => Array (
+ 'prefixes' => Array ('lang_List'), 'format' => "!la_title_Configuration! - !la_title_LanguagePacks!",
+ 'toolbar_buttons' => Array (
+ 'new_item', 'edit', 'delete', 'export', 'import', 'setprimary', 'refresh', 'view', 'dbl-click'
+ ),
+ ),
+ 'languages_edit_general' => Array ('prefixes' => Array ('lang'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_General!"),
+ 'phrases_list' => Array (
+ 'prefixes' => Array ('lang', 'phrases_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_Labels!"
+ ),
+ 'phrase_edit' => Array (
+ 'prefixes' => Array ('phrases'),
+ 'new_status_labels' => Array ('phrases' => '!la_title_Adding_Phrase!'),
+ 'edit_status_labels' => Array ('phrases' => '!la_title_Editing_Phrase!'),
+ 'format' => "#phrases_status# '#phrases_titlefield#'",
+ ),
+ 'import_language' => Array (
+ 'prefixes' => Array ('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep1!",
+ ),
+ 'import_language_step2' => Array (
+ 'prefixes' => Array ('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep2!",
+ ),
+ 'export_language' => Array (
+ 'prefixes' => Array ('phrases.export'), 'format' => "!la_title_ExportLanguagePackStep1!",
+ ),
+ 'export_language_results' => Array (
+ 'prefixes' => Array(), 'format' => "!la_title_ExportLanguagePackResults!",
+ ),
+ 'events_list' => Array (
+ 'prefixes' => Array ('lang', 'emailevents_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EmailEvents!",
+ ),
+ 'event_edit' => Array (
+ 'prefixes' => Array ('emailevents'),
+ 'edit_status_labels' => Array ('emailevents' => '!la_title_Editing_EmailEvent!'),
+ 'format' => '#emailevents_status# - #emailevents_titlefield#',
+ ),
+ 'email_messages_edit' => Array (
+ 'prefixes' => Array ('lang', 'emailevents'),
+ 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EditingEmailEvent! '#emailevents_titlefield#'",
+ ),
+ // for separate language list
+ 'languages_list_st' => Array (
+ 'prefixes' => Array ('lang_List'), 'format' => "!la_title_LanguagesManagement!",
+ ),
+ ),
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'regional/languages_edit', 'priority' => 1),
+ 'labels' => Array ('title' => 'la_tab_Labels', 't' => 'regional/languages_edit_phrases', 'priority' => 2),
+ 'email_events' => Array ('title' => 'la_tab_EmailEvents', 't' => 'regional/languages_edit_email_events', 'priority' => 3),
+ ),
+ ),
+
+ 'PermSection' => Array ('main' => 'in-portal:configure_lang'),
+
+ 'Sections' => Array (
+ 'in-portal:configure_lang' => Array (
+ 'parent' => 'in-portal:website_setting_folder',
+ 'icon' => 'conf_regional',
+ 'label' => 'la_tab_Regional',
+ 'url' => Array ('t' => 'regional/languages_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:set_primary', 'advanced:import', 'advanced:export'),
+ 'priority' => 4,
+ 'type' => stTREE,
+ ),
+
+ // "Lang. Management"
+ /*'in-portal:lang_management' => Array (
+ 'parent' => 'in-portal:system',
+ 'icon' => 'core:settings_general',
+ 'label' => 'la_title_LangManagement',
+ 'url' => Array ('t' => 'languages/language_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
+ 'perm_prefix' => 'lang',
+ 'priority' => 10.03,
+ 'show_mode' => smSUPER_ADMIN,
+ 'type' => stTREE,
+ ),*/
+ ),
+
+ 'TableName' => TABLE_PREFIX . 'Language',
+
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Priority' => 'desc', 'PackName' => 'asc'),
+ ),
+ ),
+
+ 'Fields' => Array (
+ 'LanguageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PackName' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'PackName',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'LocalName' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY PackName', 'option_title_field' => 'LocalName', 'option_key_field' => 'LocalName',
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'Enabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_Active'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'PrimaryLang' => Array(
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'AdminInterfaceLang' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'IconURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ 'IconDisabledURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ 'InputDateFormat' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ('m/d/Y' => 'mm/dd/yyyy', 'd/m/Y' => 'dd/mm/yyyy', 'm.d.Y' => 'mm.dd.yyyy', 'd.m.Y' => 'dd.mm.yyyy'),
+ 'not_null' => 1, 'required' => 1, 'default' => 'm/d/Y'
+ ),
+ 'InputTimeFormat' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ('g:i:s A' => 'g:i:s A', 'g:i A' => 'g:i A', 'H:i:s' => 'H:i:s', 'H:i' => 'H:i'),
+ 'not_null' => '1', 'required' => 1, 'default' => 'g:i:s A',
+ ),
+ 'DateFormat' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => 'm/d/Y'),
+ 'TimeFormat' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => 'g:i:s A'),
+ 'DecimalPoint' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => '.'),
+ 'ThousandSep' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Charset' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => 'utf-8'),
+ 'UnitSystem' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Metric', 2 => 'la_US_UK'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'FilenameReplacements' => Array ('type' => 'string', 'default' => NULL),
+ 'Locale' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => " SELECT CONCAT(LocaleName, ' ' ,'\/',Locale,'\/') AS Name, Locale
+ FROM " . TABLE_PREFIX . 'LocalesList
+ ORDER BY LocaleId',
+ 'option_title_field' => 'Name', 'option_key_field' => 'Locale',
+ 'not_null' => 1, 'default' => 'en-US',
+ ),
+ 'UserDocsUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ ),
+
+ 'VirtualFields' => Array (
+ 'CopyLabels' => Array ('type' => 'int', 'default' => 0),
+ 'CopyFromLanguage' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId',
+ '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',
+ ),
+ 'Fields' => Array(
+ 'LanguageId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
+ 'PackName' => Array ('title' => 'la_col_PackName', 'filter_block' => 'grid_options_filter', 'width' => 150, ),//
+ 'PrimaryLang' => Array ('title' => 'la_col_IsPrimaryLanguage', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
+ 'AdminInterfaceLang' => Array ('title' => 'la_col_AdminInterfaceLang', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
+ 'Charset' => Array ('title' => 'la_col_Charset', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Priority' => Array ('title' => 'la_col_Priority', 'filter_block' => 'grid_like_filter', 'width' => 60, ),
+ 'Enabled' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 60, ),
+ ),
+ ),
+
+ /*'LangManagement' => 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',
+ ),
+ 'Fields' => Array (
+ 'LanguageId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
+ 'PackName' => Array ('title' => 'la_col_Language', 'filter_block' => 'grid_options_filter', 'width' => 120),
+ 'LocalName' => Array ('title' => 'la_col_Prefix', 'filter_block' => 'grid_options_filter', 'width' => 120),
+ 'IconURL' => Array ('title' => 'la_col_Image', 'filter_block' => 'grid_empty_filter', 'width' => 80),
+ ),
+ ),*/
+ ),
+);
\ No newline at end of file
Index: branches/5.1.x/core/units/languages/languages_event_handler.php
===================================================================
--- branches/5.1.x/core/units/languages/languages_event_handler.php (revision 13949)
+++ branches/5.1.x/core/units/languages/languages_event_handler.php (revision 13950)
@@ -1,581 +1,612 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class LanguagesEventHandler extends kDBEventHandler
{
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnChangeLanguage' => Array('self' => true),
'OnSetPrimary' => Array('self' => 'advanced:set_primary|add|edit'),
'OnImportLanguage' => Array('self' => 'advanced:import'),
'OnExportLanguage' => Array('self' => 'advanced:export'),
'OnExportProgress' => Array('self' => 'advanced:export'),
'OnReflectMultiLingualFields' => Array ('self' => 'view'),
'OnSynchronizeLanguages' => Array ('self' => 'edit'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Permission check override
*
* @param kEvent $event
*/
function CheckPermission(&$event)
{
if ($event->Name == 'OnItemBuild') {
// check permission without using $event->getSection(),
// so first cache rebuild won't lead to "ldefault_Name" field being used
return true;
}
return parent::CheckPermission($event);
}
/**
* [HOOK] Updates table structure on new language adding/removing language
*
* @param kEvent $event
*/
function OnReflectMultiLingualFields(&$event)
{
if ($this->Application->GetVar('ajax') == 'yes') {
$event->status = erSTOP;
}
if (is_object($event->MasterEvent)) {
if ($event->MasterEvent->status != erSUCCESS) {
// only rebuild when all fields are validated
return ;
}
if (($event->MasterEvent->Name == 'OnSave') && !$this->Application->GetVar('new_language')) {
// only rebuild during new language adding
return ;
}
}
$ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
/* @var $ml_helper kMultiLanguageHelper */
$this->Application->UnitConfigReader->ReReadConfigs();
foreach ($this->Application->UnitConfigReader->configData as $prefix => $config_data) {
$ml_helper->createFields($prefix);
}
}
/**
* Allows to set selected language as primary
*
* @param kEvent $event
*/
function OnSetPrimary(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
$this->StoreSelectedIDs($event);
$ids = $this->getSelectedIDs($event);
if ($ids) {
$id = array_shift($ids);
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object LanguagesItem */
$object->Load($id);
$object->setPrimary();
}
}
/**
* [HOOK] Reset primary status of other languages if we are saving primary language
*
* @param kEvent $event
*/
function OnUpdatePrimary(&$event)
{
if ($event->MasterEvent->status != erSUCCESS) {
return ;
}
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object LanguagesItem */
$object->SwitchToLive();
// set primary for each languages, that have this checkbox checked
$ids = explode(',', $event->MasterEvent->getEventParam('ids'));
foreach ($ids as $id) {
$object->Load($id);
if ($object->GetDBField('PrimaryLang')) {
$object->setPrimary(true, false);
}
if ($object->GetDBField('AdminInterfaceLang')) {
$object->setPrimary(true, true);
}
}
// if no primary language left, then set primary last language (not to load again) from edited list
$sql = 'SELECT '.$object->IDField.'
FROM '.$object->TableName.'
WHERE PrimaryLang = 1';
$primary_language = $this->Conn->GetOne($sql);
if (!$primary_language) {
$object->setPrimary(false, false); // set primary language
}
$sql = 'SELECT '.$object->IDField.'
FROM '.$object->TableName.'
WHERE AdminInterfaceLang = 1';
$primary_language = $this->Conn->GetOne($sql);
if (!$primary_language) {
$object->setPrimary(false, true); // set admin interface language
}
}
/**
+ * Prefills options with dynamic values
+ *
+ * @param kEvent $event
+ */
+ function OnAfterConfigRead(&$event)
+ {
+ parent::OnAfterConfigRead($event);
+
+ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
+
+ // set dynamic hints for options in date format fields
+ $options = $fields['InputDateFormat']['options'];
+ if ($options) {
+ foreach ($options as $i => $v) {
+ $options[$i] = $v . ' (' . adodb_date($i) . ')';
+ }
+ $fields['InputDateFormat']['options'] = $options;
+ }
+
+ $options = $fields['InputTimeFormat']['options'];
+ if ($options) {
+ foreach ($options as $i => $v) {
+ $options[$i] = $v . ' (' . adodb_date($i) . ')';
+ }
+ $fields['InputTimeFormat']['options'] = $options;
+ }
+
+ $this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
+ }
+
+ /**
* Occurse before updating item
*
* @param kEvent $event
* @access public
*/
function OnBeforeItemUpdate(&$event)
{
$object =& $event->getObject();
$status_fields = $this->Application->getUnitOption($event->Prefix, 'StatusField');
$status_field = array_shift($status_fields);
if ($object->GetDBField('PrimaryLang') == 1 && $object->GetDBField($status_field) == 0) {
$object->SetDBField($status_field, 1);
}
}
/**
* Shows only enabled languages on front
*
* @param kEvent $event
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
if (in_array($event->Special, Array ('enabled', 'selected', 'available'))) {
$object->addFilter('enabled_filter', '%1$s.Enabled = ' . STATUS_ACTIVE);
}
// site domain language picker
if ($event->Special == 'selected' || $event->Special == 'available') {
$edit_picker_helper =& $this->Application->recallObject('EditPickerHelper');
/* @var $edit_picker_helper EditPickerHelper */
$edit_picker_helper->applyFilter($event, 'Languages');
}
// apply domain-based language filtering
$languages = $this->Application->siteDomainField('Languages');
if (strlen($languages)) {
$languages = explode('|', substr($languages, 1, -1));
$object->addFilter('domain_filter', '%1$s.LanguageId IN (' . implode(',', $languages) . ')');
}
}
/**
* Copy labels from another language
*
* @param kEvent $event
*/
function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
$object =& $event->getObject();
/* @var $object kDBItem */
$src_language = $object->GetDBField('CopyFromLanguage');
if ($object->GetDBField('CopyLabels') && $src_language) {
$dst_language = $object->GetID();
// 1. schedule data copy after OnSave event is executed
$var_name = $event->getPrefixSpecial() . '_copy_data' . $this->Application->GetVar('m_wid');
$pending_actions = $this->Application->RecallVar($var_name, Array ());
if ($pending_actions) {
$pending_actions = unserialize($pending_actions);
}
$pending_actions[$src_language] = $dst_language;
$this->Application->StoreVar($var_name, serialize($pending_actions));
$object->SetDBField('CopyLabels', 0);
}
}
/**
* Saves language from temp table to live
*
* @param kEvent $event
*/
function OnSave(&$event)
{
parent::OnSave($event);
if ($event->status != erSUCCESS) {
return ;
}
$var_name = $event->getPrefixSpecial() . '_copy_data' . $this->Application->GetVar('m_wid');
$pending_actions = $this->Application->RecallVar($var_name, Array ());
if ($pending_actions) {
$pending_actions = unserialize($pending_actions);
}
// create multilingual columns for phrases & email events table first (actual for 6+ language)
$ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
$ml_helper->createFields('phrases');
$ml_helper->createFields('emailevents');
foreach ($pending_actions as $src_language => $dst_language) {
// phrases import
$sql = 'UPDATE ' . $this->Application->getUnitOption('phrases', 'TableName') . '
SET l' . $dst_language . '_Translation = l' . $src_language . '_Translation';
$this->Conn->Query($sql);
// events import
$sql = 'UPDATE ' . $this->Application->getUnitOption('emailevents', 'TableName') . '
SET
l' . $dst_language . '_Subject = l' . $src_language . '_Subject,
l' . $dst_language . '_Body = l' . $src_language . '_Body';
$this->Conn->Query($sql);
}
$this->Application->RemoveVar($var_name);
$event->CallSubEvent('OnReflectMultiLingualFields');
}
/**
* Prepare temp tables for creating new item
* but does not create it. Actual create is
* done in OnPreSaveCreated
*
* @param kEvent $event
*/
function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
$object =& $event->getObject();
$object->SetDBField('CopyLabels', 1);
$live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$primary_lang_id = $this->Conn->GetOne('SELECT '.$object->IDField.' FROM '.$live_table.' WHERE PrimaryLang = 1');
$object->SetDBField('CopyFromLanguage', $primary_lang_id);
}
/**
* Sets new language mark
*
* @param kEvent $event
*/
function OnBeforeDeleteFromLive(&$event)
{
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
$sql = 'SELECT ' . $id_field . '
FROM ' . $table_name . '
WHERE ' . $id_field . ' = ' . $event->getEventParam('id');
$id = $this->Conn->GetOne($sql);
if (!$id) {
$this->Application->SetVar('new_language', 1);
}
}
function OnChangeLanguage(&$event)
{
$language_id = $this->Application->GetVar('language');
if ($this->Application->isAdmin) {
// admin data only
$this->Application->SetVar('m_lang', $language_id);
// set new language for this session (admin interface only)
$this->Application->Session->SetField('Language', $language_id);
// remember last user language in administrative console
if ($this->Application->RecallVar('user_id') == USER_ROOT) {
$this->Application->StorePersistentVar('AdminLanguage', $language_id);
}
else {
$object =& $this->Application->recallObject('u.current');
/* @var $object kDBItem */
$object->SetDBField('AdminLanguage', $language_id);
$object->Update();
}
// without this language change in admin will cause erase of last remembered tree section
$this->Application->SetVar('skip_last_template', 1);
}
else {
// changing language on Front-End
$this->Application->SetVar('m_lang', $language_id);
if (MOD_REWRITE) {
$mod_rewrite_helper =& $this->Application->recallObject('ModRewriteHelper');
/* @var $mod_rewrite_helper kModRewriteHelper */
$mod_rewrite_helper->removePages();
}
}
}
/**
* Parse language XML file into temp tables and redirect to progress bar screen
*
* @param kEvent $event
*/
function OnImportLanguage(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
$items_info = $this->Application->GetVar('phrases_import');
if ($items_info) {
list ($id, $field_values) = each($items_info);
$object =& $this->Application->recallObject('phrases.import', 'phrases', Array('skip_autoload' => true));
/* @var $object kDBItem */
$object->setID($id);
$object->SetFieldsFromHash($field_values);
if (!$object->Validate()) {
$event->status = erFAIL;
return ;
}
$filename = $object->GetField('LangFile', 'full_path');
if (!filesize($filename)) {
$object->SetError('LangFile', 'la_empty_file', 'la_EmptyFile');
$event->status = erFAIL;
}
$language_import_helper =& $this->Application->recallObject('LanguageImportHelper');
/* @var $language_import_helper LanguageImportHelper */
$language_import_helper->performImport(
$filename,
$object->GetDBField('PhraseType'),
$object->GetDBField('Module'),
$object->GetDBField('ImportOverwrite') ? LANG_OVERWRITE_EXISTING : LANG_SKIP_EXISTING
);
// delete uploaded language pack after import is finished
unlink($filename);
$event->SetRedirectParam('opener', 'u');
}
}
/**
* Stores ids of selected languages and redirects to export language step 1
*
* @param kEvent $event
*/
function OnExportLanguage(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
$this->Application->setUnitOption('phrases','AutoLoad',false);
$this->StoreSelectedIDs($event);
$this->Application->StoreVar('export_language_ids', implode(',', $this->getSelectedIDs($event)) );
$event->setRedirectParams( Array('phrases.export_event' => 'OnNew', 'pass' => 'all,phrases.export') );
}
/**
* Saves selected languages to xml file passed
*
* @param kEvent $event
*/
function OnExportProgress(&$event)
{
$items_info = $this->Application->GetVar('phrases_export');
if ($items_info) {
list($id, $field_values) = each($items_info);
$object =& $this->Application->recallObject('phrases.export', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
$object->setID($id);
$object->SetFieldsFromHash($field_values);
if (!$object->Validate()) {
$event->status = erFAIL;
return ;
}
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->CheckFolder(EXPORT_PATH);
if (!is_writable(EXPORT_PATH)) {
$event->status = erFAIL;
$object->SetError('LangFile', 'write_error', 'la_ExportFolderNotWritable');
return ;
}
if ( substr($field_values['LangFile'], -5) != '.lang') {
$field_values['LangFile'] .= '.lang';
}
$filename = EXPORT_PATH . '/' . $field_values['LangFile'];
$language_import_helper =& $this->Application->recallObject('LanguageImportHelper');
/* @var $language_import_helper LanguageImportHelper */
if ($object->GetDBField('DoNotEncode')) {
$language_import_helper->setExportEncoding('plain');
}
$language_import_helper->setExportLimits($field_values['ExportPhrases'], $field_values['ExportEmailEvents']);
$lang_ids = explode(',', $this->Application->RecallVar('export_language_ids') );
$language_import_helper->performExport($filename, $field_values['PhraseType'], $lang_ids, $field_values['Module']);
}
$event->redirect = 'regional/languages_export_step2';
$event->SetRedirectParam('export_file', $field_values['LangFile']);
}
/**
* Returns to previous template in opener stack
*
* @param kEvent $event
*/
function OnGoBack(&$event)
{
$event->redirect_params['opener'] = 'u';
}
function OnScheduleTopFrameReload(&$event)
{
$this->Application->StoreVar('RefreshTopFrame',1);
}
/**
* Do now allow deleting current language
*
* @param kEvent $event
*/
function OnBeforeItemDelete(&$event)
{
$del_id = $event->getEventParam('id');
$object =& $event->getObject(array('skip_autload' => true));
$object->Load($del_id);
if ($object->GetDBField('PrimaryLang') || $object->GetDBField('AdminInterfaceLang') || $del_id == $this->Application->GetVar('m_lang')) {
$event->status = erFAIL;
}
}
/**
* Deletes phrases and email events on given language
*
* @param kEvent $event
*/
function OnAfterItemDelete(&$event)
{
parent::OnAfterItemDelete($event);
$object =& $event->getObject();
/* @var $object kDBItem */
// clean Events table
$fields_hash = Array (
'l' . $object->GetID() . '_Subject' => NULL,
'l' . $object->GetID() . '_Body' => NULL,
);
$this->Conn->doUpdate($fields_hash, $this->Application->getUnitOption('emailevents', 'TableName'), 1);
// clean Phrases table
$fields_hash = Array (
'l' . $object->GetID() . '_Translation' => NULL,
);
$this->Conn->doUpdate($fields_hash, $this->Application->getUnitOption('phrases', 'TableName'), 1);
}
/**
* Copy missing phrases across all system languages (starting from primary)
*
* @param kEvent $event
*/
function OnSynchronizeLanguages(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
// get language list with primary language first
$sql = 'SELECT LanguageId
FROM ' . TABLE_PREFIX . 'Language
ORDER BY PrimaryLang DESC';
$source_langs = $this->Conn->GetCol($sql);
$target_langs = $source_langs;
foreach ($source_langs as $source_id) {
foreach ($target_langs as $target_id) {
if ($source_id == $target_id) {
continue;
}
$sql = 'UPDATE ' . TABLE_PREFIX . 'Phrase
SET l' . $target_id . '_Translation = l' . $source_id . '_Translation
WHERE (l' . $target_id . '_Translation IS NULL) OR (l' . $target_id . '_Translation = "")';
$this->Conn->Query($sql);
}
}
}
}
\ No newline at end of file
Index: branches/5.1.x/core/admin_templates/regional/languages_edit.tpl
===================================================================
--- branches/5.1.x/core/admin_templates/regional/languages_edit.tpl (revision 13949)
+++ branches/5.1.x/core/admin_templates/regional/languages_edit.tpl (revision 13950)
@@ -1,108 +1,110 @@
<inp2:adm_SetPopupSize width="950" height="700"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="lang" section="in-portal:configure_lang" title_preset="languages_edit_general" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('lang','<inp2:lang_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('lang','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('lang', '<inp2:lang_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="lang_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="lang_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="lang_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:lang_SaveWarning name="grid_save_warning"/>
<inp2:lang_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="lang" field="LanguageId" title="la_fld_LanguageId"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="PackName" title="la_fld_PackName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="LocalName" title="la_fld_LocalName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="Charset" title="la_fld_Charset"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconURL" title="la_fld_IconURL"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconDisabledURL" title="la_fld_IconDisabledURL"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="DateFormat" title="la_fld_DateFormat"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="TimeFormat" title="la_fld_TimeFormat"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputDateFormat" title="la_fld_InputDateFormat"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputTimeFormat" title="la_fld_InputTimeFormat"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="DateFormat" title="la_fld_DateFormat"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="TimeFormat" title="la_fld_TimeFormat"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="DecimalPoint" title="la_fld_DecimalPoint"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="ThousandSep" title="la_fld_ThousandSep"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="PrimaryLang" title="la_fld_PrimaryLang"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="AdminInterfaceLang" title="la_fld_AdminInterfaceLang"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="Priority" title="la_fld_Priority"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="Enabled" title="la_fld_Enabled"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="UnitSystem" title="la_fld_UnitSystem"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="Locale" title="la_fld_Locale"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="FilenameReplacements" title="la_fld_FilenameReplacements" allow_html="0" control_options="{min_height: 200}" cols="50" rows="10"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="Locale" title="la_fld_Locale" has_empty="1"/>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconURL" title="la_fld_IconURL"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconDisabledURL" title="la_fld_IconDisabledURL"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="UserDocsUrl" title="la_fld_UserDocsUrl"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="FilenameReplacements" title="la_fld_FilenameReplacements" allow_html="0" control_options="{min_height: 200}" cols="50" rows="10"/>
+
<inp2:m_if check="lang_IsNewMode">
<inp2:m_if check="lang_FieldVisible" field="CopyLabels">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_phrase name="la_fld_CopyLabels"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<input type="hidden" id="<inp2:lang_InputName field="CopyLabels"/>" name="<inp2:lang_InputName field="CopyLabels"/>" value="<inp2:lang_Field field="CopyLabels" db="db"/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_CopyLabels" name="_cb_CopyLabels" <inp2:lang_Field field="CopyLabels" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:lang_InputName field="CopyLabels"/>'))">
<inp2:m_inc param="tab_index" by="1"/>
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lang_InputName field="CopyFromLanguage"/>" id="<inp2:lang_InputName field="CopyFromLanguage"/>">
<option value="0">--<inp2:m_phrase name="la_prompt_Select_Source"/></option>
<inp2:lang_PredefinedOptions field="CopyFromLanguage" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</inp2:m_if>
</inp2:m_if>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Event Timeline
Log In to Comment