Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Fri, Apr 18, 3:52 AM

in-portal

Index: branches/RC/kernel/units/images/images_config.php
===================================================================
--- branches/RC/kernel/units/images/images_config.php (revision 10027)
+++ branches/RC/kernel/units/images/images_config.php (revision 10028)
@@ -1,158 +1,160 @@
<?php
$config = Array(
'Prefix' => 'img',
- 'Clones' => Array(
- 'l-img' => Array('ParentPrefix' => 'l'),
- 'n-img' => Array('ParentPrefix' => 'n'),
- 'bb-img'=> Array('ParentPrefix' => 'bb'),
- 'bb-post-img'=> Array('ParentPrefix' => 'bb-post'),
- /*'p-img' => Array('ParentPrefix' => 'p'),*/
- 'c-img' => Array('ParentPrefix' => 'c'),
- ),
+ 'Clones' => Array (
+ 'u-img' => Array('ParentPrefix' => 'u'),
+
+ 'l-img' => Array('ParentPrefix' => 'l'),
+ 'n-img' => Array('ParentPrefix' => 'n'),
+ 'bb-img'=> Array('ParentPrefix' => 'bb'),
+ 'bb-post-img'=> Array('ParentPrefix' => 'bb-post'),
+ /*'p-img' => Array('ParentPrefix' => 'p'),*/
+ 'c-img' => Array('ParentPrefix' => 'c'),
+ ),
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ImageEventHandler','file'=>'image_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ImageTagProcessor','file'=>'image_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array (
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'Image',
'LocalTagName' => 'ItemImageTag',
'LocalSpecial' => '-item',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ImageSrc',
'LocalTagName' => 'ItemImageTag',
'LocalSpecial' => '-item',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ImageSize',
'LocalTagName' => 'ItemImageTag',
'LocalSpecial' => '-item',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListImages',
'LocalTagName' => 'PrintList2',
'LocalSpecial' => 'list',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'LargeImageExists',
'LocalTagName' => 'LargeImageExists',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'ImageId',
'StatusField' => Array('Enabled', 'DefaultImg'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'TableName' => TABLE_PREFIX.'Images',
'ParentTableKey'=> 'ResourceId', // linked field in master table
'ForeignKey' => 'ResourceId', // linked field in subtable
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
)
),
'CalculatedFields' => Array(
'' => Array(
'Preview' => '0',
),
),
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'ImageId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'ResourceId' => Array('type'=>'int', 'not_null'=>1, 'default' => 0),
'Url' => Array('type' => 'string', 'max_len'=>255, 'default' => '', 'not_null'=>1),
'Name' => Array('type' => 'string', 'max_len'=>255, 'required'=>1, 'not_null'=>1, 'default' => ''),
'AltName' => Array('type' => 'string', 'max_len'=>255, 'required' => 1, 'not_null' => 1, 'default' => ''),
'ImageIndex' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'LocalImage' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
'LocalPath' => Array('type' => 'string', 'formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len'=>240, 'default' => '', 'not_null' => 1, 'include_path' => 1,
'allowed_types' => Array(
0 => 'image/jpeg',
1 => 'image/pjpeg',
2 => 'image/png',
3 => 'image/gif',
4 => 'image/bmp'
),
'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
'bad_file_size' => '!la_error_FileTooLarge!',
'cant_save_file' => '!la_error_cant_save_file!'
)
),
'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null'=>1),
'DefaultImg' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'ThumbUrl' => Array('type' => 'string', 'max_len' => 255, 'default' => null),
'Priority' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'ThumbPath' => Array('type' => 'string', 'formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len' => 255, 'default' => null,
'allowed_types' => Array(
0 => 'image/jpeg',
1 => 'image/pjpeg',
2 => 'image/png',
3 => 'image/gif',
4 => 'image/bmp'
),
'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
'bad_file_size' => '!la_error_FileTooLarge!',
'cant_save_file' => '!la_error_cant_save_file!'
)
),
'LocalThumb' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
'SameImages' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
),
'VirtualFields' => Array(
'Preview' => Array(),
'ImageUrl' => Array(),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon17_custom.gif','1_0'=>'icon16_image.gif','0_0'=>'icon16_image_disabled.gif','1_1'=>'icon16_image_primary.gif'),
'Fields' => Array(
'Name' => Array( 'title'=>'la_col_ImageName' , 'data_block' => 'image_caption_td'),
'AltName' => Array( 'title'=>'la_col_AltName' ),
'Url' => Array( 'title'=>'la_col_ImageUrl', 'data_block' => 'image_url_td' ),
'Enabled' => Array( 'title'=>'la_col_ImageEnabled' ),
'Preview' => Array( 'title'=>'la_col_Preview', 'data_block' => 'image_preview_td' ),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/kernel/units/images/images_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/kernel/admin_templates/users/users_edit_tabs.tpl
===================================================================
--- branches/RC/kernel/admin_templates/users/users_edit_tabs.tpl (revision 10027)
+++ branches/RC/kernel/admin_templates/users/users_edit_tabs.tpl (nonexistent)
@@ -1,13 +0,0 @@
-<table style="padding: 2px 0px 0px 0px; margin: 0px; border: none; border-collapse: collapse" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-portal/users/users_edit" main_prefix="u"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Groups" t="in-portal/users/users_edit_groups" main_prefix="u"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Custom" t="in-portal/users/users_edit_custom" main_prefix="u"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
Property changes on: branches/RC/kernel/admin_templates/users/users_edit_tabs.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.3
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/kernel/admin_templates/users/users_edit_groups.tpl
===================================================================
--- branches/RC/kernel/admin_templates/users/users_edit_groups.tpl (revision 10027)
+++ branches/RC/kernel/admin_templates/users/users_edit_groups.tpl (revision 10028)
@@ -1,106 +1,100 @@
-<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="section_header" prefix="u" icon="icon46_usergroups" module="in-portal" title="la_title_Groups"/>
-
-<inp2:m_include t="in-portal/users/users_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="u" title_preset="user_groups_list" module="in-portal" icon="icon46_usergroups"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" prefix="u" module="in-portal" title_preset="user_edit_groups" tab_preset="Default"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_temp_item('u-ug', 'in-portal/users/user_edit_group');
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('u','OnCancelEdit','<inp2:u_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
) );
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('u', '<inp2:u_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('u', '<inp2:u_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('in-portal:usertogroup', '<inp2:m_phrase label="la_ToolTip_AddToGroup" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
openSelector('u-ug', '<inp2:m_Link t="in-portal/group_selector" pass="m,u"/>', 'GroupId', '800x600');
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('u-ug');
} ) );
a_toolbar.AddButton( new ToolBarButton('in-portal:primary_group', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>',
function() {
submit_event('u-ug','OnSetPrimary');
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="u_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="u_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="u_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="grid_membership_td">
+<inp2:m_DefineElement name="grid_membership_td" format="" no_special="" nl2br="" first_chars="" td_style="">
<td valign="top" class="text" style="<inp2:m_param name="td_style"/>">
<inp2:m_if check="Field" name="$field" db="db">
<inp2:Field field="$field" first_chars="$first_chars" nl2br="$nl2br" grid="$grid" no_special="$no_special" format="$format"/>
<inp2:m_else/>
<inp2:m_phrase name="la_NeverExpires"/>
</inp2:m_if>
</td>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="u-ug" IdField="GroupId" grid="Default"/>
<script type="text/javascript">
Grids['u-ug'].SetDependantToolbarButtons( new Array('delete', 'primary_group') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/kernel/admin_templates/users/users_edit_groups.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3.2.1
\ No newline at end of property
+1.3.2.2
\ No newline at end of property
Index: branches/RC/kernel/admin_templates/users/users_edit.tpl
===================================================================
--- branches/RC/kernel/admin_templates/users/users_edit.tpl (revision 10027)
+++ branches/RC/kernel/admin_templates/users/users_edit.tpl (revision 10028)
@@ -1,90 +1,83 @@
-<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
+<inp2:m_include t="incs/header"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="u" icon="icon46_users" module="in-portal" title="la_title_Users"/>
-
-<inp2:m_include t="in-portal/users/users_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="u" title_preset="users_edit" module="in-portal" icon="icon46_users"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" prefix="u" module="in-portal" title_preset="users_edit" 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('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('u','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('u', '<inp2:u_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('u', '<inp2:u_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="u_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="u_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="u_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:u_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="u" field="PortalUserId" title="!la_fld_Id!"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Login" title="la_fld_Username"/>
<inp2:m_RenderElement name="inp_edit_password" prefix="u" field="Password" title="la_fld_Password"/>
<inp2:m_RenderElement name="inp_edit_password" prefix="u" field="VerifyPassword" title="la_fld_VerifyPassword"/>
<inp2:m_RenderElement name="subsection" title="la_section_PersonalInformation"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="FirstName" title="la_fld_FirstName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="LastName" title="la_fld_LastName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Company" title="la_fld_Company"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Email" title="la_fld_Email"/>
<inp2:m_RenderElement name="inp_edit_date" prefix="u" field="dob" title="la_fld_BirthDate"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Phone" title="la_fld_Phone"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Fax" title="la_fld_Fax"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Street" title="la_fld_AddressLine1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Street2" title="la_fld_AddressLine2"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="City" title="la_fld_Phone"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="State" title="la_fld_State"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Zip" title="la_fld_Zip"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Country" title="la_fld_Country"/>
<inp2:m_RenderElement name="subsection" title="la_section_Properties"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="u" field="Status" title="la_fld_Status"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="u" field="CreatedOn" title="la_fld_CreatedOn"/>
<!-- custom fields: begin -->
<inp2:m_include t="in-portal/incs/custom_blocks"/>
<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="u" value_field="Value" per_page="-1" grid="Default" original_title="la_section_OriginalValues" display_original="1"/>
<!-- custom fields: end -->
</table>
<inp2:m_include t="incs/footer"/>
Property changes on: branches/RC/kernel/admin_templates/users/users_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/kernel/admin_templates/users/image_edit.tpl
===================================================================
--- branches/RC/kernel/admin_templates/users/image_edit.tpl (nonexistent)
+++ branches/RC/kernel/admin_templates/users/image_edit.tpl (revision 10028)
@@ -0,0 +1,60 @@
+<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<inp2:m_include t="in-portal/incs/image_blocks"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_RenderElement name="section_header" prefix="u" icon="icon46_users" module="in-portal" title="!la_title_Users!"/>
+
+<inp2:m_RenderElement name="blue_bar" prefix="u" title_preset="user_image_edit" module="in-portal" icon="icon46_users"/>
+
+<!-- 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('u-img','<inp2:u-img_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('u-img','OnCancel');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_RenderElement name="subsection" title="!la_section_Image!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="u-img" field="ResourceId"/>
+ <inp2:m_RenderElement name="inp_label" prefix="u-img" field="ImageId" title="!la_fld_ImageId!"/>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="u-img" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="u-img" field="AltName" title="!la_fld_AltValue!" size="40"/>
+
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="u-img" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()" />
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="u-img" field="DefaultImg" title="!la_fld_Primary!" onchange="check_status()" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="u-img" field="Priority" title="!la_fld_Priority!" size="5"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_ThumbnailImage!"/>
+ <inp2:m_RenderElement name="thumbnail_section" prefix="u-img"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_FullSizeImage!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="u-img" field="SameImages" title="!la_fld_SameAsThumb!" onchange="toggle_fullsize()"/>
+ <inp2:m_RenderElement name="fullsize_section" prefix="u-img"/>
+
+</table>
+
+<script type="text/javascript">
+ <inp2:m_RenderElement name="images_edit_js" prefix="u-img"/>
+ toggle_fullsize();
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/kernel/admin_templates/users/image_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/RC/kernel/admin_templates/users/user_edit_images.tpl
===================================================================
--- branches/RC/kernel/admin_templates/users/user_edit_images.tpl (nonexistent)
+++ branches/RC/kernel/admin_templates/users/user_edit_images.tpl (revision 10028)
@@ -0,0 +1,103 @@
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" prefix="u" module="in-portal" title_preset="user_edit_images" tab_preset="Default"/>
+
+<inp2:m_include t="in-portal/incs/image_blocks"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+
+ function edit()
+ {
+ std_edit_temp_item('u-img', 'in-portal/users/image_edit');
+ }
+
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('u','<inp2:u_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('u','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('u', '<inp2:u_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('u', '<inp2:u_NextId/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+
+ a_toolbar.AddButton( new ToolBarButton('new_image', '<inp2:m_phrase label="la_ToolTip_New_Images" escape="1"/>',
+ function() {
+ std_new_item('u-img', 'in-portal/users/image_edit')
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('u-img')
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+ submit_event('u-img','OnMassMoveUp');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+ submit_event('u-img','OnMassMoveDown');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('primary_image', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
+ submit_event('u-img','OnSetPrimary');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_if check="u_IsSingle" >
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <inp2:m_else/>
+ <inp2:m_if check="u_IsLast" >
+ a_toolbar.DisableButton('next');
+ </inp2:m_if>
+ <inp2:m_if check="u_IsFirst" >
+ a_toolbar.DisableButton('prev');
+ </inp2:m_if>
+ </inp2:m_if>
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="u-img" IdField="ImageId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+ Grids['u-img'].SetDependantToolbarButtons( new Array('edit','delete','move_up','move_down','primary_image') );
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/kernel/admin_templates/users/user_edit_images.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Index: branches/RC/kernel/admin_templates/users/users_list.tpl
===================================================================
--- branches/RC/kernel/admin_templates/users/users_list.tpl (revision 10027)
+++ branches/RC/kernel/admin_templates/users/users_list.tpl (revision 10028)
@@ -1,81 +1,76 @@
-<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="u" icon="icon46_users" module="in-portal" title="la_title_Users"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="u" title_preset="users_list" icon="icon46_users" module="in-portal"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" prefix="u" module="in-portal" title_preset="users_list"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('u', 'in-portal/users/users_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('in-portal:new_user', '<inp2:m_phrase label="la_ToolTip_NewUser" escape="1"/>',
function() {
std_precreate_item('u', 'in-portal/users/users_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('u')
} ) );
a_toolbar.AddButton (
new ToolBarButton(
'in-portal:primary_user_group',
'<inp2:m_phrase label="la_ToolTip_PrimaryGroup" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_SetPrimary" escape="1"/>',
function() {
openSelector('u', '<inp2:m_Link t="in-portal/group_selector" pass="m,u"/>', 'PrimaryGroupId', '800x600', 'OnSaveSelected');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('u', 'OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('u', 'OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('in-portal:e-mail', '<inp2:m_phrase label="la_ToolTip_SendMail" escape="1"/>', function() {
openSelector('emailmessages', '<inp2:m_Link template="emails/mass_mail"/>', 'UserEmail', null, 'OnPrepareMassRecipients');
}
) );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="u" IdField="PortalUserId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['u'].SetDependantToolbarButtons( new Array('edit','delete', 'primary_user_group', 'approve', 'decline', 'e-mail') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/kernel/admin_templates/users/users_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4.2.2
\ No newline at end of property
+1.4.2.3
\ No newline at end of property
Index: branches/RC/kernel/admin_templates/users/users_edit_custom.tpl
===================================================================
--- branches/RC/kernel/admin_templates/users/users_edit_custom.tpl (revision 10027)
+++ branches/RC/kernel/admin_templates/users/users_edit_custom.tpl (revision 10028)
@@ -1,68 +1,62 @@
-<inp2:m_RequireLogin permissions="in-portal:user_list.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="u" icon="icon46_usergroups" module="in-portal" title="la_title_Groups"/>
-
-<inp2:m_include t="in-portal/users/users_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="u" title_preset="users_custom" module="in-portal" icon="icon46_usergroups"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" prefix="u" module="in-portal" title_preset="user_edit_custom" 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('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('u','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('u', '<inp2:u_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('u', '<inp2:u_NextId/>');
}
) );
function edit(){ }
a_toolbar.Render();
<inp2:m_if check="u_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="u_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="u_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="in-portal/incs/custom_blocks"/>
<inp2:m_if check="u_DisplayOriginal" display_original="1">
<inp2:m_RenderElement name="grid" PrefixSpecial="cf" IdField="CustomFieldId" SourcePrefix="u" value_field="Value" per_page="-1" grid="SeparateTabOriginal" header_block="grid_column_title_no_sorting" no_init="no_init" original_title="la_section_OriginalValues" display_original="1"/>
<inp2:m_else/>
<inp2:m_RenderElement name="grid" PrefixSpecial="cf" IdField="CustomFieldId" SourcePrefix="u" value_field="Value" per_page="-1" grid="SeparateTab" header_block="grid_column_title_no_sorting" no_init="no_init"/>
</inp2:m_if>
<inp2:m_include t="incs/footer"/>
Property changes on: branches/RC/kernel/admin_templates/users/users_edit_custom.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/core/kernel/db/dblist.php
===================================================================
--- branches/RC/core/kernel/db/dblist.php (revision 10027)
+++ branches/RC/core/kernel/db/dblist.php (revision 10028)
@@ -1,934 +1,934 @@
<?php
/**
* DBList
*
* Desciption
* @package kernel4
*/
class kDBList extends kDBBase {
/**
* Holds totals for fields specified in config
*
* @var Array
*/
var $Totals = Array();
/**
* Description
*
* @var array
* @access public
*/
var $OrderFields;
/**
* Holds counted total number of records in the query - without pagination (system+user filters)
*
* @var int
* @access public
*/
var $RecordsCount;
/**
* Records count with system filters only applied
*
* @var int
* @access private
*/
var $NoFilterCount = 0;
/**
* Record count selected to be
* showed on current page
*
* @var int
*/
var $SelectedCount=0;
/**
* Array of records selected
*
* @var Array
* @access private
*/
var $Records;
var $CurrentIndex = 0;
/**
* List items per-page
*
* @var int
* @access public
*/
var $PerPage;
/**
* Pages count in list based on PerPage & RecordsCount attributes
*
* @var int
* @access public
*/
var $TotalPages;
/**
* Description
*
* @var int
* @access public
*/
var $Direction;
/**
* Holds current page number - used when forming LIMIT clause of SELECT statement
*
* @var int
* @access public
*/
var $Page;
/**
* Holds offset for LIMIT clause, calculated in {@link kDBList::PerPage()}
*
* @var int
* @access private
*/
var $Offset;
/**
* Count SQL was already issued on query
*
* @var bool
* @access private
*/
var $hasCounted = false;
/**
* Holds list WHERE filter object
*
* @var kMultipleFilter
* @access private
*/
var $WhereFilter = Array(FLT_SYSTEM => null, FLT_NORMAL => null, FLT_SEARCH => null, FLT_VIEW => null);
/**
* Holds list HAVING filter object
*
* @var kMultipleFilter
* @access private
*/
var $HavingFilter = Array(FLT_SYSTEM => null, FLT_NORMAL => null, FLT_SEARCH => null, FLT_VIEW => null);
var $AggregateFilter = Array(FLT_SYSTEM => null, FLT_NORMAL => null);
var $GroupByFields = Array();
var $Queried = false;
var $Counted = false;
var $TotalsCalculated = false;
/**
* Creates kDBList
*
* @return kDBList
*/
function kDBList()
{
parent::kDBBase();
$this->OrderFields = Array();
$filters = $this->getFilterStructure();
foreach ($filters as $filter_params) {
$filter =& $this->$filter_params['type'];
$filter[ $filter_params['class'] ] =& $this->Application->makeClass('kMultipleFilter', $filter_params['join_using']);
}
$this->PerPage = -1;
}
/**
* Returns information about all possible filter types
*
* @return Array
*/
function getFilterStructure()
{
$filters = Array (
Array ('type' => 'WhereFilter', 'class' => FLT_SYSTEM, 'join_using' => FLT_TYPE_AND),
Array ('type' => 'WhereFilter', 'class' => FLT_NORMAL, 'join_using' => FLT_TYPE_OR),
Array ('type' => 'WhereFilter', 'class' => FLT_SEARCH, 'join_using' => FLT_TYPE_OR),
Array ('type' => 'WhereFilter', 'class' => FLT_VIEW, 'join_using' => FLT_TYPE_AND),
Array ('type' => 'WhereFilter', 'class' => FLT_CUSTOM, 'join_using' => FLT_TYPE_AND),
Array ('type' => 'HavingFilter', 'class' => FLT_SYSTEM, 'join_using' => FLT_TYPE_AND),
Array ('type' => 'HavingFilter', 'class' => FLT_NORMAL, 'join_using' => FLT_TYPE_OR),
Array ('type' => 'HavingFilter', 'class' => FLT_SEARCH, 'join_using' => FLT_TYPE_OR),
Array ('type' => 'HavingFilter', 'class' => FLT_VIEW, 'join_using' => FLT_TYPE_AND),
Array ('type' => 'HavingFilter', 'class' => FLT_CUSTOM, 'join_using' => FLT_TYPE_AND),
Array ('type' => 'AggregateFilter', 'class' => FLT_SYSTEM, 'join_using' => FLT_TYPE_AND),
Array ('type' => 'AggregateFilter', 'class' => FLT_NORMAL, 'join_using' => FLT_TYPE_OR),
Array ('type' => 'AggregateFilter', 'class' => FLT_VIEW, 'join_using' => FLT_TYPE_AND),
);
return $filters;
}
/**
* Adds new or replaces old filter with same name
*
* @param string $name filter name (for internal use)
* @param string $clause where/having clause part (no OR/AND allowed)
* @param int $filter_type is filter having filter or where filter
* @param int $filter_scope filter subtype: FLT_NORMAL,FLT_SYSTEM,FLT_SEARCH,FLT_VIEW,FLT_CUSTOM
* @access public
*/
function addFilter($name, $clause, $filter_type = WHERE_FILTER, $filter_scope = FLT_SYSTEM)
{
$filter_source = Array( WHERE_FILTER => 'WhereFilter',
HAVING_FILTER => 'HavingFilter',
AGGREGATE_FILTER => 'AggregateFilter');
$filter_name = $filter_source[$filter_type];
$filter =& $this->$filter_name;
$filter =& $filter[$filter_scope];
$filter->addFilter($name,$clause);
}
/**
* Reads filter content
*
* @param string $name filter name (for internal use)
* @param int $filter_type is filter having filter or where filter
* @param int $filter_scope filter subtype: FLT_NORMAL,FLT_SYSTEM,FLT_SEARCH,FLT_VIEW,FLT_CUSTOM
* @access public
*/
function getFilter($name, $filter_type = WHERE_FILTER, $filter_scope = FLT_SYSTEM)
{
$filter_source = Array( WHERE_FILTER => 'WhereFilter',
HAVING_FILTER => 'HavingFilter',
AGGREGATE_FILTER => 'AggregateFilter');
$filter_name = $filter_source[$filter_type];
$filter =& $this->$filter_name;
$filter =& $filter[$filter_scope];
return $filter->getFilter($name);
}
/**
* Removes specified filter from filters list
*
* @param string $name filter name (for internal use)
* @param int $filter_type is filter having filter or where filter
* @param int $filter_scope filter subtype: FLT_NORMAL,FLT_SYSTEM,FLT_SEARCH,FLT_VIEW,FLT_CUSTOM
* @access public
*/
function removeFilter($name, $filter_type = WHERE_FILTER, $filter_scope = FLT_SYSTEM)
{
$filter_source = Array( WHERE_FILTER => 'WhereFilter',
HAVING_FILTER => 'HavingFilter',
AGGREGATE_FILTER => 'AggregateFilter');
$filter_name = $filter_source[$filter_type];
$filter =& $this->$filter_name;
$filter =& $filter[$filter_scope];
$filter->removeFilter($name);
}
/**
* Clear list filters
*
*/
function clearFilters()
{
$filters = $this->getFilterStructure();
foreach ($filters as $filter_params) {
$filter =& $this->$filter_params['type'];
$filter[ $filter_params['class'] ]->clearFilters();
}
}
/**
* Counts the total number of records base on the query resulted from {@link kDBList::GetSelectSQL()}
*
* The method modifies the query to substitude SELECT part (fields listing) with COUNT(*).
* Special care should be applied when working with lists based on grouped queries, all aggregate function fields
* like SUM(), AVERAGE() etc. should be added to CountedSQL by using {@link kDBList::SetCountedSQL()}
*
* @access public
* @param string
* @return void
*/
function CountRecs()
{
$all_sql = $this->GetSelectSQL(true,false);
$sql = $this->getCountSQL($all_sql);
$this->Counted = true;
if( $this->GetGroupClause() )
{
$this->RecordsCount = count( $this->Conn->GetCol($sql) );
}
else
{
$this->RecordsCount = (int)$this->Conn->GetOne($sql);
}
$system_sql = $this->GetSelectSQL(true,true);
if($system_sql == $all_sql) //no need to query the same again
{
$this->NoFilterCount = $this->RecordsCount;
return;
}
$sql = $this->getCountSQL($system_sql);
if( $this->GetGroupClause() )
{
$this->NoFilterCount = count( $this->Conn->GetCol($sql) );
}
else
{
$this->NoFilterCount = (int)$this->Conn->GetOne($sql);
}
}
function GetNoFilterCount()
{
if (!$this->Counted) {
$this->CountRecs();
}
return $this->NoFilterCount;
}
function GetRecordsCount()
{
if (!$this->Counted) {
$this->CountRecs();
}
return $this->RecordsCount;
}
function getCountSQL($sql)
{
if ( preg_match("/DISTINCT(.*?)FROM(?!_)/is",$sql,$regs ) )
{
return preg_replace("/^\s*SELECT DISTINCT(.*?)FROM(?!_)/is", "SELECT COUNT(DISTINCT ".$regs[1].") AS count FROM", $sql);
}
else
{
return preg_replace("/^\s*SELECT(.*?)FROM(?!_)/is", "SELECT COUNT(*) AS count FROM ", $sql);
}
}
/**
* Queries the database with SQL resulted from {@link kDBList::GetSelectSQL()} and stores result in {@link kDBList::SelectRS}
*
* All the sorting, pagination, filtration of the list should be set prior to calling Query().
*
* @access public
* @param string
* @return void
*/
function Query($force=false)
{
if (!$force && $this->Queried) return true;
$q = $this->GetSelectSQL();
//$rs = $this->Conn->SelectLimit($q, $this->PerPage, $this->Offset);
//in case we have not counted records try to select one more item to find out if we have something more than perpage
$limit = $this->Counted ? $this->PerPage : $this->PerPage+1;
$sql = $q.' '.$this->Conn->getLimitClause($this->Offset,$limit);
$this->Records = $this->Conn->Query($sql);
if (!$this->Records && ($this->Page > 1)) {
// no records & page > 1, try to reset to 1st page (works only when list in not counted before)
$this->Application->StoreVar($this->getPrefixSpecial().'_Page', 1);
$this->SetPage(1);
$this->Query($force);
}
$this->SelectedCount = count($this->Records);
if (!$this->Counted) $this->RecordsCount = $this->SelectedCount;
if (!$this->Counted && $this->SelectedCount > $this->PerPage && $this->PerPage != -1) $this->SelectedCount--;
if ($this->Records === false) {
//handle errors here
return false;
}
$this->Queried = true;
return true;
}
function CalculateTotals()
{
$this->Totals = Array();
$fields = Array();
foreach($this->Fields as $field_name => $field_options)
{
$totals = getArrayValue($field_options, 'totals');
if(!$totals) continue;
$calculated_field = isset($this->CalculatedFields[$field_name]) && isset($this->VirtualFields[$field_name]);
$db_field = !isset($this->VirtualFields[$field_name]);
if($calculated_field || $db_field)
{
$field_expression = $calculated_field ? $this->CalculatedFields[$field_name] : '`'.$this->TableName.'`.`'.$field_name.'`';
$fields[$field_name] = $totals.'('.$field_expression.') AS '.$field_name.'_'.$totals;
}
}
if(!$fields) return false;
$sql = $this->GetSelectSQL(true, false);
$fields = implode(', ', $fields);
if ( preg_match("/DISTINCT(.*?)FROM(?!_)/is",$sql,$regs ) )
{
- $sql = preg_replace("/^.*SELECT DISTINCT(.*?)FROM(?!_)/is", 'SELECT '.$fields.' FROM', $sql);
+ $sql = preg_replace("/^\s*SELECT DISTINCT(.*?)FROM(?!_)/is", 'SELECT '.$fields.' FROM', $sql);
}
else
{
- $sql = preg_replace("/^.*SELECT(.*?)FROM(?!_)/is", 'SELECT '.$fields.' FROM ', $sql);
+ $sql = preg_replace("/^\s*SELECT(.*?)FROM(?!_)/is", 'SELECT '.$fields.' FROM ', $sql);
}
$totals = $this->Conn->Query($sql);
foreach($totals as $totals_row)
{
foreach($totals_row as $total_field => $field_value)
{
if(!isset($this->Totals[$total_field])) $this->Totals[$total_field] = 0;
$this->Totals[$total_field] += $field_value;
}
}
$this->TotalsCalculated = true;
}
function getTotal($field, $total_function)
{
if (!$this->TotalsCalculated) $this->CalculateTotals();
return $this->Totals[$field.'_'.$total_function];
}
function GetFormattedTotal($field, $total_function)
{
$val = $this->getTotal($field, $total_function);
$options = $this->GetFieldOptions($field);
$res = $val;
if (isset($options['formatter'])) {
$formatter =& $this->Application->recallObject($options['formatter']);
$res = $formatter->Format($val, $field, $this );
}
return $res;
}
/**
* Builds full select query except for LIMIT clause
*
* @access public
* @return string
*/
function GetSelectSQL($for_counting=false,$system_filters_only=false)
{
$q = parent::GetSelectSQL($this->SelectClause);
$q = !$for_counting ? $this->addCalculatedFields($q, 0) : str_replace('%2$s', '', $q);
$where = $this->GetWhereClause($for_counting,$system_filters_only);
$having = $this->GetHavingClause($for_counting,$system_filters_only);
$order = $this->GetOrderClause();
$group = $this->GetGroupClause();
if (!empty($where)) $q .= ' WHERE ' . $where;
if (!empty($group)) $q .= ' GROUP BY ' . $group;
if (!empty($having)) $q .= ' HAVING ' . $having;
if ( !$for_counting && !empty($order) ) $q .= ' ORDER BY ' . $order;
return $this->replaceModePrefix( str_replace('%1$s', $this->TableName, $q) );
}
/**
* Enter description here...
*
* @param string $clause where clause to extract calculated fields from
* @param int $aggregated 0 - having + aggregated, 1 - having only, 2 - aggregated only
* @return string
*/
function extractCalculatedFields($clause, $aggregated = 1)
{
$fields = $this->getCalculatedFields($aggregated);
if (is_array($fields) && count($fields) > 0) {
foreach ($fields as $field_name => $field_expression) {
$clause = preg_replace('/(\\(+)[(,` ]*'.$field_name.'[` ]{1}/', '\1 ('.$field_expression.') ', $clause);
$clause = preg_replace('/[,` ]{1}'.$field_name.'[` ]{1}/', ' ('.$field_expression.') ', $clause);
}
}
return $clause;
}
/**
* Returns WHERE clause of the query
*
* @access public
* @param bool $for_counting merge where filters with having filters + replace field names for having fields with their values
* @return string
*/
function GetWhereClause($for_counting=false,$system_filters_only=false)
{
$where =& $this->Application->makeClass('kMultipleFilter');
$where->addFilter('system_where', $this->WhereFilter[FLT_SYSTEM] );
if (!$system_filters_only) {
$where->addFilter('view_where', $this->WhereFilter[FLT_VIEW] );
$search_w = $this->WhereFilter[FLT_SEARCH]->getSQL();
if ($search_w || $for_counting) { // move search_having to search_where in case search_where isset or we are counting
$search_h = $this->extractCalculatedFields( $this->HavingFilter[FLT_SEARCH]->getSQL() );
$search_w = ($search_w && $search_h) ? $search_w.' OR '.$search_h : $search_w.$search_h;
$where->addFilter('search_where', $search_w );
}
// CUSTOM
$search_w = $this->WhereFilter[FLT_CUSTOM]->getSQL();
if ($search_w || $for_counting) { // move search_having to search_where in case search_where isset or we are counting
$search_h = $this->extractCalculatedFields( $this->HavingFilter[FLT_CUSTOM]->getSQL() );
$search_w = ($search_w && $search_h) ? $search_w.' AND '.$search_h : $search_w.$search_h;
$where->addFilter('custom_where', $search_w );
}
// CUSTOM
}
if( $for_counting ) // add system_having and view_having to where
{
$where->addFilter('system_having', $this->extractCalculatedFields($this->HavingFilter[FLT_SYSTEM]->getSQL()) );
if (!$system_filters_only) $where->addFilter('view_having', $this->extractCalculatedFields( $this->HavingFilter[FLT_VIEW]->getSQL() ) );
}
return $where->getSQL();
}
/**
* Depricated method
*
* @param string $clause
* @todo REMOVE
*/
function SetWhereClause($clause)
{
if( $this->Application->isDebugMode() )
{
global $debugger;
$debugger->appendTrace();
}
trigger_error('Depricated method <b>kDBList->SetWhereClause</b>. Use <b>kDBList->addFilter</b> instead.', E_USER_ERROR);
}
/**
* Returns HAVING clause of the query
*
* @param bool $for_counting don't return having filter in case if this is counting sql
* @param bool $system_filters_only return only system having filters
* @param int $aggregated 0 - aggregated and having, 1 - having only, 2 - aggregated only
* @return string
* @access public
*/
function GetHavingClause($for_counting=false, $system_filters_only=false, $aggregated = 0)
{
if ($for_counting) {
$aggregate_filter =& $this->Application->makeClass('kMultipleFilter');
$aggregate_filter->addFilter('aggregate_system', $this->AggregateFilter[FLT_SYSTEM]);
if (!$system_filters_only) {
$aggregate_filter->addFilter('aggregate_view', $this->AggregateFilter[FLT_VIEW]);
}
return $this->extractCalculatedFields($aggregate_filter->getSQL(), 2);
}
$having =& $this->Application->makeClass('kMultipleFilter');
$having->addFilter('system_having', $this->HavingFilter[FLT_SYSTEM] );
if ($aggregated == 0) {
if (!$system_filters_only) {
$having->addFilter('view_aggregated', $this->AggregateFilter[FLT_VIEW] );
}
$having->addFilter('system_aggregated', $this->AggregateFilter[FLT_SYSTEM]);
}
if (!$system_filters_only) {
$having->addFilter('view_having', $this->HavingFilter[FLT_VIEW] );
$having->addFilter('custom_having', $this->HavingFilter[FLT_CUSTOM] );
$search_w = $this->WhereFilter[FLT_SEARCH]->getSQL();
if (!$search_w) {
$having->addFilter('search_having', $this->HavingFilter[FLT_SEARCH] );
}
}
return $having->getSQL();
}
/**
* Returns GROUP BY clause of the query
*
* @access public
* @return string
*/
function GetGroupClause()
{
return $this->GroupByFields ? implode(',', $this->GroupByFields) : '';
}
function AddGroupByField($field)
{
$this->GroupByFields[$field] = $field;
}
function RemoveGroupByField($field)
{
unset($this->GroupByFields[$field]);
}
/**
* Adds order field to ORDER BY clause
*
* @access public
* @param string $field Field name
* @param string $direction Direction of ordering (asc|desc)
* @param bool $is_expression this is expression, that should not be escapted by "`" symbols
* @return void
*/
function AddOrderField($field, $direction = 'asc', $is_expression = false)
{
// original multilanguage field - convert to current lang field
$formatter = isset($this->Fields[$field]['formatter']) ? $this->Fields[$field]['formatter'] : false;
if ($formatter == 'kMultiLanguage' && !isset($this->Fields[$field]['master_field'])) {
$lang = $this->Application->GetVar('m_lang');
$field = 'l'.$lang.'_'.$field;
}
if (!isset($this->Fields[$field]) && $field != 'RAND()' && !$is_expression) {
trigger_error('<span class="debug_error">Incorrect sorting</span> defined (field = <b>'.$field.'</b>; direction = <b>'.$direction.'</b>) in config for prefix <b>'.$this->Prefix.'</b>', E_USER_WARNING);
}
$this->OrderFields[] = Array($field, $direction, $is_expression);
}
/**
* Removes all order fields
*
* @access public
* @return void
*/
function ClearOrderFields()
{
$this->OrderFields = Array();
}
/**
* Returns ORDER BY Clause of the query
*
* The method builds order by clause by iterating {@link kDBList::OrderFields} array and concatenating it.
*
* @access public
* @return string
*/
function GetOrderClause()
{
$ret = '';
foreach ($this->OrderFields as $field) {
$name = $field[0];
$ret .= isset($this->Fields[$name]) && !isset($this->VirtualFields[$name]) ? '`'.$this->TableName.'`.' : '';
if ($field[0] == 'RAND()' || $field[2]) {
$ret .= $field[0].' '.$field[1].',';
}
else {
$ret .= (strpos($field[0], '.') === false ? '`'.$field[0] . '`' : $field[0]) . ' ' . $field[1] . ',';
}
}
$ret = rtrim($ret, ',');
return $ret;
}
function GetOrderField($pos=NULL)
{
if(!(isset($this->OrderFields[$pos]) && $this->OrderFields[$pos]) )
{
$pos = 0;
}
return isset($this->OrderFields[$pos][0]) ? $this->OrderFields[$pos][0] : '';
}
function GetOrderDirection($pos=NULL)
{
if( !getArrayValue($this->OrderFields, $pos) ) $pos = 0;
return getArrayValue($this->OrderFields, $pos, 1);
}
/**
* Return unformatted field value
*
* @param string
* @return mixed
* @access public
*/
function GetDBField($name)
{
$row =& $this->getCurrentRecord();
return $row[$name];
}
/**
* Returns ID of currently processed record
*
* @return int
* @access public
*/
function GetID()
{
return $this->Queried ? $this->GetDBField($this->IDField) : null;
}
/**
* Allows kDBTagProcessor.SectionTitle to detect if it's editing or new item creation
*
* @return bool
*/
function IsNewItem()
{
// no such thing as NewItem for lists :)
return false;
}
function HasField($name)
{
$row =& $this->getCurrentRecord();
return isset($row[$name]);
}
function GetFieldValues()
{
return $this->getCurrentRecord();
}
/**
* Returns current record from list
*
* @return Array
*/
function &getCurrentRecord()
{
return $this->Records[$this->CurrentIndex];
}
/**
* Description
*
* @access public
* @param string
* @return void
*/
function GoFirst()
{
$this->CurrentIndex = 0;
}
/**
* Description
*
* @access public
* @return void
*/
function GoNext()
{
$this->CurrentIndex++;
}
/**
* Description
*
* @access public
* @return void
*/
function GoPrev()
{
if ($this->CurrentIndex>0)
$this->CurrentIndex--;
}
/**
* Description
*
* @access public
* @return bool
*/
function EOL()
{
return ($this->CurrentIndex >= $this->SelectedCount);
}
/**
* Description
*
* @access public
* @param string
* @return void
*/
function GetTotalPages()
{
if (!$this->Counted) $this->CountRecs();
if ($this->PerPage == -1) return 1;
$this->TotalPages = (($this->RecordsCount - ($this->RecordsCount % $this->PerPage)) / $this->PerPage) // integer part of division
+ (($this->RecordsCount % $this->PerPage) != 0); // adds 1 if there is a reminder
return $this->TotalPages;
}
/**
* Sets number of records to query per page
*
* @access public
* @param int $per_page Number of records to display per page
* @return void
*/
function SetPerPage($per_page)
{
$this->PerPage = $per_page;
}
function GetPerPage()
{
return $this->PerPage == -1 ? $this->RecordsCount : $this->PerPage;
}
/**
* Description
*
* @access public
* @param int $page
* @return void
*/
function SetPage($page)
{
if ($this->PerPage == -1) {
$this->Page = 1;
return;
}
if ($page < 1) $page = 1;
$this->Offset = ($page-1)*$this->PerPage;
if ($this->Counted && $this->Offset > $this->RecordsCount) {
$this->SetPage(1);
}
else {
$this->Page = $page;
}
//$this->GoFirst();
}
/**
* Sets current item field value
* (doesn't apply formatting)
*
* @access public
* @param string $name Name of the field
* @param mixed $value Value to set the field to
* @return void
*/
function SetDBField($name,$value)
{
$this->Records[$this->CurrentIndex][$name] = $value;
}
/**
* Apply where clause, that links this object to it's parent item
*
* @param string $special
* @access public
*/
function linkToParent($special)
{
$parent_prefix = $this->Application->getUnitOption($this->Prefix, 'ParentPrefix');
if($parent_prefix)
{
$parent_table_key = $this->Application->getUnitOption($this->Prefix, 'ParentTableKey');
if (is_array($parent_table_key)) $parent_table_key = getArrayValue($parent_table_key, $parent_prefix);
$foreign_key_field = $this->Application->getUnitOption($this->Prefix, 'ForeignKey');
if (is_array($foreign_key_field)) $foreign_key_field = getArrayValue($foreign_key_field, $parent_prefix);
if (!$parent_table_key || !$foreign_key_field) return ;
$parent_object =& $this->Application->recallObject($parent_prefix.'.'.$special);
$parent_id = $parent_object->GetDBField($parent_table_key);
if (!$parent_id) return ;
$this->addFilter('parent_filter', '`'.$this->TableName.'`.`'.$foreign_key_field.'` = '.$parent_id); // only for list in this case
}
}
/**
* Returns true if list was queried (same name as for kDBItem for easy usage)
*
* @return bool
*/
function isLoaded()
{
return $this->Queried;
}
/**
* Returns specified field value from all selected rows.
* Don't affect current record index
*
* @param string $field
* @return Array
*/
function GetCol($field)
{
$i = 0;
$ret = Array ();
while ($i < $this->SelectedCount) {
$ret[] = $this->Records[$i][$field];
$i++;
}
return $ret;
}
/**
* Set's field error, if pseudo passed not found then create it with message text supplied.
* Don't owerrite existing pseudo translation.
*
* @param string $field
* @param string $pseudo
* @param string $error_label
*/
function SetError($field, $pseudo, $error_label = null, $error_params = null)
{
$error_field = isset($this->Fields[$field]['error_field']) ? $this->Fields[$field]['error_field'] : $field;
$this->FieldErrors[$error_field]['pseudo'] = $pseudo;
$var_name = $this->getPrefixSpecial().'_'.$field.'_error';
$previous_pseudo = $this->Application->RecallVar($var_name);
if ($previous_pseudo) {
// don't set more then one error on field
return ;
}
$this->Application->StoreVar($var_name, $pseudo);
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/core/kernel/db/dblist.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.30.2.4
\ No newline at end of property
+1.30.2.5
\ No newline at end of property
Index: branches/RC/core/units/users/users_config.php
===================================================================
--- branches/RC/core/units/users/users_config.php (revision 10027)
+++ branches/RC/core/units/users/users_config.php (revision 10028)
@@ -1,231 +1,246 @@
<?php
$config = Array(
'Prefix' => 'u',
'ItemClass' => Array('class'=>'UsersItem','file'=>'users_item.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'UsersEventHandler','file'=>'users_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'UsersTagProcessor','file'=>'users_tag_processor.php','build_event'=>'OnBuild'),
'RegisterClasses' => Array(
Array('pseudo' => 'UsersSyncronizeManager', 'class' => 'UsersSyncronizeManager', 'file' => 'users_syncronize.php', 'build_event' => ''),
),
'AutoLoad' => true,
'ConfigPriority' => 0,
'Hooks' => Array (
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnPrepareStates',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'affil',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnCheckAffiliateAgreement'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnSubstituteSubscriber',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'RegularEvents' => Array(
'membership_expiration' => Array('EventName' => 'OnCheckExpiredMembership', 'RunInterval' => 1800, 'Type' => reAFTER),
),
'IDField' => 'PortalUserId',
'StatusField' => Array('Status'),
'TitleField' => 'Login',
'ItemType' => 6, // used for custom fields only (on user's case)
'StatisticsInfo' => Array(
'pending' => Array(
'icon' => 'icon16_user_pending.gif',
'label' => 'la_Text_Users',
'js_url' => "set_persistant_var('User_View', 4, 'users/users_list', '#url#')",
'url' => Array('t' => 'users/users_list', 'index_file' => 'users/user_list.php', 'pass' => 'm'),
'status' => STATUS_PENDING,
),
),
'TitlePresets' => Array(
'default' => Array(
'new_status_labels' => Array('u'=>'!la_title_Adding_User!'),
'edit_status_labels' => Array('u'=>'!la_title_Editing_User!'),
'new_titlefield' => Array('u'=>''),
),
'users_list' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#)"),
'users_edit' => Array('prefixes' => Array('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_General!"),
- 'users_custom' => Array('prefixes' => Array('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Custom!"),
-
- 'users_select' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#) - !la_title_SelectUser!"),
-
- 'user_groups_list' => Array('prefixes' => Array('u', 'u-ug_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Groups! (#u-ug_recordcount#)"),
+ 'user_edit_images' => Array ('prefixes' => Array('u', 'u-img_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Images! (#u-img_recordcount#)"),
+ 'user_edit_groups' => Array('prefixes' => Array('u', 'u-ug_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Groups! (#u-ug_recordcount#)"),
+ 'user_edit_custom' => Array('prefixes' => Array('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Custom!"),
'user_edit_group' => Array (
'prefixes' => Array ('u', 'u-ug'),
'edit_status_labels' => Array ('u-ug' => '!la_title_EditingMembership!'),
'format' => "#u_status# '#u_titlefield#' - #u-ug_status# '#u-ug_titlefield#'",
),
+ 'user_image_edit' => Array (
+ 'prefixes' => Array ('u', 'u-img'),
+ 'new_status_labels' => Array ('u-img' => '!la_title_Adding_Image!'),
+ 'edit_status_labels' => Array ('u-img' => '!la_title_Editing_Image!'),
+ 'new_titlefield' => Array ('u-img' => '!la_title_New_Image!'),
+ 'format' => "#u_status# '#u_titlefield#' - #u-img_status# '#u-img_titlefield#'",
+ ),
+
+ 'users_select' => Array('prefixes' => Array('u_List'), 'format' => "!la_title_Users! (#u_recordcount#) - !la_title_SelectUser!"),
'tree_users' => Array('format' => '!la_section_overview!'),
),
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ Array ('title' => 'la_tab_General', 't' => 'in-portal/users/users_edit', 'priority' => 1),
+ Array ('title' => 'la_tab_Groups', 't' => 'in-portal/users/users_edit_groups', 'priority' => 2),
+ Array ('title' => 'la_tab_Images', 't' => 'in-portal/users/user_edit_images', 'priority' => 3),
+ Array ('title' => 'la_tab_Custom', 't' => 'in-portal/users/users_edit_custom', 'priority' => 4),
+ ),
+ ),
'PermSection' => Array('main' => 'in-portal:user_list', 'email' => 'in-portal:user_email', 'custom' => 'in-portal:user_custom'),
'TableName' => TABLE_PREFIX.'PortalUser',
'ListSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'UserGroup ug ON %1$s.PortalUserId = ug.PortalUserId AND ug.PrimaryGroup = 1
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON ug.GroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId',
),
'ItemSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'UserGroup ug ON %1$s.PortalUserId = ug.PortalUserId AND ug.PrimaryGroup = 1
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON ug.GroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Login' => 'asc'),
)
),
- 'SubItems' => Array('addr', 'u-cdata', 'u-ug', 'fav', 'user-profile'),
+ 'SubItems' => Array('addr', 'u-cdata', 'u-ug', 'u-img', 'fav', 'user-profile'),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
1 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
2 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
)
),
'CalculatedFields' => Array(
'' => Array(
'PrimaryGroup' => 'g.Name',
'FullName' => 'CONCAT(FirstName, " ", LastName)',
),
),
'Fields' => Array
(
'PortalUserId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Login' => Array('type' => 'string', 'unique'=>Array('Login'), 'default' => null,'required'=>1, 'error_msgs' => Array('unique'=>'!lu_user_already_exist!')),
'Password' => Array('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword', 'skip_empty' => 1, 'default' => md5('')),
'FirstName' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'LastName' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'Company' => Array('type' => 'string','not_null' => '1','default' => ''),
'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/', 'sample_value' => 'email@domain.com', 'unique'=>Array('Email'), 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!') ),
'CreatedOn' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'Phone' => Array('type' => 'string','default' => null),
'Fax' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'Street' => Array('type' => 'string', 'default' => null),
'Street2' => Array('type' => 'string', 'not_null' => '1', 'default' => ''),
'City' => Array('type' => 'string','default' => null),
'State' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
'options' => Array(),
'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
'not_null' => '1','default' => ''),
'Zip' => Array('type' => 'string','default' => null),
'Country' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
'options_sql'=>'SELECT %1$s
FROM '.TABLE_PREFIX.'StdDestinations
LEFT JOIN '.TABLE_PREFIX.'Phrase
ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
WHERE
DestType=1
AND
LanguageId = %2$s
ORDER BY Translation',
'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
'not_null' => '1','default' => ''),
'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Enabled', 0=>'la_Disabled', 2=>'la_Pending'), 'use_phrases'=>1, 'not_null' => '1','default' => 2),
'Modified' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => '1', 'default' => '#NOW#' ),
'dob' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => null),
'tz' => Array('type' => 'int','default' => 0),
'ip' => Array('type' => 'string','default' => null),
'IsBanned' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'PassResetTime' => Array('type' => 'int','default' => null),
'PwResetConfirm' => Array('type' => 'string','default' => null),
'PwRequestTime' => Array('type' => 'int','default' => null),
'MinPwResetDelay' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(300 => '5', 600 => '10', 900 => '15', 1800 => '30', 3600 => '60'), 'use_phrases' => 0, 'not_null' => '1', 'default' => 1800),
),
'VirtualFields' => Array(
'ValidateLogin' => Array('type'=>'string','default'=>''),
'SubscribeEmail' => Array('type'=>'string','default'=>''),
'PrimaryGroup' => Array('type' => 'string', 'default' => ''),
'Captcha' => Array('type' => 'string', 'default' => ''),
'RootPassword' => Array('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyRootPassword', 'skip_empty' => 1, 'default' => md5('') ),
'FullName' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(0 => 'icon16_user_disabled.gif', 1 => 'icon16_user.gif', 2 => 'icon16_user_pending.gif'),
'Fields' => Array(
'Login' => Array('title' => 'la_col_Username', 'data_block' => 'grid_checkbox_td'),
'LastName' => Array( 'title'=>'la_col_LastName'),
'FirstName' => Array( 'title'=>'la_col_FirstName'),
'Email' => Array( 'title'=>'la_col_Email'),
'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'),
'CreatedOn_formatted' => Array('title' => 'la_col_CreatedOn', 'sort_field' => 'CreatedOn'),
),
),
'UserSelector' => Array(
'Icons' => Array(0 => 'icon16_user_disabled.gif', 1 => 'icon16_user.gif', 2 => 'icon16_user_pending.gif'),
'Fields' => Array(
'Login' => Array('title' => 'la_col_Username', 'data_block' => 'grid_radio_td'),
'LastName' => Array( 'title'=>'la_col_LastName'),
'FirstName' => Array( 'title'=>'la_col_FirstName'),
'Email' => Array( 'title'=>'la_col_Email'),
'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'),
'CreatedOn_formatted' => Array('title' => 'la_col_CreatedOn', 'sort_field' => 'CreatedOn'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/core/units/users/users_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.40.2.5
\ No newline at end of property
+1.40.2.6
\ No newline at end of property
Index: branches/RC/core/units/images/images_config.php
===================================================================
--- branches/RC/core/units/images/images_config.php (revision 10027)
+++ branches/RC/core/units/images/images_config.php (revision 10028)
@@ -1,158 +1,160 @@
<?php
$config = Array(
'Prefix' => 'img',
- 'Clones' => Array(
- 'l-img' => Array('ParentPrefix' => 'l'),
- 'n-img' => Array('ParentPrefix' => 'n'),
- 'bb-img'=> Array('ParentPrefix' => 'bb'),
- 'bb-post-img'=> Array('ParentPrefix' => 'bb-post'),
- /*'p-img' => Array('ParentPrefix' => 'p'),*/
- 'c-img' => Array('ParentPrefix' => 'c'),
- ),
+ 'Clones' => Array (
+ 'u-img' => Array('ParentPrefix' => 'u'),
+
+ 'l-img' => Array('ParentPrefix' => 'l'),
+ 'n-img' => Array('ParentPrefix' => 'n'),
+ 'bb-img'=> Array('ParentPrefix' => 'bb'),
+ 'bb-post-img'=> Array('ParentPrefix' => 'bb-post'),
+ /*'p-img' => Array('ParentPrefix' => 'p'),*/
+ 'c-img' => Array('ParentPrefix' => 'c'),
+ ),
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ImageEventHandler','file'=>'image_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ImageTagProcessor','file'=>'image_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array (
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'Image',
'LocalTagName' => 'ItemImageTag',
'LocalSpecial' => '-item',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ImageSrc',
'LocalTagName' => 'ItemImageTag',
'LocalSpecial' => '-item',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ImageSize',
'LocalTagName' => 'ItemImageTag',
'LocalSpecial' => '-item',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListImages',
'LocalTagName' => 'PrintList2',
'LocalSpecial' => 'list',
),
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'LargeImageExists',
'LocalTagName' => 'LargeImageExists',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'ImageId',
'StatusField' => Array('Enabled', 'DefaultImg'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'TableName' => TABLE_PREFIX.'Images',
'ParentTableKey'=> 'ResourceId', // linked field in master table
'ForeignKey' => 'ResourceId', // linked field in subtable
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
)
),
'CalculatedFields' => Array(
'' => Array(
'Preview' => '0',
),
),
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'ImageId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'ResourceId' => Array('type'=>'int', 'not_null'=>1, 'default' => 0),
'Url' => Array('type' => 'string', 'max_len'=>255, 'default' => '', 'not_null'=>1),
'Name' => Array('type' => 'string', 'max_len'=>255, 'required'=>1, 'not_null'=>1, 'default' => ''),
'AltName' => Array('type' => 'string', 'max_len'=>255, 'required' => 1, 'not_null' => 1, 'default' => ''),
'ImageIndex' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'LocalImage' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
'LocalPath' => Array('type' => 'string', 'formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len'=>240, 'default' => '', 'not_null' => 1, 'include_path' => 1,
'allowed_types' => Array(
0 => 'image/jpeg',
1 => 'image/pjpeg',
2 => 'image/png',
3 => 'image/gif',
4 => 'image/bmp'
),
'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
'bad_file_size' => '!la_error_FileTooLarge!',
'cant_save_file' => '!la_error_cant_save_file!'
)
),
'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null'=>1),
'DefaultImg' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'ThumbUrl' => Array('type' => 'string', 'max_len' => 255, 'default' => null),
'Priority' => Array('type'=>'int', 'default' => 0, 'not_null'=>1),
'ThumbPath' => Array('type' => 'string', 'formatter'=>'kPictureFormatter', 'skip_empty'=>1, 'max_len' => 255, 'default' => null,
'allowed_types' => Array(
0 => 'image/jpeg',
1 => 'image/pjpeg',
2 => 'image/png',
3 => 'image/gif',
4 => 'image/bmp'
),
'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
'bad_file_size' => '!la_error_FileTooLarge!',
'cant_save_file' => '!la_error_cant_save_file!'
)
),
'LocalThumb' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
'SameImages' => Array('type'=>'int', 'default' => 1, 'not_null'=>1),
),
'VirtualFields' => Array(
'Preview' => Array(),
'ImageUrl' => Array(),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon17_custom.gif','1_0'=>'icon16_image.gif','0_0'=>'icon16_image_disabled.gif','1_1'=>'icon16_image_primary.gif'),
'Fields' => Array(
'Name' => Array( 'title'=>'la_col_ImageName' , 'data_block' => 'image_caption_td'),
'AltName' => Array( 'title'=>'la_col_AltName' ),
'Url' => Array( 'title'=>'la_col_ImageUrl', 'data_block' => 'image_url_td' ),
'Enabled' => Array( 'title'=>'la_col_ImageEnabled' ),
'Preview' => Array( 'title'=>'la_col_Preview', 'data_block' => 'image_preview_td' ),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/core/units/images/images_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/core/admin_templates/incs/form_blocks.tpl
===================================================================
--- branches/RC/core/admin_templates/incs/form_blocks.tpl (revision 10027)
+++ branches/RC/core/admin_templates/incs/form_blocks.tpl (revision 10028)
@@ -1,711 +1,715 @@
-<inp2:m_DefineElement name="combined_header" permission_type="view" module="" icon="">
+<inp2:m_DefineElement name="combined_header" permission_type="view" tab_preset="" module="" icon="">
<inp2:adm_SectionInfo section="$section" info="perm_section" result_to_var="perm_section"/>
<inp2:m_RequireLogin permissions="{$perm_section}.{$permission_type}" system="1"/>
<inp2:m_if check="m_Param" name="prefix" inverse="1"><inp2:adm_SectionInfo section="$section" info="SectionPrefix" result_to_var="prefix"/></inp2:m_if>
<inp2:m_if check="m_get" var="m_wid" inverse="1">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr style="background: url(<inp2:adm_SectionInfo section="$section" info="module_path" module="$module"/>img/logo_bg.gif) no-repeat top right; height: 55px;">
<td valign="top" class="admintitle" align="left" style="padding-top: 10px; padding-bottom: 10px;">
<img width="46" height="46" src="<inp2:adm_SectionInfo section="$section" info="module_path" module="$module"/>img/icons/icon46_<inp2:adm_SectionInfo section="$section" info="icon"/>.gif" align="absmiddle" title="<inp2:adm_SectionInfo section="$section" info="label"/>">&nbsp;<inp2:adm_SectionInfo section="$section" info="label"/>
</td>
</tr>
</table>
</inp2:m_if>
<inp2:m_if check="m_Param" name="tabs">
<inp2:m_include t="$tabs"/>
</inp2:m_if>
+ <inp2:m_if check="m_Param" name="tab_preset">
+ <inp2:m_RenderElement name="edit_tabs" prefix="$prefix" preset_name="$tab_preset"/>
+ </inp2:m_if>
+
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="tablenav">
<table border="0" cellpadding="2" cellspacing="0" class="bordered-no-bottom" width="100%" height="30">
<tr>
<td class="header_left_bg" nowrap valign="middle">
<inp2:adm_SectionInfo section="$section" info="label" result_to_var="default_title"/>
<span class="tablenav_link" id="blue_bar"><inp2:{$prefix}_SectionTitle title_preset="$title_preset" title="$default_title" cut_first="100" pass_params="true"/></span>
</td>
<td align="right" valign="middle">
<script type="text/javascript">
set_window_title( RemoveTranslationLink(document.getElementById('blue_bar').innerHTML, false).replace(/(<[^<]+>)/g, '') + ' - <inp2:m_Phrase label="la_AdministrativeConsole"/>');
</script>
<inp2:m_if check="m_ModuleEnabled" module="In-Portal">
<script>
var $help_url='<inp2:m_t t="help" h_prefix="$prefix" h_icon="$icon" h_module="$module" h_title_preset="$title_preset" pass="all,m,h" m_opener="p" escape="escape"/>';
$help_url = $help_url.replace(/#/g, '%23');
</script>
<a href="javascript: OpenHelp($help_url);">
<img src="img/blue_bar_help.gif" border="0">
</a>
</inp2:m_if>
<inp2:m_if check="m_Param" name="pagination">
<inp2:m_RenderElement name="grid_pagination_elem" PrefixSpecial="$prefix" pass_params="1"/>
</inp2:m_if>
</td>
</tr>
</table>
</td>
</tr>
</table>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="section_header">
<inp2:m_if check="m_ParamEquals" name="prefix" value="" inverse="inverse">
<inp2:m_RenderElement name="section_header_new" pass_params="true"/>
<inp2:m_else />
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr class="section_header_bg">
<td valign="top" class="admintitle" align="left" style="padding-top: 2px; padding-bottom: 2px;">
<img width="46" height="46" src="img/icons/<inp2:adm_GetSectionIcon icon="$icon"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$title"/>">&nbsp;<inp2:adm_GetSectionTitle phrase="$title"/>
</td>
</tr>
</table>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="section_header_new" module="#session#">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr style="background: url(<inp2:ModulePath module="$module"/>img/logo_bg.gif) no-repeat top right; height: 55px;">
<td valign="top" class="admintitle" align="left" style="padding-top: 10px; padding-bottom: 10px;">
<img width="46" height="46" src="<inp2:ModulePath module="$module"/>img/icons/<inp2:adm_GetSectionIcon icon="$icon"/>.gif" align="absmiddle" title="<inp2:adm_GetSectionTitle phrase="$title"/>">&nbsp;<inp2:adm_GetSectionTitle phrase="$title"/>
</td>
</tr>
</table>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="blue_bar" module="" icon="" pagination="0">
<table border="0" cellpadding="2" cellspacing="0" class="bordered-no-bottom" width="100%" height="30">
<tr>
<td class="header_left_bg" nowrap width="80%" valign="middle">
<span class="tablenav_link" id="blue_bar"><inp2:{$prefix}_SectionTitle title_preset="$title_preset" title="Invalid OR Missing title preset [#preset_name#]" cut_first="100" pass_params="true"/></span>
</td>
<td align="right" class="tablenav" width="20%" valign="middle">
<inp2:m_if check="m_ModuleEnabled" module="In-Portal">
<script>
var $help_url='<inp2:m_t t="help" h_prefix="$prefix" h_icon="$icon" h_module="$module" h_title_preset="$title_preset" pass="all,m,h" m_opener="p" escape="escape"/>';
$help_url = $help_url.replace(/#/g, '%23');
set_window_title( RemoveTranslationLink(document.getElementById('blue_bar').innerHTML, false).replace(/(<[^<]+>)/g, '') );
</script>
<a href="javascript: OpenHelp($help_url);">
<img src="img/blue_bar_help.gif" border="0">
</a>
</inp2:m_if>
<inp2:m_if check="m_Param" name="pagination">
<inp2:m_RenderElement name="grid_pagination_elem" grid="st" PrefixSpecial="$prefix" pass_params="1"/>
</inp2:m_if>
</td>
</tr>
</table>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_original_label">
<td><inp2:$prefix.original_Field field="$field" nl2br="1"/></td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="subsection" prefix="">
<tr class="subsectiontitle">
<td colspan="3"><inp2:m_phrase label="$title"/></td>
<inp2:m_if check="m_ParamEquals" name="prefix" value="" inverse="inverse">
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<td><inp2:m_phrase name="$original_title"/></td>
</inp2:m_if>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_field_caption" title="" subfield="" NamePrefix="">
<inp2:m_inc param="tab_index" by="1"/>
<td class="text">
<inp2:m_if check="m_Param" name="title">
<label for="<inp2:m_param name="NamePrefix"/><inp2:InputName field="$field" subfield="$subfield"/>">
<span class="<inp2:m_if check="HasError" field="$field" >error</inp2:m_if>">
<inp2:m_phrase label="$title"/></span><inp2:m_if check="{$prefix}_IsRequired" field="$field" ><span class="error">&nbsp;*</span></inp2:m_if>:
</label>
<inp2:m_else/>
&nbsp;
</inp2:m_if>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_label" is_last="" as_label="" currency="" is_last="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td valign="top" class="text">
<inp2:{$prefix}_Field field="$field" as_label="$as_label" currency="$currency"/>
<inp2:m_if check="{$prefix}_HasParam" name="hint_label"><span class="small"><inp2:m_phrase label="$hint_label"/></span></inp2:m_if>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_id_label" db="">
<inp2:m_if check="{$prefix}_FieldEquals" field="$field" value="" inverse="inverse">
<inp2:m_RenderElement name="inp_label" pass_params="true"/>
</inp2:m_if>
<input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field" db="$db"/>">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_box" subfield="" class="" is_last="" maxlength="" onblur="" size="" onkeyup="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" subfield="$subfield" title="$title" is_last="$is_last"/>
<td>
<input type="text" name="<inp2:{$prefix}_InputName field="$field" subfield="$subfield"/>" id="<inp2:{$prefix}_InputName field="$field" subfield="$subfield"/>" value="<inp2:{$prefix}_Field field="$field" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>" onkeyup="<inp2:m_Param name="onkeyup"/>">
<inp2:m_if check="{$prefix}_HasParam" name="hint_label"><span class="small"><inp2:m_phrase label="$hint_label"/></span></inp2:m_if>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_password" class="" size="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title"/>
<td>
<input type="password" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" />
<inp2:m_if check="{$prefix}_HasParam" name="hint_label"><span class="small"><inp2:m_phrase label="$hint_label"/></span></inp2:m_if>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_upload" class="" size="" thumbnail="" is_last="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<inp2:m_if check="m_Param" name="thumbnail">
<inp2:m_if check="{$prefix}_FieldEquals" name="$field" value="" inverse="inverse">
<img src="<inp2:{$prefix}_Field field="$field" format="resize:{$thumbnail}"/>" alt=""/><br />
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<input type="hidden" id="<inp2:{$prefix}_InputName field="Delete{$field}"/>" name="<inp2:{$prefix}_InputName field="Delete{$field}"/>" value="0" />
<input type="checkbox" id="_cb_<inp2:{$prefix}_InputName field="Delete{$field}"/>" onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field="Delete{$field}"/>'));">
</td>
<td>
<label for="_cb_<inp2:{$prefix}_InputName field="Delete{$field}"/>"><inp2:m_phrase name="la_btn_DeleteImage"/></label>
</td>
</tr>
</table>
</inp2:m_if>
<input type="file" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>">
<inp2:m_else/>
<input type="file" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>">
<inp2:m_if check="{$prefix}_FieldEquals" name="$field" value="" inverse="inverse">
(<inp2:{$prefix}_Field field="$field"/>)
</inp2:m_if>
</inp2:m_if>
<input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>[upload]" id="<inp2:{$prefix}_InputName field="$field"/>[upload]" value="<inp2:{$prefix}_Field field="$field"/>">
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_swf_upload" class="" is_last="" style="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td class="uploader-text">
<div class="uploader-main" id="<inp2:{$prefix}_InputName field="$field"/>_progress">
<div class="uploader-percent" id="<inp2:{$prefix}_InputName field="$field"/>_percent">0%</div>
<div class="uploader-left">
<div class="uploader-done" id="<inp2:{$prefix}_InputName field="$field"/>_done"></div>
</div>
<table style="border-collapse: collapse; width: 100%;">
<tr>
<td style="width: 120px">Uploading:</td><td id="<inp2:{$prefix}_InputName field="$field"/>_progress_filename"></td>
</tr>
<tr>
<td>Progress:</td><td id="<inp2:{$prefix}_InputName field="$field"/>_progress_progress"></td>
</tr>
<tr>
<td>Time elapsed:</td><td id="<inp2:{$prefix}_InputName field="$field"/>_progress_elapsed"></td>
</tr>
<tr>
<td>Time remaining:</td><td id="<inp2:{$prefix}_InputName field="$field"/>_progress_remaining"></td>
</tr>
<tr>
<td colspan="2" style="text-align: center"><a href="javascript:UploadsManager.CancelUpload('<inp2:{$prefix}_InputName field="$field"/>')">Cancel</a></td>
</tr>
</table>
</div>
<div>
<input class="button" type="button" onclick="UploadsManager.Browse('<inp2:{$prefix}_InputName field="$field"/>')" value="Browse"/>
<input class="button" type="button" onclick="UploadsManager.StartUpload('<inp2:{$prefix}_InputName field="$field"/>')" value="Upload"/>
</div>
<div id="<inp2:{$prefix}_InputName field="$field"/>_queueinfo"></div>
<div id="<inp2:{$prefix}_InputName field="$field"/>_holder"></div>
<input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>[upload]" id="<inp2:{$prefix}_InputName field="$field"/>[upload]" value="<inp2:{$prefix}_Field field="$field"/>"><br/>
<input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>[tmp_ids]" id="<inp2:{$prefix}_InputName field="$field"/>[tmp_ids]" value="">
<input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>[tmp_names]" id="<inp2:{$prefix}_InputName field="$field"/>[tmp_names]" value="">
<input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>[tmp_deleted]" id="<inp2:{$prefix}_InputName field="$field"/>[tmp_deleted]" value="">
<script type="text/javascript">
UploadsManager.AddUploader('<inp2:{$prefix}_InputName field="$field"/>',
{
allowedFiletypesDescription : '<inp2:{$prefix}_FieldOption field="$field" option="files_description" js_escape="1"/>',
allowedFiletypes : '<inp2:{$prefix}_FieldOption field="$field" option="file_types"/>',
allowedFilesize : '<inp2:{$prefix}_FieldOption field="$field" option="max_size"/>',
multiple : '<inp2:{$prefix}_FieldOption field="$field" option="multiple"/>',
prefix : '<inp2:m_Param name="prefix"/>',
field : '<inp2:m_Param name="field"/>',
urls : '<inp2:{$prefix}_Field field="$field" format="file_urls" js_escape="1"/>',
names : '<inp2:{$prefix}_Field field="$field" format="file_names" js_escape="1"/>',
sizes : '<inp2:{$prefix}_Field field="$field" format="file_sizes" js_escape="1"/>',
flashsid : '<inp2:m_SID/>',
uploadURL : '<inp2:m_t pass="m,$prefix" {$prefix}_event="OnUploadFile" field="#FIELD#" id="#ID#" flashsid="#SID#" js_escape="1" no_amp="1" />',
deleteURL : '<inp2:m_t pass="m,$prefix" {$prefix}_event="OnDeleteFile" field="#FIELD#" file="#FILE#" js_escape="1" no_amp="1"/>',
tmp_url : '<inp2:m_t pass="m,$prefix" {$prefix}_event="OnViewFile" tmp="1" field="#FIELD#" file="#FILE#" id="#ID#" js_escape="1" no_amp="1" />',
IconPath: '../../admin/editor/cmseditor/editor/images'
}
)
UploadsManager.formContainerId = 'scroll_container';
</script>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_box_ml" class="" size="" onblur="" maxlength="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text" valign="top">
<span class="<inp2:m_if check="{$prefix}_HasError" field="$field" >error</inp2:m_if>">
<inp2:m_phrase label="$title"/><inp2:m_if check="{$prefix}_IsRequired" field="$field" ><span class="error"> *</span></inp2:m_if>:</span><br>
<a href="javascript:PreSaveAndOpenTranslator('<inp2:m_param name="prefix"/>', '<inp2:m_param name="field"/>', 'popups/translator');" title="<inp2:m_Phrase label="la_Translate"/>"><img src="img/icons/icon24_translate.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field" format="no_default"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_hidden" db="">
<input type="hidden" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field" db="$db"/>">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_date" class="" is_last="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<input type="text" name="<inp2:{$prefix}_InputName field="{$field}_date"/>" id="<inp2:{$prefix}_InputName field="{$field}_date"/>" value="<inp2:{$prefix}_Field field="{$field}_date" format="_regional_InputDateFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:{$prefix}_Format field="{$field}_date" input_format="1" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>" datepickerIcon="<inp2:m_ProjectBase/>core/admin_templates/img/calendar_icon.gif">&nbsp;<span class="small">(<inp2:{$prefix}_Format field="{$field}_date" input_format="1" human="true"/>)</span>
<script type="text/javascript">
initCalendar("<inp2:{$prefix}_InputName field="{$field}_date"/>", "<inp2:{$prefix}_Format field="{$field}_date" input_format="1"/>");
</script>
<input type="hidden" name="<inp2:{$prefix}_InputName field="{$field}_time"/>" id="<inp2:{$prefix}_InputName field="{$field}_time" input_format="1"/>" value="">
</td>
<td class="error"><inp2:{$prefix}_Error field="{$field}_date"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_time" class="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td class="control-cell">
<input type="text" name="<inp2:{$prefix}_InputName field="{$field}_time"/>" id="<inp2:{$prefix}_InputName field="{$field}_time"/>" value="<inp2:{$prefix}_Field field="{$field}_time" format="_regional_InputTimeFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:{$prefix}_Format field="{$field}_time" input_format="1" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>">&nbsp;
<span class="small">(<inp2:{$prefix}_Format field="{$field}_time" input_format="1" human="true"/>)</span>
<input type="hidden" name="<inp2:{$prefix}_InputName field="{$field}_date"/>" id="<inp2:{$prefix}_InputName field="{$field}_date" input_format="1"/>" value="">
</td>
<td class="error"><inp2:{$prefix}_Error field="{$field}_time"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_date_time" class="" is_last="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<!-- <input type="hidden" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field" db="db"/>"> -->
<input type="text" name="<inp2:{$prefix}_InputName field="{$field}_date"/>" id="<inp2:{$prefix}_InputName field="{$field}_date"/>" value="<inp2:{$prefix}_Field field="{$field}_date" format="_regional_InputDateFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:{$prefix}_Format field="{$field}_date" input_format="1" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>" datepickerIcon="<inp2:m_ProjectBase/>core/admin_templates/img/calendar_icon.gif">
<span class="small">(<inp2:{$prefix}_Format field="{$field}_date" input_format="1" human="true"/>)</span>
<script type="text/javascript">
initCalendar("<inp2:{$prefix}_InputName field="{$field}_date"/>", "<inp2:{$prefix}_Format field="{$field}_date" input_format="1"/>");
</script>
&nbsp;<input type="text" name="<inp2:{$prefix}_InputName field="{$field}_time"/>" id="<inp2:{$prefix}_InputName field="{$field}_time"/>" value="<inp2:{$prefix}_Field field="{$field}_time" format="_regional_InputTimeFormat"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:{$prefix}_Format field="{$field}_time" input_format="1" edit_size="edit_size"/>" class="<inp2:m_param name="class"/>"><span class="small"> (<inp2:{$prefix}_Format field="{$field}_time" input_format="1" human="true"/>)</span>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_textarea" class="" allow_html="allow_html">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text" valign="top">
<span class="<inp2:m_if check="{$prefix}_HasError" field="$field" >error</inp2:m_if>">
<inp2:m_phrase label="$title"/><inp2:m_if check="{$prefix}_IsRequired" field="$field" ><span class="error"> *</span></inp2:m_if>:</span><br>
<inp2:m_if check="m_ParamEquals" name="allow_html" value="allow_html">
<a href="javascript:OpenEditor('&section=in-link:editlink_general','kernel_form','<inp2:{$prefix}_InputName field="$field"/>');"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
</inp2:m_if>
</td>
<td>
<textarea tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" cols="<inp2:m_param name="cols"/>" rows="<inp2:m_param name="rows"/>" class="<inp2:m_param name="class"/>"><inp2:{$prefix}_Field field="$field"/></textarea>
<inp2:m_if check="{$prefix}_HasParam" name="hint_label">
<br /><span class="small"><inp2:m_phrase label="$hint_label"/></span>
</inp2:m_if>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_textarea_ml" class="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text" valign="top">
<span class="<inp2:m_if check="{$prefix}_HasError" field="$field" >error</inp2:m_if>">
<inp2:m_phrase label="$title"/><inp2:m_if check="{$prefix}_IsRequired" field="$field" ><span class="error"> *</span></inp2:m_if>:</span><br>
<a href="javascript:OpenEditor('&section=in-link:editlink_general','kernel_form','<inp2:{$prefix}_InputName field="$field"/>');"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a>
<a href="javascript:PreSaveAndOpenTranslator('<inp2:m_param name="prefix"/>', '<inp2:m_param name="field"/>', 'popups/translator', 1);" title="<inp2:m_Phrase label="la_Translate"/>"><img src="img/icons/icon24_translate.gif" style="cursor:hand" border="0"></a>
</td>
<td>
<textarea tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" cols="<inp2:m_param name="cols"/>" rows="<inp2:m_param name="rows"/>" class="<inp2:m_param name="class"/>"><inp2:{$prefix}_Field field="$field"/></textarea>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_user" class="" size="" is_last="" old_style="0" onkeyup="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>" onkeyup="<inp2:m_Param name="onkeyup"/>">
<inp2:m_if check="m_ParamEquals" name="old_style" value="1">
<a href="#" onclick="return OpenUserSelector('','kernel_form','<inp2:{$prefix}_InputName field="$field"/>');">
<inp2:m_else/>
<a href="javascript:openSelector('<inp2:m_param name="prefix"/>', '<inp2:m_t t="user_selector" pass="all,$prefix" escape="1"/>', '<inp2:m_param name="field"/>');">
</inp2:m_if>
<img src="img/icons/icon24_link_user.gif" style="cursor:hand;" border="0">
</a>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_category" class="" size="" is_last="" old_style="0" onkeyup="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<table cellpadding="0" cellspacing="0">
<tr>
<td id="<inp2:{$prefix}_InputName field="$field"/>_path">
<inp2:m_DefineElement name="category_caption">
<inp2:m_if check="m_ParamEquals" name="cat_id" value="0" inverse="inverse">
<inp2:m_param name="separator"/>
</inp2:m_if>
<inp2:m_param name="cat_name"/>
</inp2:m_DefineElement>
<inp2:$prefix_FieldCategoryPath field="$field" separator=" &gt; " render_as="category_caption"/>
<inp2:m_RenderElement name="inp_edit_hidden" pass_params="1"/>
</td>
<td valign="middle">
<img src="img/spacer.gif" width="3" height="1" alt=""/>
<a href="javascript:openSelector('<inp2:m_param name="prefix"/>', '<inp2:adm_SelectorLink prefix="$prefix" selection_mode="single" tab_prefixes="none"/>', '<inp2:m_param name="field"/>');">
<img src="img/icons/icon24_cat.gif" border="0"/>
</a>
<a href="#" onclick="disable_category('<inp2:m_Param name="field"/>'); return false;"><inp2:m_Phrase name="la_Text_Disable"/></a>
<script type="text/javascript">
function disable_category($field) {
var $field = '<inp2:{$prefix}_InputName field="#FIELD_NAME#"/>'.replace('#FIELD_NAME#', $field);
set_hidden_field($field, '');
document.getElementById($field + '_path').style.display = 'none';
}
</script>
</td>
</tr>
</table>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_option_item">
<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_option_phrase">
<option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_phrase label="$option"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_options" is_last="" has_empty="0" empty_value="" onchange="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" onchange="<inp2:m_Param name="onchange"/>">
<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
<inp2:m_else/>
<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
</inp2:m_if>
</select>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_multioptions" is_last="" has_empty="0" empty_value="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<select multiple tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:{$prefix}_InputName field="$field"/>_select" onchange="update_multiple_options('<inp2:{$prefix}_InputName field="$field"/>');">
<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
<inp2:m_else/>
<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
</inp2:m_if>
</select>
<input type="hidden" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>"/>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_radio_item" onclick="" onchange="">
<input type="radio" <inp2:m_param name="checked"/> name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="<inp2:m_param name="onclick"/>" onchange="<inp2:m_param name="onchange"/>"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_radio_phrase" onclick="" onchange="">
<input type="radio" <inp2:m_param name="checked"/> name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="<inp2:m_param name="onclick"/>" onchange="<inp2:m_param name="onchange"/>"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_radio" is_last="" pass_tabindex="" onclick="" onchange="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
<inp2:{$prefix}_PredefinedOptions field="$field" tabindex="$pass_tabindex" block="inp_radio_phrase" selected="checked" onclick="$onclick" onchange="$onchange" />
<inp2:m_else />
<inp2:{$prefix}_PredefinedOptions field="$field" tabindex="$pass_tabindex" block="inp_radio_item" selected="checked" onclick="$onclick" onchange="$onchange" />
</inp2:m_if>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_checkbox" is_last="" field_class="" onchange="" onclick="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last" NamePrefix="_cb_"/>
<td>
<input type="hidden" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field" db="db"/>">
<!--<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field="$field"/>" name="_cb_<inp2:{$prefix}_InputName field="$field"/>" <inp2:{$prefix}_Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field="$field"/>'));" onchange="<inp2:m_param name="onchange"/>">-->
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field="$field"/>" name="_cb_<inp2:{$prefix}_InputName field="$field"/>" <inp2:{$prefix}_Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field="$field"/>'));<inp2:m_param name="onchange"/>" onclick="<inp2:m_param name="onclick"/>">
<inp2:m_if check="{$prefix}_HasParam" name="hint_label"><inp2:m_phrase label="$hint_label"/></inp2:m_if>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_checkbox_item">
<input type="checkbox" <inp2:m_param name="checked"/> id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="update_checkbox_options(/^<inp2:{$prefix}_InputName field="$field" as_preg="1"/>_([0-9A-Za-z-]+)/, '<inp2:{$prefix}_InputName field="$field"/>');"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_checkbox_phrase">
<input type="checkbox" <inp2:m_param name="checked"/> id="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>" onclick="update_checkbox_options(/^<inp2:{$prefix}_InputName field="$field" as_preg="1"/>_([0-9A-Za-z-]+)/, '<inp2:{$prefix}_InputName field="$field"/>');"><label for="<inp2:{$prefix}_InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_checkboxes" no_empty="" is_last="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td>
<inp2:m_if check="{$prefix}_FieldOption" field="$field" option="use_phrases">
<inp2:{$prefix}_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" block="inp_checkbox_phrase" selected="checked"/>
<inp2:m_else/>
<inp2:{$prefix}_PredefinedOptions field="$field" no_empty="$no_empty" tabindex="$pass_tabindex" block="inp_checkbox_item" selected="checked"/>
</inp2:m_if>
<inp2:m_RenderElement prefix="$prefix" name="inp_edit_hidden" field="$field"/>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_checkbox_allow_html">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td colspan="2">
<label for="_cb_<inp2:m_param name="field"/>"><inp2:m_phrase label="la_enable_html"/></label>
<input type="hidden" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:m_param name="field"/>" <inp2:{$prefix}_Field field="$field" checked="checked"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field="$field"/>'))">
<br>
<span class="hint"><img src="img/smicon7.gif" width="14" height="14" align="absmiddle"><inp2:m_phrase label="la_Warning_Enable_HTML"/></span>
</td>
<td>&nbsp;</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="inp_edit_weight" subfield="" class="" is_last="" maxlength="">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" subfield="$subfield" title="$title" is_last="$is_last"/>
<td>
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
<input type="text" name="<inp2:{$prefix}_InputName field="$field" subfield="$subfield"/>" id="<inp2:{$prefix}_InputName field="$field" subfield="$subfield"/>" value="<inp2:{$prefix}_Field field="$field" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
<inp2:m_phrase label="la_kg" />
</inp2:m_if>
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
<input type="text" name="<inp2:{$prefix}_InputName field="{$field}_a" subfield="$subfield"/>" id="<inp2:{$prefix}_InputName field="{$field}_a" subfield="$subfield"/>" value="<inp2:{$prefix}_Field field="{$field}_a" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
<inp2:m_phrase label="la_lbs" />
<input type="text" name="<inp2:{$prefix}_InputName field="{$field}_b" subfield="$subfield"/>" id="<inp2:{$prefix}_InputName field="{$field}_b" subfield="$subfield"/>" value="<inp2:{$prefix}_Field field="{$field}_b" subfield="$subfield"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
<inp2:m_phrase label="la_oz" />
</inp2:m_if>
</td>
<td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</td>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
<inp2:m_RenderElement prefix="$prefix" field="$field" name="inp_original_label"/>
</inp2:m_if>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="ajax_progress_bar">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered">
<tr class="table-color1">
<td colspan="2">
<img src="img/spacer.gif" height="10" width="1" alt="" /><br />
<!-- progress bar paddings: begin -->
<table width="90%" cellpadding="2" cellspacing="0" border="0" align="center">
<tr>
<td class="progress-text">0%</td>
<td width="100%">
<!-- progress bar: begin -->
<table cellspacing="0" cellpadding="0" width="100%" border="0" align="center" style="background-color: #FFFFFF; border: 1px solid #E6E6E6;">
<tr>
<td colspan="3"><img src="img/spacer.gif" height="2" width="1" alt="" /></td>
</tr>
<tr>
<td width="2"><img src="img/spacer.gif" height="13" width="3" alt="" /></td>
<td align="center" width="100%">
<table cellspacing="0" cellpadding="0" width="100%" border="0" style="background: url(img/progress_left.gif) repeat-x;">
<tr>
<td id="progress_bar[done]" style="background: url(img/progress_done.gif);" align="left"></td>
<td id="progress_bar[left]" align="right"><img src="img/spacer.gif" height="9" width="1" alt="" /></td>
</tr>
</table>
</td>
<td width="1"><img src="img/spacer.gif" height="13" width="3" alt="" /></td>
</tr>
<tr>
<td colspan="3"><img src="img/spacer.gif" height="2" width="1" alt="" /></td>
</tr>
</table>
<!-- progress bar: end -->
</td>
<td class="progress-text">100%</td>
</tr>
</table>
<!-- progress bar paddings: end -->
<img src="img/spacer.gif" height="10" width="1" alt="" /><br />
</td>
</tr>
<tr class="table-color2">
<td width="50%" align="right"><inp2:m_phrase name="la_fld_PercentsCompleted"/>:</td>
<td id="progress_display[percents_completed]">0%</td>
</tr>
<tr class="table-color1">
<td align="right"><inp2:m_phrase name="la_fld_ElapsedTime"/>:</td>
<td id="progress_display[elapsed_time]">00:00</td>
</tr>
<tr class="table-color2">
<td align="right"><inp2:m_phrase name="la_fld_EstimatedTime"/>:</td>
<td id="progress_display[Estimated_time]">00:00</td>
</tr>
<tr class="table-color1">
<td align="center" colspan="2">
<input type="button" class="button" onclick="<inp2:m_param name="cancel_action"/>" value="<inp2:m_phrase name="la_Cancel"/>" />
</td>
</tr>
</table>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="edit_navigation" toolbar="a_toolbar">
<inp2:m_if check="{$prefix}_IsTopmostPrefix">
<inp2:m_if check="{$prefix}_IsSingle">
<inp2:m_param name="toolbar"/>.HideButton('prev');
<inp2:m_param name="toolbar"/>.HideButton('next');
<inp2:m_else/>
<inp2:m_if check="{$prefix}_IsLast">
<inp2:m_param name="toolbar"/>.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="{$prefix}_IsFirst">
<inp2:m_param name="toolbar"/>.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</inp2:m_if>
</inp2:m_DefineElement>
-<inp2:m_DefineElement name="edit_tabs">
- <inp2:m_if check="{$prefix}_HasEditTabs" preset_name="Default">
+<inp2:m_DefineElement name="edit_tabs" preset_name="Default">
+ <inp2:m_if check="{$prefix}_HasEditTabs" preset_name="$preset_name">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="right" width="100%">
<table cellpadding="0" cellspacing="0" border="0" height="23">
<tr>
<inp2:m_DefineElement name="edit_tab">
<inp2:m_RenderElement name="tab" title="$title" t="$template" main_prefix="$PrefixSpecial"/>
</inp2:m_DefineElement>
- <inp2:{$prefix}_PrintEditTabs render_as="edit_tab" preset_name="Default"/>
+ <inp2:{$prefix}_PrintEditTabs render_as="edit_tab" preset_name="$preset_name"/>
</tr>
</table>
</td>
</tr>
</table>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="ml_selector" prefix="">
</inp2:m_DefineElement>
Property changes on: branches/RC/core/admin_templates/incs/form_blocks.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.20.2.11
\ No newline at end of property
+1.20.2.12
\ No newline at end of property

Event Timeline