Index: branches/5.1.x/core/units/email_events/email_events_config.php =================================================================== diff -u -N -r13159 -r13635 --- branches/5.1.x/core/units/email_events/email_events_config.php (.../email_events_config.php) (revision 13159) +++ branches/5.1.x/core/units/email_events/email_events_config.php (.../email_events_config.php) (revision 13635) @@ -1,6 +1,6 @@ Array ( 'default' => Array ( 'new_status_labels' => Array ('emailevents' => '!la_title_Adding_E-mail!'), - 'edit_status_labels' => Array ('emailevents' => '!la_title_Editing_E-mail!'), - 'edit_status_labels' => Array ('emailevents' => '!la_title_EditingEmailEvent!'), + 'edit_status_labels' => Array ('emailevents' => '!la_title_EditingEmailEvent!' /*'!la_title_Editing_E-mail!'*/), + 'new_titlefield' => Array ('emailevents' => '!la_title_NewEmailEvent!'), ), - // for editing in Regional section - 'email_settings_list' => Array ('prefixes' => Array ('emailevents.module_List'), 'format' => '!la_title_EmailSettings!'), - - 'email_settings_edit' => Array ( - 'prefixes' => Array ('emailevents'), 'format' => "#emailevents_status# '#emailevents_titlefield#'", - 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), - ), - // for separate grid with email editing - 'email_messages_direct_list' => Array ( + 'email_message_list' => Array ( 'prefixes' => Array ('emailevents_List'), 'format' => "!la_title_EmailMessages!", - 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'), + 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'frontend_mail', 'view', 'dbl-click'), ), - 'email_messages_edit_direct' => Array ( + 'email_message_edit' => Array ( 'prefixes' => Array ('emailevents'), - 'format' => '#emailevents_status# - #emailevents_titlefield#', - 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit'), + 'format' => '#emailevents_status# - #emailevents_titlefield# - !la_section_General!', + 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), ), + 'email_message_edit_settings' => Array ( + 'prefixes' => Array ('emailevents'), + 'format' => '#emailevents_status# - #emailevents_titlefield# - !la_section_Settings!', + 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), + ), + // for mass mailing 'email_send_form' => Array ('prefixes' => Array (), 'format' => '!la_title_SendEmail!'), 'email_prepare' => Array ('prefixes' => Array (), 'format' => '!la_title_PreparingEmailsForSending!. !la_title_PleaseWait!'), 'email_send' => Array ('prefixes' => Array (), 'format' => '!la_title_SendingPreparedEmails!. !la_title_PleaseWait!'), 'email_send_complete' => Array ('prefixes' => Array (), 'format' => '!la_title_SendMailComplete!'), ), + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'languages/email_message_edit', 'priority' => 1), + 'settings' => Array ('title' => 'la_tab_Settings', 't' => 'languages/email_message_settings', 'priority' => 2), + ), + ), + 'PermSection' => Array ('main' => 'in-portal:configemail'), 'Sections' => Array ( @@ -97,22 +102,14 @@ 'TableName' => TABLE_PREFIX . 'Events', - 'CalculatedFields' => Array ( - '' => Array ( - 'FromUser' => 'u.Login', - ) - ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN ' . TABLE_PREFIX . 'PortalUser u ON %1$s.FromUserId = u.PortalUserId', + '' => ' SELECT %1$s.* %2$s FROM %1$s', ), 'ListSortings' => Array ( '' => Array ( 'ForcedSorting' => Array ('Enabled' => 'desc'), - 'Sorting' => Array ('Module' => 'asc', 'Description' => 'asc'), + 'Sorting' => Array ('Event' => 'asc'), ), 'module' => Array ( 'ForcedSorting' => Array ('Enabled' => 'desc'), @@ -126,6 +123,43 @@ 'Headers' => Array ('type' => 'string', 'default' => NULL), 'ReplacementTags' => Array ('type' => 'string', 'default' => NULL), + 'AllowChangingSender' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'CustomSender' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_DefaultAddress', 1 => 'la_opt_CustomSender'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'SenderName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'SenderAddressType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User'), 'use_phrases' => 1, + 'not_null' => 1, 'error_field' => 'SenderAddress', 'default' => 0 + ), + 'SenderAddress' => Array ( + 'type' => 'string', 'max_len' => 255, + 'error_msgs' => Array ( + 'invalid_email' => '!la_err_invalid_format!', + 'invalid_user' => '!la_error_UserNotFound!', + ), + 'not_null' => 1, 'default' => '' + ), + 'AllowChangingRecipient' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'CustomRecipient' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_DefaultAddress', 1 => 'la_opt_CustomRecipients'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'Recipients' => Array ('type' => 'string', 'default' => NULL), + 'Subject' => Array ( 'type' => 'string', 'formatter' => 'kMultiLanguage', 'db_type' => 'text', @@ -156,18 +190,14 @@ 'not_null' => 1, 'default' => 0 ), - 'FromUserId' => Array ( - 'type' => 'int', - 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', - 'default' => NULL - ), - 'Module' => Array ( 'type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), - 'not_null' => 1, 'required' => 1, 'default' => '' + 'not_null' => 1, 'required' => 1, 'default' => 'Core' ), + 'Description' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'Type' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1, @@ -176,7 +206,30 @@ ), 'VirtualFields' => Array ( - 'FromUser' => Array ('type' => 'string', 'default' => ''), + 'RecipientType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'To', 2 => 'Cc', 3 => 'Bcc'), + 'not_null' => 1, 'default' => 1 + ), + 'RecipientName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'RecipientAddressType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Email', 2 => 'la_opt_User', 3 => 'la_opt_Group'), 'use_phrases' => 1, + 'not_null' => 1, 'error_field' => 'RecipientAddress', 'default' => 0 + ), + 'RecipientAddress' => Array ( + 'type' => 'string', 'max_len' => 255, + 'error_msgs' => Array ( + 'invalid_email' => '!la_err_invalid_format!', + 'invalid_user' => '!la_error_UserNotFound!', + 'invalid_group' => '!la_error_GroupNotFound!', + ), + 'not_null' => 1, 'default' => '' + ), + + 'Tag' => Array ('type' => 'string', 'default' => ''), + 'Replacement' => Array ('type' => 'string', 'default' => ''), + 'ReplacementTagsXML' => Array ('type' => 'string', 'default' => ''), ), 'Grids' => Array ( @@ -212,24 +265,8 @@ 'Type' => Array ( 'title' => 'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 60, ), 'Enabled' => Array ( 'title' => 'la_col_Enabled', 'filter_block' => 'grid_options_filter', 'width' => 70, ), 'Module' => Array ( 'title' => 'la_col_Module', 'filter_block' => 'grid_options_filter', 'width' => 100, ), + 'FrontEndOnly' => Array ('title' => 'la_col_FrontEndOnly', 'filter_block' => 'grid_options_filter', 'width' => 120, 'hidden' => 1), ), ), - - // used on "E-Mail" section in each module - 'EmailSettings' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - ), - 'Fields' => Array ( - 'EventId' => Array ('title' => 'la_col_Id', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Description' => Array ('title' => 'la_col_EventDescription', 'width' => 250, ), - 'FromUser' => Array ('title' => 'la_col_FromToUser', 'data_block' => 'from_user_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'Type' => Array ('title' => 'la_col_RecipientType', 'filter_block' => 'grid_options_filter', 'width' => 120, ), - 'FrontEndOnly' => Array ('title' => 'la_col_FrontEndOnly', 'filter_block' => 'grid_options_filter', 'width' => 120, ), - 'Enabled' => Array ('title' => 'la_col_Enabled', 'filter_block' => 'grid_options_filter', 'width' => 80, ), - ), - ), ), ); \ No newline at end of file