Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Mon, Jan 6, 3:28 AM

in-portal

Index: branches/5.2.x/admin/system_presets/simple/users_u.php
===================================================================
--- branches/5.2.x/admin/system_presets/simple/users_u.php (revision 15163)
+++ branches/5.2.x/admin/system_presets/simple/users_u.php (revision 15164)
@@ -1,121 +1,121 @@
<?php
defined('FULL_PATH') or die('restricted access!');
// section removal
$remove_sections = Array (
// 'in-portal:user_list',
// 'in-portal:admins',
// 'in-portal:user_setting_folder',
// 'in-portal:configure_users',
'in-portal:user_email',
'in-portal:user_custom'
);
// sections shown with debug on
$debug_only_sections = Array (
// 'in-portal:user_list',
// 'in-portal:admins',
'in-portal:user_setting_folder',
'in-portal:configure_users',
// 'in-portal:user_email',
// 'in-portal:user_custom'
);
// toolbar buttons
$remove_buttons = Array (
// list of users; section: Users Management -> Users
'users_list' => Array (/*'new_item', 'edit', 'delete', 'approve', 'decline',*/ 'frontend_mail', /*'e-mail',*/ 'export', /*'view', 'dbl-click'*/),
// "General" tab during user adding/editing
// 'users_edit' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
// "Images" tab during user adding/editing
// 'user_edit_images' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'setprimary', 'view', 'dbl-click'),
// "Groups" tab during user/admin adding/editing
// 'user_edit_groups' => Array ('select', 'cancel', 'prev', 'next', 'selec_user', 'edit', 'delete', 'primary_group', 'view', 'dbl-click'),
// "Items" tab during user/admin adding/editing
// 'user_edit_items' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
// "Custom" tab during user/admin adding/editing
// 'user_edit_custom' => Array ('select', 'cancel', 'prev', 'next'),
// list of administrators; section: Users Managements -> Administrators
- 'admin_list' => Array (/*'new_item', 'edit', 'delete', */'clone', 'refresh',/* 'view', 'dbl-click'*/),
+ 'admin_list' => Array (/*'new_item', 'edit', 'delete', 'approve', 'decline',*/'clone', 'refresh',/* 'view', 'dbl-click'*/),
// "General" tab during admin adding/editing AND separate password change form for non-"root" users (in top frame)
'admins_edit' => Array (/*'select', 'cancel', */'reset_edit', /*'prev', 'next'*/),
// 'regular_users_list' => Array (), // not used
// separate password change form for "root" user (in top frame)
// 'root_edit' => Array ('select', 'cancel'),
// user/admin group membership editing (used on "Groups" tab during user/admin adding/editing)
// 'user_edit_group' => Array ('select', 'cancel'),
// user image adding/editing (used on "Images" tab during user adding/editing)
// 'user_image_edit' => Array ('select', 'cancel', 'prev', 'next'),
// user selector
// 'user_select' => Array ('select', 'cancel', 'view', 'dbl-click'),
// user selector when adding/editing user group
// 'group_user_select' => Array ('select', 'cancel', 'view', 'dbl-click'),
);
// fields to hide
$hidden_fields = Array (
/* 'PortalUserId', 'Username', 'Password', 'FirstName','LastName', 'Company', 'Email', 'CreatedOn',
'Phone', 'Fax', 'Street', 'Street2', 'City', 'State' , 'Zip', 'Country', 'ResourceId', 'Status', 'EmailVerified',
'Modified', 'dob',*/ 'TimeZone', 'IPAddress', /*'IsBanned', 'PwResetConfirm', 'PwRequestTime',*/ 'FrontLanguage',
'AdminLanguage', 'IPRestrictions',
);
// virtual fields to hide
$virtual_hidden_fields = Array (
/*'SubscribeEmail', 'PrimaryGroup', 'RootPassword', 'FullName', 'UserGroup'*/
);
// fields to make required
$required_fields = Array (
/*'PortalUserId',*/ 'Username', /*'Password', 'FirstName', 'LastName', 'Company', */'Email', /*'CreatedOn',
'Phone', 'Fax', 'Street', 'Street2', 'City', 'State' , 'Zip', 'Country', 'ResourceId', 'Status', 'EmailVerified',
'Modified', 'dob', 'tz', 'IPAddress', 'IsBanned', 'PwResetConfirm', 'PwRequestTime', 'FrontLanguage',
'AdminLanguage', 'IPRestrictions',*/
);
// virtual fields to make required
$virtual_required_fields = Array (
/*'SubscribeEmail', 'PrimaryGroup', 'RootPassword', 'FullName', 'UserGroup'*/
);
// tabs during editing
$hide_edit_tabs = Array (
// tabs during user editing, when In-Portal module is enabled
'Default' => Array ('general', 'groups', 'images', 'items', 'custom'),
// tabs during user editing, when In-Portal module isn't enabled
'RegularUsers' => Array ('general', 'groups'),
// tabs during admin editing
'Admins' => Array ('general', 'groups'),
);
// hide columns in grids
$hide_columns = Array (
// currently not in user
// 'Default' => Array ('Username', 'LastName', 'FirstName', 'Email', 'PrimaryGroup', 'CreatedOn', 'Modified'),
// user selector
// 'UserSelector' => Array ('Username', 'LastName', 'FirstName', 'Email', 'PrimaryGroup', 'CreatedOn', 'Modified'),
// admins list; section: Users Management -> Administrators
// 'Admins' => Array ('PortalUserId', 'Username', 'FirstName', 'LastName', 'Email'),
// users list; section: Users Management -> Users
'RegularUsers' => Array (/*'PortalUserId', 'Username', 'FirstName', 'LastName', 'Email',*/ 'PrimaryGroup', 'CreatedOn', 'Modified', /* 'Status',*/ 'IPAddress', 'EmailVerified'),
);
Index: branches/5.2.x/core/units/users/users_config.php
===================================================================
--- branches/5.2.x/core/units/users/users_config.php (revision 15163)
+++ branches/5.2.x/core/units/users/users_config.php (revision 15164)
@@ -1,660 +1,660 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => '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' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'adm',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnStartup'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnAutoLoginUser',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'img',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
// Captcha processing
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'captcha',
'DoSpecial' => '*',
'DoEvent' => 'OnPrepareCaptcha',
),
/*Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnBeforeItemCreate'),
'DoPrefix' => 'captcha',
'DoSpecial' => '*',
'DoEvent' => 'OnValidateCode',
),*/
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'ScheduledTasks' => Array(
'membership_expiration' => Array('EventName' => 'OnCheckExpiredMembership', 'RunInterval' => 1800),
'delete_expired_sessions' => Array('EventName' => 'OnDeleteExpiredSessions', 'RunInterval' => 43200),
),
'IDField' => 'PortalUserId',
'StatusField' => Array('Status'),
'TitleField' => 'Username',
'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' => '#url#',
'url' => Array('t' => 'users/users_list', 'pass' => 'm,u', 'u_event' => 'OnSetFilterPattern', 'u_filters' => 'show_active=0,show_pending=1,show_disabled=0'),
'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!'),
),
'users_list' => Array (
'prefixes' => Array ('u_List'), 'format' => "!la_title_Users!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'approve', 'decline', 'frontend_mail', 'e-mail', 'export', 'view', 'dbl-click'),
),
'users_edit' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
'user_edit_images' => Array (
'prefixes' => Array ('u', 'u-img_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Images!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'setprimary', 'move_up', 'move_down', 'view', 'dbl-click'),
),
'user_edit_groups' => Array (
'prefixes' => Array ('u', 'u-ug_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Groups!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'select_user', 'edit', 'delete', 'setprimary', 'view', 'dbl-click'),
),
'user_edit_items' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Items!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
),
'user_edit_custom' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Custom!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'admin_list' => Array (
'prefixes' => Array ('u.admins_List'), 'format' => "!la_title_Administrators!",
- 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'clone', 'refresh', 'view', 'dbl-click'),
+ 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'clone', 'refresh', 'view', 'dbl-click'),
),
'admins_edit' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
'regular_users_list' => Array (
'prefixes' => Array ('u.regular_List'), 'format' => "!la_title_Users!",
'toolbar_buttons' => Array (),
),
'root_edit' => Array (
'prefixes' => Array ('u'), 'format' => "!la_title_Editing_User! 'root'",
'toolbar_buttons' => Array ('select', 'cancel'),
),
'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#'",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'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#'",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'user_select' => Array (
'prefixes' => Array ('u_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
'toolbar_buttons' => Array ('select', 'cancel', 'dbl-click'),
),
'group_user_select' => Array (
'prefixes' => Array ('u.group_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
'toolbar_buttons' => Array ('select', 'cancel', 'view', 'dbl-click'),
),
'tree_users' => Array('format' => '!la_section_overview!'),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'users/users_edit', 'priority' => 1),
'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/users_edit_groups', 'priority' => 2),
'images' => Array ('title' => 'la_tab_Images', 't' => 'users/user_edit_images', 'priority' => 3),
'items' => Array ('title' => 'la_tab_Items', 't' => 'users/user_edit_items', 'priority' => 4),
'custom' => Array ('title' => 'la_tab_Custom', 't' => 'users/users_edit_custom', 'priority' => 5),
),
'Admins' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'users/admins_edit', 'priority' => 1),
'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/admins_edit_groups', 'priority' => 2),
),
),
'PermSection' => Array('main' => 'in-portal:user_list', 'custom' => 'in-portal:user_custom'),
'Sections' => Array (
'in-portal:user_list' => Array (
'parent' => 'in-portal:users',
'icon' => 'users',
'label' => 'la_title_Users', // 'la_tab_User_List',
'url' => Array ('t' => 'users/users_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/),
'priority' => 1,
'type' => stTREE,
),
'in-portal:admins' => Array (
'parent' => 'in-portal:users',
'icon' => 'administrators',
'label' => 'la_title_Administrators',
'url' => Array ('t' => 'users/admins_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'perm_prefix' => 'u',
'priority' => 2,
'type' => stTREE,
),
// user settings
'in-portal:user_setting_folder' => Array (
'parent' => 'in-portal:system',
'icon' => 'conf_users',
'label' => 'la_title_Users',
'use_parent_header' => 1,
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 2,
'container' => true,
'type' => stTREE,
),
'in-portal:configure_users' => Array (
'parent' => 'in-portal:user_setting_folder',
'icon' => 'conf_users_general',
'label' => 'la_tab_ConfigSettings',
'url' => Array ('t' => 'config/config_universal', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
'in-portal:user_custom' => Array (
'parent' => 'in-portal:user_setting_folder',
'icon' => 'conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 6, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 2,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'Users',
'CustomDataTableName' => TABLE_PREFIX . 'UserCustomData',
'ListSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
'online' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'UserSessions s ON s.PortalUserId = %1$s.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
),
'ItemSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'UserGroups g ON %1$s.PrimaryGroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
LEFT JOIN '.TABLE_PREFIX.'%3$sCatalogImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Username' => 'asc'),
)
),
'SubItems' => Array('addr', 'u-cdata', 'u-ug', 'u-img', 'fav', 'user-profile'),
/**
* Required for depricated public profile templates to work
*/
'UserProfileMapping' => Array (
'pp_firstname' => 'FirstName',
'pp_lastname' => 'LastName',
'pp_dob' => 'dob',
'pp_email' => 'Email',
'pp_phone' => 'Phone',
'pp_street' => 'Street',
'pp_city' => 'City',
'pp_state' => 'State',
'pp_zip' => 'Zip',
'pp_country' => 'Country',
),
'CalculatedFields' => Array(
'' => Array(
'PrimaryGroup' => 'g.Name',
'FullName' => 'CONCAT(FirstName, " ", LastName)',
'AltName' => 'img.AltName',
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
),
),
'Forms' => Array (
'default' => Array (
'Fields' => Array (
'PortalUserId' => Array ('default' => 0),
'Username' => Array (
'max_len' => 255,
'formatter' => 'kFormatter', 'regexp' => '/^[A-Z\d_\-\.]+$/i',
'error_msgs' => Array(
'unique' => '!lu_user_already_exist!', 'invalid_format' => '!la_error_InvalidLogin!', 'banned' => '!la_error_UserBanned!'
),
'unique' => Array (), 'default' => '',
),
'Password' => Array (
'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword',
'default' => 'd41d8cd98f00b204e9800998ecf8427e'
),
'FirstName' => Array ('default' => ''),
'LastName' => Array ('default' => ''),
'Company' => Array ('default' => ''),
'Email' => Array (
'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'sample_value' => 'email@domain.com', 'error_msgs' => Array (
'invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'
),
'unique' => Array (), 'required' => 1, 'default' => ''
),
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'Phone' => Array ('default' => ''),
'Fax' => Array ('default' => ''),
'Street' => Array ('default' => ''),
'Street2' => Array ('error_field' => 'Street', 'default' => ''),
'City' => Array ('default' => ''),
'State' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (),
'default' => '',
),
'Zip' => Array ('default' => ''),
'Country' => Array (
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
FROM ' . TABLE_PREFIX . 'CountryStates
WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
ORDER BY Name',
'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
'default' => '',
),
'ResourceId' => Array ('default' => 0),
'Status' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'use_phrases' => 1,
'default' => 1
),
'Modified' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
'dob' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
'TimeZone' => Array ('default' => ''),
'IPAddress' => Array ('default' => ''),
'IsBanned' => Array ('default' => 0),
'PwResetConfirm' => Array ('default' => ''),
'PwRequestTime' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
'FrontLanguage' => Array (
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName',
'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL
),
'AdminLanguage' => Array (
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName',
'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL
),
'DisplayToPublic' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (
'FirstName' => 'lu_fld_FirstName', 'LastName' => 'lu_fld_LastName', 'dob' => 'lu_fld_BirthDate',
'Email' => 'lu_fld_Email', 'Phone' => 'lu_fld_Phone', 'Street' => 'lu_fld_AddressLine1',
'Street2' => 'lu_fld_AddressLine2', 'City' => 'lu_fld_City', 'State' => 'lu_fld_State',
'Zip' => 'lu_fld_Zip', 'Country' => 'lu_fld_Country',
), 'use_phrases' => 1, 'multiple' => 1,
'default' => NULL
),
'UserType' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_UserTypeUser', 1 => 'la_opt_UserTypeAdmin'), 'use_phrases' => 1,
'default' => 0
),
'PrimaryGroupId' => Array (
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'UserGroups WHERE Enabled = 1 AND FrontRegistration = 1',
'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL
),
'OldStyleLogin' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'default' => 0
),
'IPRestrictions' => Array ('default' => NULL),
'EmailVerified' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'default' => 0
),
'PrevEmails' => Array ('default' => NULL),
),
'VirtualFields' => Array (
'PrimaryGroup' => Array ('default' => ''),
'RootPassword' => Array (
'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5',
'verify_field' => 'VerifyRootPassword', 'default' => 'd41d8cd98f00b204e9800998ecf8427e'
),
'EmailPassword' => Array ('default' => ''),
'FullName' => Array ('default' => ''),
'AltName' => Array ('default' => ''),
'SameImages' => Array ('default' => ''),
'LocalThumb' => Array ('default' => ''),
'ThumbPath' => Array ('default' => ''),
'ThumbUrl' => Array ('default' => ''),
'LocalImage' => Array ('default' => ''),
'LocalPath' => Array ('default' => ''),
'FullUrl' => Array ('default' => ''),
'SubscribeToMailing' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'lu_Yes', 0 => 'lu_No'), 'use_phrases' => 1,
'default' => 0,
),
),
),
'registration' => Array (
// Front-End user registration form
/*'Fields' => Array (
'FirstName' => Array ('required' => 1),
),*/
),
'recommend' => Array (
'VirtualFields' => Array (
'RecommendEmail' => Array (
'type' => 'string',
'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!', 'send_error' => '!lu_email_send_error!'),
'sample_value' => 'email@domain.com',
'required' => 1, 'default' => ''
),
),
),
'subscription' => Array (
'VirtualFields' => Array (
'SubscriberEmail' => Array (
'type' => 'string',
'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!'),
'sample_value' => 'email@domain.com',
'required' => 1, 'default' => ''
),
),
),
'forgot_password' => Array (
'VirtualFields' => Array (
'ForgotLogin' => Array (
'type' => 'string',
'error_msgs' => Array (
'required' => '!lu_ferror_forgotpw_nodata!',
'unknown_username' => '!lu_ferror_unknown_username!',
'reset_denied' => '!lu_ferror_reset_denied!',
),
'default' => ''
),
'ForgotEmail' => Array (
'type' => 'string',
'error_msgs' => Array (
'required' => '!lu_ferror_forgotpw_nodata!',
'unknown_email' => '!lu_ferror_unknown_email!',
'reset_denied' => '!lu_ferror_reset_denied!',
),
'default' => ''
),
),
),
'login' => Array (
'Fields' => Array (
// make sure all fields, required by default are not required on this form
'Email' => Array ('required' => 0),
),
'VirtualFields' => Array (
'UserLogin' => Array (
'type' => 'string',
'error_msgs' => Array (
'no_permission' => '!la_no_permissions!', 'invalid_password' => '!la_invalid_password!'
),
'default' => ''
),
'UserPassword' => Array ('type' => 'string', 'default' => ''),
'UserRememberLogin' => Array ('type' => 'int', 'default' => 0),
),
),
),
'Fields' => Array (
'PortalUserId' => Array ('type' => 'int', 'not_null' => 1),
'Username' => Array ('type' => 'string', 'not_null' => 1),
'Password' => Array ('type' => 'string', 'skip_empty' => 1),
'FirstName' => Array ('type' => 'string', 'not_null' => 1),
'LastName' => Array ('type' => 'string', 'not_null' => 1),
'Company' => Array ('type' => 'string','not_null' => 1),
'Email' => Array ('type' => 'string', 'not_null' => 1),
'CreatedOn' => Array ('type' => 'int'),
'Phone' => Array ('type' => 'string', 'not_null' => 1),
'Fax' => Array ('type' => 'string', 'not_null' => 1),
'Street' => Array ('type' => 'string', 'not_null' => 1),
'Street2' => Array ('type' => 'string', 'not_null' => 1),
'City' => Array ('type' => 'string', 'not_null' => 1),
'State' => Array ('type' => 'string', 'not_null' => 1),
'Zip' => Array ('type' => 'string', 'not_null' => 1),
'Country' => Array ('type' => 'string', 'not_null' => 1),
'ResourceId' => Array ('type' => 'int', 'not_null' => 1),
'Status' => Array ('type' => 'int', 'not_null' => 1),
'Modified' => Array ('type' => 'int'),
'dob' => Array ('type' => 'int'),
'TimeZone' => Array ('type' => 'string', 'not_null' => 1),
'IPAddress' => Array ('type' => 'string', 'not_null' => 1),
'IsBanned' => Array ('type' => 'int', 'not_null' => 1),
'PwResetConfirm' => Array ('type' => 'string', 'not_null' => 1),
'PwRequestTime' => Array ('type' => 'int'),
'FrontLanguage' => Array ('type' => 'int'),
'AdminLanguage' => Array ('type' => 'int'),
'DisplayToPublic' => Array ('type' => 'string'),
'UserType' => Array ('type' => 'int', 'not_null' => 1),
'PrimaryGroupId' => Array ('type' => 'int'),
'OldStyleLogin' => Array ('type' => 'int', 'not_null' => 1),
'IPRestrictions' => Array ('type' => 'string'),
'EmailVerified' => Array ('type' => 'int', 'not_null' => 1),
'PrevEmails' => Array ('type' => 'string'),
),
'VirtualFields' => Array (
'PrimaryGroup' => Array ('type' => 'string'),
'RootPassword' => Array ('type' => 'string', 'skip_empty' => 1),
'EmailPassword' => Array ('type' => 'string'),
'FullName' => Array ('type' => 'string'),
'AltName' => Array ('type' => 'string'),
'SameImages' => Array ('type' => 'string'),
'LocalThumb' => Array ('type' => 'string'),
'ThumbPath' => Array ('type' => 'string'),
'ThumbUrl' => Array ('type' => 'string'),
'LocalImage' => Array ('type' => 'string'),
'LocalPath' => Array ('type' => 'string'),
'FullUrl' => Array ('type' => 'string'),
'SubscribeToMailing' => Array ('type' => 'int'),
),
'Grids' => Array(
// not in use
'Default' => Array(
'Icons' => Array(
0 => 'icon16_user_disabled.png',
1 => 'icon16_user.png',
2 => 'icon16_user_pending.png'
),
'Fields' => Array(
'Username' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
'LastName' => Array ('filter_block' => 'grid_like_filter'),
'FirstName' => Array ('filter_block' => 'grid_like_filter'),
'Email' => Array ('filter_block' => 'grid_like_filter'),
'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter'),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'),
'Modified' => Array('filter_block' => 'grid_date_range_filter'),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
// used
'UserSelector' => Array(
'Icons' => Array(
0 => 'icon16_user_disabled.png',
1 => 'icon16_user.png',
2 => 'icon16_user_pending.png'
),
'Selector' => 'radio',
'Fields' => Array(
'Username' => Array ('data_block' => 'grid_login_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'Modified' => Array('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
// used
'Admins' => Array (
'Icons' => Array(
0 => 'icon16_admin_disabled.png',
1 => 'icon16_admin.png',
2 => 'icon16_admin_disabled.png',
),
'Fields' => Array (
'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
// used
'RegularUsers' => Array (
'Icons' => Array(
0 => 'icon16_user_disabled.png',
1 => 'icon16_user.png',
2 => 'icon16_user_pending.png'
),
'Fields' => Array(
'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 140),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
'IPAddress' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100, 'hidden' => 1),
'EmailVerified' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/users/admins_list.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/users/admins_list.tpl (revision 15163)
+++ branches/5.2.x/core/admin_templates/users/admins_list.tpl (revision 15164)
@@ -1,69 +1,81 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:admins" pagination="1" prefix="u.admins" title_preset="admin_list" grid="Admins"/>
<!-- 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()
{
Application.SetVar('remove_specials[u.admins]', 1);
std_edit_item('u.admins', 'users/admins_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
Application.SetVar('user_type', 1);
Application.SetVar('remove_specials[u.admins]', 1);
std_precreate_item('u.admins', 'users/admins_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() {
Application.SetVar('remove_specials[u.admins]', 1);
std_delete_items('u.admins')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ set_hidden_field('remove_specials[u.admins]', 1);
+ submit_event('u.admins', 'OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ set_hidden_field('remove_specials[u.admins]', 1);
+ submit_event('u.admins', 'OnMassDecline');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_CloneUser" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_CloneUser" escape="1"/>',
function() {
Application.SetVar('remove_specials[u.admins]', 1);
submit_event('u.admins', 'OnMassCloneUsers');
} ) );
- a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_ResetSettings" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_ResetSettings" escape="1"/>',
function() {
Application.SetVar('remove_specials[u.admins]', 1);
submit_event('u.admins', 'OnMassResetSettings');
} ) );
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();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="u.admins" grid="Admins"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="u.admins" IdField="PortalUserId" grid="Admins"/>
<script type="text/javascript">
- Grids['u.admins'].SetDependantToolbarButtons( new Array('edit','delete','clone') );
+ Grids['u.admins'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/users/admins_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/users/admins_edit.tpl (revision 15163)
+++ branches/5.2.x/core/admin_templates/users/admins_edit.tpl (revision 15164)
@@ -1,100 +1,101 @@
<inp2:adm_SetPopupSize width="700" height="440"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:admins" prefix="u" title_preset="admins_edit" tab_preset="Admins"/>
<!-- 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() {
cancel_edit('u','OnCancelEdit','<inp2:u_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('u', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" 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.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"/>
<inp2:u_ErrorWarning name="form_error_warning"/>
<inp2:m_include template="users/user_blocks"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="u" field="UserType" db="db"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="u" field="PrimaryGroupId" db="db"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" prefix="u" fields="PortalUserId,Username,Password,FirstName,LastName,Email" 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="Username" title="la_fld_Username" autocomplete="off"/>
<inp2:m_RenderElement name="password_fields" />
<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="Email" title="la_fld_Email"/>
- <inp2:m_RenderElement name="subsection" prefix="u" fields="AdminLanguage,IPAddress,IPRestrictions,TimeZone" title="la_section_Properties"/>
+ <inp2:m_RenderElement name="subsection" prefix="u" fields="Status,AdminLanguage,IPAddress,IPRestrictions,TimeZone" title="la_section_Properties"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="u" field="Status"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="u" field="AdminLanguage" has_empty="1"/>
<inp2:m_if check="u_Field" name="IPAddress">
<inp2:m_RenderElement name="inp_label" prefix="u" field="IPAddress"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="u" field="IPRestrictions" allow_html="0" hint_label="hint:la_fld_DomainIPRange" control_options="{max_height: 100}"/>
<inp2:m_RenderElement name="inp_edit_timezone" prefix="u" field="TimeZone"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script type="text/javascript">
$(document).ready(
function() {
<inp2:m_RenderElement name="password_fields_js" />
}
);
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Event Timeline