Attached Files |
email_event_recipient_core.patch [^] (141,421 bytes) 2010-05-18 08:07
[Show Content]
Index: admin/system_presets/simple/email_events_emailevents.php
===================================================================
--- admin/system_presets/simple/email_events_emailevents.php (revision 13557)
+++ admin/system_presets/simple/email_events_emailevents.php (working copy)
@@ -14,45 +14,51 @@
// toolbar buttons
$remove_buttons = Array (
-// list of all email templates (direct list)
-// 'email_messages_direct_list' => Array ('edit', 'view', 'dbl-click'),
+// list of all email templates
+// 'email_message_list' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'frontend_mail', 'view', 'dbl-click'),
-// edit email body direct
-// 'email_messages_edit_direct' => Array ('select', 'cancel', 'reset_edit'),
+// edit email edit - general tab
+// 'email_message_edit' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+
+// edit email edit - settings tab
+// 'email_message_edit_settings' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
);
// fields to hide
$hidden_fields = Array (
- /*'EventId', 'Event',*/ 'Headers', /*'ReplacementTags', 'Subject', 'Body',*/
- 'MessageType', 'Enabled', 'FrontEndOnly', 'FromUserId', /*'Module',
- 'Description', 'Type',*/
+ /*'EventId', 'Event', 'ReplacementTags', 'AllowChangingSender', 'CustomSender',
+ 'SenderName', 'SenderAddressType', 'SenderAddress', 'AllowChangingRecipient',
+ 'CustomRecipient', 'Recipients', 'Subject', 'Body', 'Headers', 'MessageType',
+ 'Enabled', 'FrontEndOnly', 'Module', 'Description', 'Type'*/
);
// virtual fields to hide
$virtual_hidden_fields = Array (
-
+ /*'RecipientType', 'RecipientName', 'RecipientAddressType',
+ 'RecipientAddress', 'Tag', 'Replacement', 'ReplacementTagsXML',*/
);
// fields to make required
$required_fields = Array (
- 'EventId', 'Event', /*'Headers', 'ReplacementTags',*/ 'Subject', 'Body',
- 'MessageType', /*'Enabled', 'FrontEndOnly', 'FromUserId',*/ 'Module',
- /*'Description',*/ 'Type',
+ /*'EventId',*/ 'Event', /*'ReplacementTags', 'AllowChangingSender', 'CustomSender',
+ 'SenderName', 'SenderAddressType', 'SenderAddress', 'AllowChangingRecipient',
+ 'CustomRecipient', 'Recipients',*/ 'Subject', 'Body', /*'Headers',*/ 'MessageType',
+ /*'Enabled', 'FrontEndOnly',*/ 'Module', /*'Description',*/ 'Type'
);
// virtual fields to make required
$virtual_required_fields = Array (
-
+ /*'RecipientType', 'RecipientName', 'RecipientAddressType',
+ 'RecipientAddress', 'Tag', 'Replacement', 'ReplacementTagsXML',*/
);
// tabs during editing
$hide_edit_tabs = Array (
-
+ 'Default' => Array (/*'general',*/ 'settings'),
);
// hide columns in grids
$hide_columns = Array (
-// currently not in user
-// 'Default' => Array ('Subject', 'Description', 'Type', ),
-// 'Emails' => Array ('EventId', 'Subject', 'Description', 'Type', ),
+// 'Default' => Array ('EventId', 'Description', 'Event', 'Module', 'Type', 'Enabled'),
+// 'Emails' => Array ('EventId', 'Event', 'Subject', 'Description', 'Type', 'Enabled', 'Module', 'FrontEndOnly'),
);
\ No newline at end of file
Index: admin/system_presets/simple/email_messages_emailmessages.php
===================================================================
--- admin/system_presets/simple/email_messages_emailmessages.php (revision 13557)
+++ admin/system_presets/simple/email_messages_emailmessages.php (working copy)
@@ -1,56 +1,3 @@
<?php
- defined('FULL_PATH') or die('restricted access!');
-
- // section removal
- $remove_sections = Array (
-// 'in-portal:configemail',
- );
-
- // sections shown with debug on
- $debug_only_sections = Array (
- 'in-portal:configemail',
- );
-
- // toolbar buttons
- $remove_buttons = Array (
-// list of all email templates (direct list)
-// 'email_messages_direct_list' => Array ('edit', 'view', 'dbl-click'),
-
-// edit email body direct
-// 'email_messages_edit_direct' => Array ('select', 'cancel', 'reset_edit'),
- );
-
- // fields to hide
- $hidden_fields = Array (
- /*'EmailMessageId', 'Template',*/ 'MessageType', /*'LanguageId', 'EventId', 'Subject' */
- );
-
- // virtual fields to hide
- $virtual_hidden_fields = Array (
- 'Headers',/* 'Body', 'ReplacementTags', 'Description', 'Module', 'Type', 'MassSubject', 'MassAttachment',
- 'MassHtmlMessage', 'MassTextMessage', */
- );
-
- // fields to make required
- $required_fields = Array (
- /*'EmailMessageId', 'Template', 'MessageType', 'LanguageId', 'EventId', 'Subject' */
- );
-
- // virtual fields to make required
- $virtual_required_fields = Array (
- /* 'Headers', 'Body', 'ReplacementTags', 'Description', 'Module', 'Type', 'MassSubject', 'MassAttachment',
- 'MassHtmlMessage', 'MassTextMessage', */
- );
-
- // tabs during editing
- $hide_edit_tabs = Array (
-
- );
-
- // hide columns in grids
- $hide_columns = Array (
-// currently not in user
-// 'Default' => Array ('Subject', 'Description', 'Type', ),
-// 'Emails' => Array ('EventId', 'Subject', 'Description', 'Type', 'LanguageId', ),
- );
\ No newline at end of file
+ // TO REMOVE
\ No newline at end of file
Index: core/admin_templates/incs/style_template.css
===================================================================
--- core/admin_templates/incs/style_template.css (revision 13557)
+++ core/admin_templates/incs/style_template.css (working copy)
@@ -663,4 +663,21 @@
.tree tr td a.debug-only-item {
color: grey;
+}
+
+/* Ajax Dropdown */
+.suggest-box {
+ border: 1px solid #999;
+ background-color: #fff;
+}
+
+.suggest-item, .suggest-item-over {
+ padding: 1px 2px 0px 2px;
+ font-family: arial,verdana;
+ font-size: 12px;
+}
+
+.suggest-item-over {
+ background-color: #3366CC;
+ color: #fff;
}
\ No newline at end of file
Index: core/admin_templates/languages/email_message_edit.tpl
===================================================================
--- core/admin_templates/languages/email_message_edit.tpl (revision 13557)
+++ core/admin_templates/languages/email_message_edit.tpl (working copy)
@@ -1,7 +1,7 @@
<inp2:adm_SetPopupSize width="875" height="650"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_messages_edit_direct"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_message_edit" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
@@ -26,8 +26,22 @@
}
) );
+ <inp2:m_if check="emailevents_IsSingle" inverse="inverse">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ </inp2:m_if>
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_NextId/>');
+ }
+ ) );
+
a_toolbar.Render();
+ <inp2:m_RenderElement name="edit_navigation" prefix="emailevents"/>
</script>
</td>
@@ -38,26 +52,28 @@
<inp2:emailevents_SaveWarning name="grid_save_warning"/>
<inp2:emailevents_ErrorWarning name="form_error_warning"/>
-<inp2:m_RenderElement name="inp_edit_hidden" prefix="emailevents" field="EventId"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="EventId,Event,Subject,Enabled,FrontEndOnly,FromUserId,Module,Description,Type,MessageType,Headers" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="EventId,Description,Subject" title="!la_section_General!"/>
<inp2:m_RenderElement name="inp_id_label" prefix="emailevents" field="EventId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Event" title="la_fld_Event"/>
+
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Event" title="la_fld_Event"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="Event" title="la_fld_Event"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="Description" title="la_fld_Description"/>
<inp2:m_RenderElement name="inp_edit_box_ml" prefix="emailevents" field="Subject" format="no_default" title="la_fld_Subject"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Description" title="la_fld_Description" control_options="{max_height: 50}"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Headers" title="la_fld_ExtraHeaders" control_options="{max_height: 50}"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="Enabled" title="la_fld_Enabled"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="FrontEndOnly" title="la_fld_FrontEndOnly"/>
- <inp2:m_RenderElement name="inp_edit_user" prefix="emailevents" field="FromUserId" title="la_fld_FromToUser"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="Type" title="la_fld_Type"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="emailevents" field="Module" title="la_fld_Module" has_empty="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="MessageType" title="la_fld_MessageType"/>
<inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Body" title="!la_section_Message!"/>
- <inp2:m_RenderElement name="inp_edit_fck" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" rows="5" cols="60" control_options="{min_height: 200}"/>
- <!-- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" control_options="{min_height: 200}"/> -->
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" control_options="{min_height: 200}"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_fck" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" rows="5" cols="60" control_options="{min_height: 200}"/>
+ </inp2:m_if>
+
<inp2:m_RenderElement name="inp_edit_filler" control_options="{max_height: 8}"/>
</table>
</div>
Index: core/admin_templates/languages/email_message_list.tpl
===================================================================
--- core/admin_templates/languages/email_message_list.tpl (revision 13557)
+++ core/admin_templates/languages/email_message_list.tpl (working copy)
@@ -1,6 +1,6 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" pagination="1" prefix="emailevents" grid="Emails" title_preset="email_messages_direct_list" additional_blue_bar_render_as="grid_ml_selector"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" pagination="1" prefix="emailevents" grid="Emails" title_preset="email_message_list" additional_blue_bar_render_as="grid_ml_selector"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
@@ -14,30 +14,41 @@
a_toolbar = new ToolBar();
- a_toolbar.AddButton(
- new ToolBarButton(
- 'new_item',
- '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
- function() {
- std_precreate_item('emailevents', 'languages/email_message_edit');
- }
- )
- );
+ <inp2:m_if check="m_IsDebugMode">
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'new_item',
+ '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('emailevents', 'languages/email_message_edit');
+ }
+ )
+ );
+ </inp2:m_if>
- 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('emailevents');
- }
+ 'edit',
+ '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>',
+ edit
)
);
<inp2:m_if check="m_IsDebugMode">
- a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'delete',
+ '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('emailevents');
+ }
+ )
+ );
+ </inp2:m_if>
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ <inp2:m_if check="m_IsDebugMode">
a_toolbar.AddButton(
new ToolBarButton(
'approve',
@@ -59,12 +70,27 @@
);
</inp2:m_if>
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'frontend_mail',
+ '<inp2:m_phrase label="la_ToolTip_Email_FrontOnly" escape="1"/>',
+ function() {
+ submit_event('emailevents', 'OnFrontOnly');
+ }
+ )
+ );
+
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'view',
+ '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
+ function() {
show_viewmenu(a_toolbar,'view');
}
- ) );
+ )
+ );
a_toolbar.Render();
@@ -93,6 +119,6 @@
<inp2:m_RenderElement name="grid" PrefixSpecial="emailevents" IdField="EventId" grid="Emails" row_class_render_as="row_class"/>
<script type="text/javascript">
- Grids['emailevents'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline') );
+ Grids['emailevents'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline', 'frontend_mail') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: core/admin_templates/languages/email_message_settings.tpl
===================================================================
--- core/admin_templates/languages/email_message_settings.tpl (revision 0)
+++ core/admin_templates/languages/email_message_settings.tpl (revision 0)
@@ -0,0 +1,301 @@
+<inp2:adm_SetPopupSize width="875" height="650"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_message_edit_settings" 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('emailevents','<inp2:emailevents_SaveEvent/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ cancel_edit('emailevents','OnCancelEdit','<inp2:emailevents_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('emailevents', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ }
+ ) );
+
+ <inp2:m_if check="emailevents_IsSingle" inverse="inverse">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ </inp2:m_if>
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_NextId/>');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_RenderElement name="edit_navigation" prefix="emailevents"/>
+ </script>
+ </td>
+
+ <inp2:m_RenderElement name="ml_selector" prefix="emailevents"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:emailevents_SaveWarning name="grid_save_warning"/>
+<inp2:emailevents_ErrorWarning name="form_error_warning"/>
+
+<inp2:m_DefineElement name="inp_edit_combo_target" caption_render_as="default_field_caption_element" read_only="0" has_empty="" hint_label="">
+ <inp2:m_if check="{$prefix}_FieldVisible" field="$field">
+ <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" id="<inp2:$prefix_InputName field='$field'/>_row">
+ <inp2:m_RenderElement name="inp_edit_field_caption" caption_render_as="$caption_render_as" prefix="$prefix" field="$field" title="$title" hint_label="$hint_label"/>
+ <td class="control-cell">
+ <inp2:m_if check="m_Param" name="read_only">
+ <inp2:$prefix_Field name="{$field}Type"/>: "<inp2:$prefix_Field name="$field"/>"
+ <inp2:m_else/>
+ <select tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:{$prefix}_InputName field='{$field}Type'/>" id="<inp2:{$prefix}_InputName field='{$field}Type'/>">
+ <inp2:{$prefix}_PredefinedOptions field="{$field}Type" block="inp_option_phrase" selected="selected" has_empty="$has_empty"/>
+ </select>
+
+ <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'/>" style="width: 250px;"/>
+ </inp2:m_if>
+
+ <script type="text/javascript">
+ fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>Type'] = '<inp2:m_phrase label="{$title}Type" js_escape="1"/>'
+
+ new AJAXDropDown(
+ '<inp2:$prefix_InputName name="$field" js_escape="1"/>',
+ function(cur_value) {
+ var $type = $( jq('#<inp2:$prefix_InputName name="{$field}Type" js_escape="1"/>') ).val();
+
+ if ( !isNaN( parseInt($type) ) ) {
+ var $url = '<inp2:m_Link template="dummy" pass="m,$prefix" {$prefix}_event="OnSuggestAddress" value="#VALUE#" type="#TYPE#" no_amp="1"/>';
+
+ return $url.replace('#VALUE#', encodeURIComponent(cur_value)).replace('#TYPE#', encodeURIComponent($type));
+ }
+
+ return false;
+ }
+ );
+
+ $(document).ready(
+ function () {
+ $( jq('#<inp2:$prefix_InputName name="{$field}Type"/>') ).change(
+ function ($e) {
+ var $me = $(this);
+
+ if ($me.attr('disabled')) {
+ return ;
+ }
+
+ var $type_selected = !isNaN( parseInt( $me.val() ) );
+ $( jq('#<inp2:$prefix_InputName name="$field"/>') ).attr('disabled', $type_selected ? '' : 'disabled');
+ }
+ )
+ .change();
+ }
+ );
+ </script>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+ </tr>
+ </inp2:m_if>
+</inp2:m_DefineElement>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="AllowChangingSender,CustomSender,SenderAddress,SenderAddressType,SenderName" title="la_section_SenderInfo"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="AllowChangingSender" title="la_fld_AllowChangingSender"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingSender">
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="CustomSender" title="la_fld_CustomSender"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="SenderAddress" title="la_fld_SenderAddress" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="SenderName" title="la_fld_SenderName" style="width: 318px;"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="CustomSender" title="la_fld_CustomSender"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="SenderAddress" title="la_fld_SenderAddress" read_only="1"/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="SenderName" title="la_fld_SenderName"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="AllowChangingRecipient,CustomRecipient,RecipientType,RecipientAddress,RecipientAddressType,RecipientName,Recipients" title="la_section_RecipientsInfo"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="AllowChangingRecipient" title="la_fld_AllowChangingRecipient"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="CustomRecipient" title="la_fld_CustomRecipient"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="CustomRecipient" title="la_fld_CustomRecipient"/>
+ <inp2:emailevents_RemoveToRecipientType/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="RecipientType" title="la_fld_RecipientType"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="RecipientAddress" title="la_fld_RecipientAddress" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="RecipientName" title="la_fld_RecipientName" style="width: 318px;"/>
+ <inp2:m_RenderElement name="inp_edit_minput" prefix="emailevents" field="Recipients" title="la_fld_Recipients" format="auto" style="width: 400px; height: 150px;"/>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Tag,Replacement,ReplacementTagsXML" title="la_section_ReplacementTags"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Tag" title="la_fld_Tag"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Replacement" title="la_fld_Replacement"control_options="{height: 60}"/>
+ <inp2:m_RenderElement name="inp_edit_minput" prefix="emailevents" field="ReplacementTagsXML" title="la_fld_ReplacementTags" allow_move="0" format="#Tag# = #Replacement#" style="width: 600px; height: 100px;"/>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Enabled,Description,FrontEndOnly,Type,MessageType,Headers,Module" title="!la_section_General!"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="Enabled" title="la_fld_Enabled"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Description" title="la_fld_Description" control_options="{max_height: 50}"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="FrontEndOnly" title="la_fld_FrontEndOnly"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="Type" title="la_fld_Type"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="MessageType" title="la_fld_MessageType"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Headers" title="la_fld_ExtraHeaders" control_options="{max_height: 50}"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="emailevents" field="Module" title="la_fld_Module" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<script type="text/javascript">
+ <inp2:m_if check="emailevents_FieldVisible" field="Recipients">
+ // recipients
+ Recipients.formatLine = function($record_index) {
+ if (this.Records[$record_index]['RecipientName']) {
+ // name specified
+ if (this.Records[$record_index]['RecipientAddressType'] == 1) {
+ // email
+ this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#>';
+ }
+ else {
+ // other
+ this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#> - #RecipientAddressType#';
+ }
+ }
+ else {
+ // name not specified
+ this.ResultMask = '#RecipientType#: #RecipientAddress# - #RecipientAddressType#';
+ }
+
+ return MultiInputControl.prototype.formatLine.call(this, $record_index);
+ }
+
+ Recipients.compareRecords = function($record_a, $record_b) {
+ var $equals = true;
+ var $compare_fields = ['RecipientAddressType', 'RecipientAddress'];
+
+ for (var $i = 0; $i < $compare_fields.length; $i++) {
+ var $field_name = $compare_fields[$i];
+
+ if ($record_a[$field_name] !== $record_b[$field_name]) {
+ return false;
+ }
+ }
+
+ return $equals;
+ }
+
+ <inp2:m_ifnot check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ Recipients.isReadOnly = function($record_index) {
+ return this.Records[$record_index]['RecipientType'] == <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>;
+ }
+
+ <inp2:emailevents_RestoreRecipientType/>
+ Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientType" strip_nl="2"/>, default: <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>});
+ <inp2:m_else/>
+ Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientType" strip_nl="2"/>, default: <inp2:emailevents_FieldOption field="RecipientType" option="default"/>});
+ </inp2:m_ifnot>
+
+ Recipients.registerControl('RecipientAddressType', {type: 'select', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientAddressType" strip_nl="2"/>, default: <inp2:emailevents_FieldOption field="RecipientAddressType" option="default"/>});
+ Recipients.registerControl('RecipientAddress', {type: 'textbox', required: true, default: '<inp2:emailevents_FieldOption field="RecipientAddress" option="default" js_escape="1"/>'});
+ Recipients.registerControl('RecipientName', {type: 'textbox', required: false, default: '<inp2:emailevents_FieldOption field="RecipientName" option="default" js_escape="1"/>'});
+ Recipients.LoadValues();
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_FieldVisible" field="ReplacementTagsXML">
+ // replacement tags
+ ReplacementTagsXML.formatLine = function($record_index) {
+ var $ret = MultiInputControl.prototype.formatLine.call(this, $record_index, false);
+
+ if ($ret.length > 80) {
+ $ret = $ret.substring(0, 80) + ' ...';
+ }
+
+ return this.htmlspecialchars($ret);
+ }
+
+ ReplacementTagsXML.compareRecords = function($record_a, $record_b) {
+ return $record_a['Tag'] == $record_b['Tag'];
+ }
+
+ ReplacementTagsXML.registerControl('Tag', 'textbox', true);
+ ReplacementTagsXML.registerControl('Replacement', 'textbox', true);
+ ReplacementTagsXML.LoadValues();
+ </inp2:m_if>
+
+ // reflect custom sender & custom recipient radio button-dependent controls
+ var $field_mask = '<inp2:emailevents_InputName name="#FIELD_NAME#" js_escape="1"/>';
+
+ function reflectCustomSender() {
+ var $default_sender = get_control($field_mask, 'CustomSender', '0').checked;
+ var $type = get_control($field_mask, 'SenderAddressType');
+
+ $type.disabled = $default_sender;
+ get_control($field_mask, 'SenderAddress').disabled = $default_sender;
+ get_control($field_mask, 'SenderName').disabled = $default_sender;
+
+ $($type).change();
+ }
+
+ function reflectCustomRecipient() {
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ var $default_recipient = get_control($field_mask, 'CustomRecipient', '0').checked;
+ var $to_recipient = get_control($field_mask, 'RecipientType', <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>);
+ <inp2:m_else/>
+ var $default_recipient = <inp2:m_if check="emailevents_Field" name="CustomRecipient" db="db" equals_to="0">true<inp2:m_else/>false</inp2:m_if>;
+ </inp2:m_if>
+
+ if ($default_recipient) {
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ if ($to_recipient.checked) {
+ get_control($field_mask, 'RecipientType', <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>).checked = true;
+ }
+ </inp2:m_if>
+
+ Recipients.registerControl('RecipientType', {default: <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>}, true);
+ }
+ else {
+ Recipients.registerControl('RecipientType', {default: <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>}, true);
+ }
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ $to_recipient.disabled = $default_recipient;
+ </inp2:m_if>
+ }
+
+ reflectCustomSender();
+ reflectCustomRecipient();
+
+ $(document).ready(
+ function () {
+ $("input[name='" + jq($field_mask.replace('#FIELD_NAME#', 'CustomSender')) + "']").click(reflectCustomSender);
+ $("input[name='" + jq($field_mask.replace('#FIELD_NAME#', 'CustomRecipient')) + "']").click(reflectCustomRecipient);
+ }
+ );
+
+ // enable all disabled controls before submit
+ Application.setHook('emailevents:*',
+ function () {
+ $(':input:disabled').attr('disabled', '');
+ }
+ )
+</script>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: core/install/english.lang
===================================================================
--- core/install/english.lang (revision 13559)
+++ core/install/english.lang (working copy)
@@ -16,6 +16,7 @@
<PHRASE Label="la_AvailableItems" Module="Core" Type="1">QXZhaWxhYmxlIEl0ZW1z</PHRASE>
<PHRASE Label="la_Background" Module="Core" Type="1">QmFja2dyb3VuZA==</PHRASE>
<PHRASE Label="la_Borders" Module="Core" Type="1">Qm9yZGVycw==</PHRASE>
+ <PHRASE Label="la_btn_Add" Module="Core" Type="1">QWRk</PHRASE>
<PHRASE Label="la_btn_BrowseMode" Module="Core" Type="1">QnJvd3NlIE1vZGU=</PHRASE>
<PHRASE Label="la_btn_Cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
<PHRASE Label="la_btn_Change" Module="Core" Type="1">Q2hhbmdl</PHRASE>
@@ -86,7 +87,6 @@
<PHRASE Label="la_col_FilePath" Module="Core" Type="1">UGF0aA==</PHRASE>
<PHRASE Label="la_col_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
<PHRASE Label="la_col_FromEmail" Module="Core" Type="1">RnJvbSBFLW1haWw=</PHRASE>
- <PHRASE Label="la_col_FromToUser" Module="Core" Type="1">RnJvbSAvIFRvIFVzZXI=</PHRASE>
<PHRASE Label="la_col_FrontEndOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_col_FrontRegistration" Module="Core" Type="1">QWxsb3cgUmVnaXN0cmF0aW9u</PHRASE>
<PHRASE Label="la_col_GroupName" Module="Core" Type="1">R3JvdXAgTmFtZQ==</PHRASE>
@@ -307,6 +307,7 @@
<PHRASE Label="la_error_copy_subcategory" Module="Core" Type="1">RXJyb3IgY29weWluZyBzdWJzZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_error_CustomExists" Module="Core" Type="1">Q3VzdG9tIGZpZWxkIHdpdGggaWRlbnRpY2FsIG5hbWUgYWxyZWFkeSBleGlzdHM=</PHRASE>
<PHRASE Label="la_error_FileTooLarge" Module="Core" Type="1">RmlsZSBpcyB0b28gbGFyZ2U=</PHRASE>
+ <PHRASE Label="la_error_GroupNotFound" Module="Core" Type="1">Z3JvdXAgbm90IGZvdW5k</PHRASE>
<PHRASE Label="la_error_InvalidFileFormat" Module="Core" Type="1">SW52YWxpZCBGaWxlIEZvcm1hdA==</PHRASE>
<PHRASE Label="la_error_invalidoption" Module="Core" Type="1">aW52YWxpZCBvcHRpb24=</PHRASE>
<PHRASE Label="la_error_LoginFailed" Module="Core" Type="1">TG9naW4gRmFpbGVk</PHRASE>
@@ -353,6 +354,8 @@
<PHRASE Label="la_fld_AdminInterfaceLang" Module="Core" Type="1">QWRtaW4gUHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_fld_AdvancedCSS" Module="Core" Type="1">QWR2YW5jZWQgQ1NT</PHRASE>
<PHRASE Label="la_fld_AdvancedSearch" Module="Core" Type="1">QWR2YW5jZWQgU2VhcmNo</PHRASE>
+ <PHRASE Label="la_fld_AllowChangingRecipient" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgIlRvIiBSZWNpcGllbnQ=</PHRASE>
+ <PHRASE Label="la_fld_AllowChangingSender" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgU2VuZGVy</PHRASE>
<PHRASE Label="la_fld_AltValue" Module="Core" Type="1">QWx0IFZhbHVl</PHRASE>
<PHRASE Label="LA_FLD_ATTACHMENT" Module="Core" Type="1">QXR0YWNobWVudA==</PHRASE>
<PHRASE Label="la_fld_AutoCreateFileName" Module="Core" Type="1">QXV0byBDcmVhdGUgRmlsZSBOYW1l</PHRASE>
@@ -394,6 +397,8 @@
<PHRASE Label="la_fld_CSS" Module="Core" Type="1">Q1NTIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_Cursor" Module="Core" Type="1">Q3Vyc29y</PHRASE>
<PHRASE Label="la_fld_CustomDetailTemplate" Module="Core" Type="1">Q3VzdG9tIERldGFpbHMgVGVtcGxhdGU=</PHRASE>
+ <PHRASE Label="la_fld_CustomRecipient" Module="Core" Type="1">U2VuZCBFbWFpbCBUbw==</PHRASE>
+ <PHRASE Label="la_fld_CustomSender" Module="Core" Type="1">U2VuZCBFbWFpbCBGcm9t</PHRASE>
<PHRASE Label="la_fld_CustomTemplate" Module="Core" Type="1">DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KRGV0YWlscyBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_DateFormat" Module="Core" Type="1">RGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_DecimalPoint" Module="Core" Type="1">RGVjaW1hbCBQb2ludA==</PHRASE>
@@ -453,7 +458,6 @@
<PHRASE Label="la_fld_FormSubmittedTemplate" Module="Core" Type="1">T25saW5lIEZvcm0gU3VibWl0dGVkIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_FriendlyURL" Module="Core" Type="1">U2hvcnQgVVJM</PHRASE>
<PHRASE Label="la_fld_FromEmail" Module="Core" Type="1">RnJvbSBFbWFpbA==</PHRASE>
- <PHRASE Label="la_fld_FromToUser" Module="Core" Type="1">RnJvbSAvIFRvIFVzZXI=</PHRASE>
<PHRASE Label="la_fld_FrontEndOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_fld_FrontRegistration" Module="Core" Type="1">QWxsb3cgUmVnaXN0cmF0aW9uIG9uIEZyb250LWVuZA==</PHRASE>
<PHRASE Label="la_fld_GroupId" Module="Core" Type="1">SUQ=</PHRASE>
@@ -557,12 +561,18 @@
<PHRASE Label="la_fld_Priority" Module="Core" Type="1">T3JkZXI=</PHRASE>
<PHRASE Label="la_fld_Qty" Module="Core" Type="1">UXVhbnRpdHk=</PHRASE>
<PHRASE Label="la_fld_Rating" Module="Core" Type="1">UmF0aW5n</PHRASE>
+ <PHRASE Label="la_fld_RecipientAddress" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcw==</PHRASE>
+ <PHRASE Label="la_fld_RecipientAddressType" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcyBUeXBl</PHRASE>
+ <PHRASE Label="la_fld_RecipientName" Module="Core" Type="1">UmVjaXBpZW50J3MgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_fld_Recipients" Module="Core" Type="1">UmVjaXBpZW50cw==</PHRASE>
+ <PHRASE Label="la_fld_RecipientType" Module="Core" Type="1">UmVjaXBpZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_fld_RedirectOnIPMatch" Module="Core" Type="1">Rm9yY2UgUmVkaXJlY3QgKHdoZW4gdXNlcidzIElQIG1hdGNoZXMp</PHRASE>
<PHRASE Label="la_fld_ReferrerURL" Module="Core" Type="1">UmVmZXJyZXIgVVJM</PHRASE>
<PHRASE Label="la_fld_RelatedSearchKeyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
<PHRASE Label="la_fld_RelationshipType" Module="Core" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_fld_RemoteUrl" Module="Core" Type="1">UmVtb3RlIFVSTA==</PHRASE>
<PHRASE Label="la_fld_ReplaceDuplicates" Module="Core" Type="1">UmVwbGFjZSBEdXBsaWNhdGVz</PHRASE>
+ <PHRASE Label="la_fld_Replacement" Module="Core" Type="1">UmVwbGFjZW1lbnQ=</PHRASE>
<PHRASE Label="la_fld_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
<PHRASE Label="la_fld_RepliedOn" Module="Core" Type="1">UmVwbGllZCBPbg==</PHRASE>
<PHRASE Label="la_fld_ReplyBcc" Module="Core" Type="1">UmVwbHkgQmNj</PHRASE>
@@ -583,6 +593,8 @@
<PHRASE Label="la_fld_SelectorData" Module="Core" Type="1">U3R5bGU=</PHRASE>
<PHRASE Label="la_fld_SelectorId" Module="Core" Type="1">U2VsZWN0b3IgSUQ=</PHRASE>
<PHRASE Label="la_fld_SelectorName" Module="Core" Type="1">U2VsZWN0b3IgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_fld_SenderAddress" Module="Core" Type="1">U2VuZGVyJ3MgQWRkcmVzcw==</PHRASE>
+ <PHRASE Label="la_fld_SenderName" Module="Core" Type="1">U2VuZGVyJ3MgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SentOn" Module="Core" Type="1">U2VudCBPbg==</PHRASE>
<PHRASE Label="la_fld_SentStatus" Module="Core" Type="1">U2VudA==</PHRASE>
<PHRASE Label="la_fld_Server" Module="Core" Type="1">U2VydmVy</PHRASE>
@@ -603,6 +615,7 @@
<PHRASE Label="la_fld_SuggestedCorrection" Module="Core" Type="1">U3VnZ2VzdGVkIENvcnJlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_SymLinkCategoryId" Module="Core" Type="1">UG9pbnRzIHRvIFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_TableName" Module="Core" Type="1">VGFibGUgTmFtZSBpbiBEYXRhYmFzZSA=</PHRASE>
+ <PHRASE Label="la_fld_Tag" Module="Core" Type="1">VGFn</PHRASE>
<PHRASE Label="la_fld_TargetId" Module="Core" Type="1">SXRlbQ==</PHRASE>
<PHRASE Label="la_fld_TemplateFile" Module="Core" Type="1">VGVtcGxhdGUgRmlsZQ==</PHRASE>
<PHRASE Label="la_fld_TemplateType" Module="Core" Type="1">VGVtcGxhdGU=</PHRASE>
@@ -730,7 +743,10 @@
<PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_opt_CurrentDomain" Module="Core" Type="1">Q3VycmVudCBEb21haW4=</PHRASE>
+ <PHRASE Label="la_opt_CustomRecipients" Module="Core" Type="1">Q3VzdG9tICJUbyIgUmVjaXBpZW50KC1zKQ==</PHRASE>
+ <PHRASE Label="la_opt_CustomSender" Module="Core" Type="1">Q3VzdG9tIFNlbmRlcg==</PHRASE>
<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
+ <PHRASE Label="la_opt_DefaultAddress" Module="Core" Type="1">RGVmYXVsdCBXZWJzaXRlIGFkZHJlc3M=</PHRASE>
<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
<PHRASE Label="la_opt_Description" Module="Core" Type="1">RGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="la_opt_Disabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
@@ -744,6 +760,7 @@
<PHRASE Label="la_opt_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVXJs</PHRASE>
<PHRASE Label="la_opt_Failed" Module="Core" Type="1">RmFpbGVk</PHRASE>
<PHRASE Label="la_opt_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_opt_Group" Module="Core" Type="1">R3JvdXA=</PHRASE>
<PHRASE Label="la_opt_GuestsOnly" Module="Core" Type="1">R3Vlc3RzIE9ubHk=</PHRASE>
<PHRASE Label="la_opt_hour" Module="Core" Type="1">aG91cihzKQ==</PHRASE>
<PHRASE Label="la_opt_InheritFromParent" Module="Core" Type="1">SW5oZXJpdCBmcm9tIFBhcmVudA==</PHRASE>
@@ -960,7 +977,11 @@
<PHRASE Label="la_section_Page" Module="Core" Type="1">U2VjdGlvbiBQcm9wZXJ0aWVz</PHRASE>
<PHRASE Label="la_section_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
<PHRASE Label="la_section_QuickLinks" Module="Core" Type="1">UXVpY2sgTGlua3M=</PHRASE>
+ <PHRASE Label="la_section_RecipientsInfo" Module="Core" Type="1">UmVjaXBpZW50cyBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_section_Relation" Module="Core" Type="1">UmVsYXRpb24=</PHRASE>
+ <PHRASE Label="la_section_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
+ <PHRASE Label="la_section_SenderInfo" Module="Core" Type="1">U2VuZGVyIEluZm9ybWF0aW9u</PHRASE>
+ <PHRASE Label="la_section_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_section_SettingsAdmin" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsCSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydCBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsMailling" Module="Core" Type="1">TWFpbGluZyBTZXR0aW5ncw==</PHRASE>
@@ -1054,6 +1075,7 @@
<PHRASE Label="la_Tab_Service" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
<PHRASE Label="la_tab_SessionLog" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
<PHRASE Label="la_tab_SessionLogs" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
+ <PHRASE Label="la_tab_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_tab_ShowAll" Module="Core" Type="1">U2hvdyBBbGw=</PHRASE>
<PHRASE Label="la_tab_ShowStructure" Module="Core" Type="1">U2hvdyBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_tab_Site_Structure" Module="Core" Type="1">V2Vic2l0ZSAmIENvbnRlbnQ=</PHRASE>
@@ -1237,6 +1259,7 @@
<PHRASE Label="la_title_Messages" Module="Core" Type="1">TWVzc2FnZXM=</PHRASE>
<PHRASE Label="la_title_Module_Status" Module="Core" Type="1">TW9kdWxlcw==</PHRASE>
<PHRASE Label="la_title_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</PHRASE>
+ <PHRASE Label="la_title_NewEmailEvent" Module="Core" Type="1">TmV3IEVtYWlsIEV2ZW50</PHRASE>
<PHRASE Label="la_title_NewFile" Module="Core" Type="1">TmV3IEZpbGU=</PHRASE>
<PHRASE Label="la_title_NewReply" Module="Core" Type="1">TmV3IFJlcGx5</PHRASE>
<PHRASE Label="la_title_NewTheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
Index: core/install/install_data.sql
===================================================================
--- core/install/install_data.sql (revision 13557)
+++ core/install/install_data.sql (working copy)
@@ -133,41 +133,41 @@
INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category');
INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User');
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 0, NULL, 'Core:Users', 'Add User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 1, NULL, 'Core:Users', 'Add User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 0, NULL, 'Core:Users', 'Approve User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 1, NULL, 'Core:Users', 'Approve User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 0, NULL, 'Core:Users', 'Validate User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 1, NULL, 'Core:Users', 'Validate User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 0, NULL, 'Core:Users', 'Deny User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 1, NULL, 'Core:Users', 'Deny User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 1, NULL, 'Core:Users', 'Forgot Password', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 0, NULL, 'Core:Users', 'Forgot Password', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, NULL, 'Core:Users', 'Add Pending User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 1, NULL, 'Core:Users', 'Add Pending User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, NULL, 'Core:Category', 'Add Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, NULL, 'Core:Category', 'Add Pending Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 1, NULL, 'Core:Category', 'Add Pending Category', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 1, NULL, 'Core:Category', 'Add Category', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, NULL, 'Core:Category', 'Approve Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, NULL, 'Core:Category', 'Deny Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, NULL, 'Core:Users', 'User subscribed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 1, NULL, 'Core:Users', 'User subscribed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, NULL, 'Core:Users', 'User unsubscribed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 1, NULL, 'Core:Users', 'User unsubscribed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 0, NULL, 'Core:Users', 'Suggest to a friend', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 1, NULL, 'Core:Users', 'Suggest to a friend', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWDC', NULL, 1, 0, NULL, 'Core:Users', 'Password Confirmation', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, NULL, 'Core:Users', 'Membership expired', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, NULL, 'Core:Users', 'Membership expired', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, NULL, 'Core:Users', 'Membership expiration notice', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, NULL, 'Core:Users', 'Membership expiration notice', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, NULL, 'Core', 'Common Footer Template', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, NULL, 'Core:Category', 'This e-mail is sent to a user after filling in the Contact Us form', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, NULL, 'Core:Category', 'This e-mail is sent to a user after filling in the Contact Us form', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, NULL, 'Core:Category', 'Admin Reply to User Form Submission', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, NULL, 'Core:Category', 'User Replied to It\'s Form Submission', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, NULL, 'Core:Category', 'Form Submission Admin Reply Delivery Failure', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 0, 'Core', 'Add User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 1, 'Core', 'Add User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 0, 'Core', 'Approve User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 1, 'Core', 'Approve User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 0, 'Core', 'Validate User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 1, 'Core', 'Validate User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 0, 'Core', 'Deny User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 1, 'Core', 'Deny User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 1, 'Core', 'Forgot Password', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 0, 'Core', 'Forgot Password', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, 'Core', 'Add Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending Category', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 1, 'Core', 'Add Category', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, 'Core', 'Approve Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, 'Core', 'Deny Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, 'Core', 'User subscribed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 1, 'Core', 'User subscribed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, 'Core', 'User unsubscribed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 1, 'Core', 'User unsubscribed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 0, 'Core', 'Suggest to a friend', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 1, 'Core', 'Suggest to a friend', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWDC', NULL, 1, 0, 'Core', 'Password Confirmation', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, 'Core', 'Common Footer Template', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, 'Core', 'Admin Reply to User Form Submission', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, 'Core', 'User Replied to It\'s Form Submission', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, 'Core', 'Form Submission Admin Reply Delivery Failure', 1, 1, 1);
INSERT INTO IdGenerator VALUES ('100');
@@ -570,8 +570,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.edit', 11, 1, 1, 0);
@@ -588,8 +586,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.edit', 11, 1, 1, 0);
@@ -678,7 +674,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.delete', 11, 1, 1, 0);
-INSERT INTO Skins VALUES(DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n font-size: 11px;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/progress_left.gif'');\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1272217243, 1);
+INSERT INTO Skins VALUES(DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n font-size: 11px;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/progress_left.gif'');\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}\r\n\r\n/* Ajax Dropdown */\r\n.suggest-box {\r\n border: 1px solid #999;\r\n background-color: #fff;\r\n}\r\n\r\n.suggest-item, .suggest-item-over {\r\n padding: 1px 2px 0px 2px;\r\n font-family: arial,verdana;\r\n font-size: 12px;\r\n}\r\n\r\n.suggest-item-over {\r\n background-color: #3366CC;\r\n color: #fff;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1273946818, 1);
INSERT INTO LocalesList VALUES
(1, '0x0436', 'Afrikaans (South Africa)', 'af-ZA', 'Latn', '1252'),
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql (revision 13559)
+++ core/install/install_schema.sql (working copy)
@@ -93,6 +93,14 @@
EventId int(11) NOT NULL AUTO_INCREMENT,
`Event` varchar(40) NOT NULL DEFAULT '',
ReplacementTags text,
+ AllowChangingSender tinyint(4) NOT NULL DEFAULT '0',
+ CustomSender tinyint(4) NOT NULL DEFAULT '0',
+ SenderName varchar(255) NOT NULL DEFAULT '',
+ SenderAddressType tinyint(4) NOT NULL DEFAULT '0',
+ SenderAddress varchar(255) NOT NULL DEFAULT '',
+ AllowChangingRecipient tinyint(4) NOT NULL DEFAULT '0',
+ CustomRecipient tinyint(4) NOT NULL DEFAULT '0',
+ Recipients text,
l1_Subject text,
l2_Subject text,
l3_Subject text,
@@ -107,7 +115,6 @@
MessageType varchar(4) NOT NULL DEFAULT 'text',
Enabled int(11) NOT NULL DEFAULT '1',
FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
- FromUserId int(11) DEFAULT NULL,
Module varchar(40) NOT NULL DEFAULT '',
Description text,
`Type` int(11) NOT NULL DEFAULT '0',
@@ -115,7 +122,12 @@
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY `Event` (`Event`),
- KEY FrontEndOnly (FrontEndOnly)
+ KEY FrontEndOnly (FrontEndOnly),
+ KEY AllowChangingSender (AllowChangingSender),
+ KEY CustomSender (CustomSender),
+ KEY SenderAddressType (SenderAddressType),
+ KEY AllowChangingRecipient (AllowChangingRecipient),
+ KEY CustomRecipient (CustomRecipient)
);
CREATE TABLE IdGenerator (
Index: core/install/upgrades.php
===================================================================
--- core/install/upgrades.php (revision 13557)
+++ core/install/upgrades.php (working copy)
@@ -1208,7 +1208,7 @@
if ($mode == 'before') {
// fix "Content" category
$fields_hash = Array (
- 'CreatedById' => -1, // root
+ 'CreatedById' => USER_ROOT,
'CreatedOn' => time(),
'ResourceId' => $this->Application->NextResourceId(),
);
@@ -1517,78 +1517,156 @@
$this->Conn->Query('DROP TABLE IF EXISTS ' . TABLE_PREFIX . 'Phrase');
$this->Conn->Query('RENAME TABLE ' . $temp_table . ' TO ' . TABLE_PREFIX . 'Phrase');
- // refactor StdDestinations table
- $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
- $this->Conn->Query($sql);
+ $this->_updateCountryStatesTable();
+ $this->_replaceConfigurationValueSeparator();
- $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
- CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
- CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
- CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
- CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
- CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
- DROP INDEX DestType,
- DROP INDEX DestParentId,
- ADD INDEX (`Type`),
- ADD INDEX (StateCountryId)';
- $this->Conn->Query($sql);
+ // save "config.php" in php format, not ini format as before
+ $this->_toolkit->SaveConfig();
+ }
- // move country/state translations from Phrase to CountryStates table
- $ml_helper->createFields('country-state');
+ if ($mode == 'after') {
+ $this->_transformEmailRecipients();
+ }
+ }
- for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
- if (!$ml_helper->LanguageFound($language_id)) {
- continue;
- }
+ /**
+ * Move country/state translations from Phrase to CountryStates table
+ *
+ */
+ function _updateCountryStatesTable()
+ {
+ // refactor StdDestinations table
+ $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
+ $this->Conn->Query($sql);
- $sub_select = ' SELECT l' . $language_id . '_Translation
- FROM ' . TABLE_PREFIX . 'Phrase
- WHERE Phrase = DestName';
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
+ CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
+ CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
+ CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
+ CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
+ DROP INDEX DestType,
+ DROP INDEX DestParentId,
+ ADD INDEX (`Type`),
+ ADD INDEX (StateCountryId)';
+ $this->Conn->Query($sql);
- $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
- SET l' . $language_id . '_Name = (' . $sub_select . ')';
- $this->Conn->Query($sql);
+ $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
+ /* @var $ml_helper kMultiLanguageHelper */
+
+ $ml_helper->createFields('country-state');
+
+ for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
+ if (!$ml_helper->LanguageFound($language_id)) {
+ continue;
}
- $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
- DROP DestName';
- $this->Conn->Query($sql);
+ $sub_select = ' SELECT l' . $language_id . '_Translation
+ FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase = DestName';
- $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
- WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
+ SET l' . $language_id . '_Name = (' . $sub_select . ')';
$this->Conn->Query($sql);
+ }
- // makes configuration values dropdowns use "||" as separator
- $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
- /* @var $custom_field_helper InpCustomFieldsHelper */
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ DROP DestName';
+ $this->Conn->Query($sql);
- $sql = 'SELECT ValueList, VariableName
- FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
- WHERE ValueList LIKE "%,%"';
- $variables = $this->Conn->GetCol($sql, 'VariableName');
+ $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $this->Conn->Query($sql);
+ }
- foreach ($variables as $variable_name => $value_list) {
- $ret = Array ();
- $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+ /**
+ * Makes configuration values dropdowns use "||" as separator
+ *
+ */
+ function _replaceConfigurationValueSeparator()
+ {
+ $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
+ /* @var $custom_field_helper InpCustomFieldsHelper */
- foreach ($options as $option_key => $option_title) {
- if (substr($option_key, 0, 3) == 'SQL') {
- $ret[] = $option_title;
- }
- else {
- $ret[] = $option_key . '=' . $option_title;
- }
+ $sql = 'SELECT ValueList, VariableName
+ FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
+ WHERE ValueList LIKE "%,%"';
+ $variables = $this->Conn->GetCol($sql, 'VariableName');
+
+ foreach ($variables as $variable_name => $value_list) {
+ $ret = Array ();
+ $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+
+ foreach ($options as $option_key => $option_title) {
+ if (substr($option_key, 0, 3) == 'SQL') {
+ $ret[] = $option_title;
}
+ else {
+ $ret[] = $option_key . '=' . $option_title;
+ }
+ }
+ $fields_hash = Array (
+ 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ );
+
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ }
+ }
+
+ /**
+ * Transforms "FromUserId" into Sender* and Recipients columns
+ *
+ */
+ function _transformEmailRecipients()
+ {
+ $sql = 'SELECT FromUserId, Type, EventId
+ FROM ' . TABLE_PREFIX . 'Events
+ WHERE FromUserId IS NOT NULL AND (FromUserId <> ' . USER_ROOT . ')';
+ $events = $this->Conn->Query($sql, 'EventId');
+
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ foreach ($events as $event_id => $event_data) {
+ $sql = 'SELECT Login
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE PortalUserId = ' . $event_data['FromUserId'];
+ $username = $this->Conn->GetOne($sql);
+
+ if (!$username) {
+ continue;
+ }
+
+ if ($event_data['Type'] == EVENT_TYPE_FRONTEND) {
+ // from user
$fields_hash = Array (
- 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ 'CustomSender' => 1,
+ 'SenderAddressType' => ADDRESS_TYPE_USER,
+ 'SenderAddress' => $username
);
+ }
- $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ if ($event_data['Type'] == EVENT_TYPE_ADMIN) {
+ // to user
+ $records = Array (
+ Array (
+ 'RecipientType' => RECIPIENT_TYPE_TO,
+ 'RecipientName' => '',
+ 'RecipientAddressType' => ADDRESS_TYPE_USER,
+ 'RecipientAddress' => $username
+ )
+ );
+
+ $fields_hash = Array (
+ 'CustomRecipient' => 1,
+ 'Recipients' => $minput_helper->prepareMInputXML($records, array_keys( reset($records) ))
+ );
}
- // save "config.php" in php format, not ini format as before
- $this->_toolkit->SaveConfig();
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'Events', 'EventId = ' . $event_id);
}
+
+ $this->Conn->Query('ALTER TABLE ' . TABLE_PREFIX . 'Events DROP FromUserId');
}
}
\ No newline at end of file
Index: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql (revision 13559)
+++ core/install/upgrades.sql (working copy)
@@ -1864,3 +1864,25 @@
KEY RedirectOnIPMatch (RedirectOnIPMatch),
KEY Priority (Priority)
);
+
+ALTER TABLE Events
+ ADD AllowChangingSender TINYINT NOT NULL DEFAULT '0' AFTER ReplacementTags ,
+ ADD CustomSender TINYINT NOT NULL DEFAULT '0' AFTER AllowChangingSender ,
+ ADD SenderName VARCHAR(255) NOT NULL DEFAULT '' AFTER CustomSender ,
+ ADD SenderAddressType TINYINT NOT NULL DEFAULT '0' AFTER SenderName ,
+ ADD SenderAddress VARCHAR(255) NOT NULL DEFAULT '' AFTER SenderAddressType ,
+ ADD AllowChangingRecipient TINYINT NOT NULL DEFAULT '0' AFTER SenderAddress ,
+ ADD CustomRecipient TINYINT NOT NULL DEFAULT '0' AFTER AllowChangingRecipient ,
+ ADD Recipients TEXT AFTER CustomRecipient,
+ ADD INDEX (AllowChangingSender),
+ ADD INDEX (CustomSender),
+ ADD INDEX (SenderAddressType),
+ ADD INDEX (AllowChangingRecipient),
+ ADD INDEX (CustomRecipient);
+
+UPDATE Events SET AllowChangingSender = 1, AllowChangingRecipient = 1;
+UPDATE Events SET Module = 'Core' WHERE Module LIKE 'Core:%';
+
+DELETE FROM Permissions WHERE Permission LIKE 'in-portal:configuration_email%';
+DELETE FROM Permissions WHERE Permission LIKE 'in-portal:user_email%';
+DELETE FROM Phrase WHERE Phrase IN ('la_fld_FromToUser', 'la_col_FromToUser');
\ No newline at end of file
Index: core/kernel/application.php
===================================================================
--- core/kernel/application.php (revision 13559)
+++ core/kernel/application.php (working copy)
@@ -2830,11 +2830,12 @@
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEventAdmin($email_event_name, $to_user_id = null, $send_params = false)
+ function &EmailEventAdmin($email_event_name, $to_user_id = null, $send_params = Array ())
{
- $event =& $this->EmailEvent($email_event_name, 1, $to_user_id, $send_params);
+ $event =& $this->EmailEvent($email_event_name, EVENT_TYPE_ADMIN, $to_user_id, $send_params);
+
return $event;
}
@@ -2844,11 +2845,12 @@
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEventUser($email_event_name, $to_user_id = null, $send_params = false)
+ function &EmailEventUser($email_event_name, $to_user_id = null, $send_params = Array ())
{
- $event =& $this->EmailEvent($email_event_name, 0, $to_user_id, $send_params);
+ $event =& $this->EmailEvent($email_event_name, EVENT_TYPE_FRONTEND, $to_user_id, $send_params);
+
return $event;
}
@@ -2856,23 +2858,28 @@
* Triggers general email event
*
* @param string $email_event_name
- * @param int $email_event_type ( 0 for User, 1 for Admin)
+ * @param int $email_event_type (0 for User, 1 for Admin)
* @param int $to_user_id
* @param array $send_params associative array of direct send params,
* possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEvent($email_event_name, $email_event_type, $to_user_id = -1, $send_params = false)
+ function &EmailEvent($email_event_name, $email_event_type, $to_user_id = null, $send_params = Array ())
{
- $params = array(
+ $params = Array (
'EmailEventName' => $email_event_name,
'EmailEventToUserId' => $to_user_id,
'EmailEventType' => $email_event_type,
+ 'DirectSendParams' => $send_params,
);
- if ($send_params) {
- $params['DirectSendParams'] = $send_params;
+
+ if (array_key_exists('use_special', $send_params)) {
+ $event_str = 'emailevents.' . $send_params['use_special'] . ':OnEmailEvent';
}
- $event_str = isset($send_params['use_special']) ? 'emailevents.'.$send_params['use_special'].':OnEmailEvent' : 'emailevents:OnEmailEvent';
+ else {
+ $event_str = 'emailevents:OnEmailEvent';
+ }
+
$this->HandleEvent($event, $event_str, $params);
return $event;
Index: core/kernel/constants.php
===================================================================
--- core/kernel/constants.php (revision 13559)
+++ core/kernel/constants.php (working copy)
@@ -84,10 +84,7 @@
define('clUPDATE', 2);
define('clDELETE', 3);
- /**
- * Separator for ValueList fields
- *
- */
+ // Separator for ValueList fields
define('VALUE_LIST_SEPARATOR', '||');
// template editing modes
@@ -117,10 +114,7 @@
define('SMS_MODE_AUTO', 1);
define('SMS_MODE_FORCE', 2);
- /**
- * Means, that actual category Template field value should inherited from parent category
- *
- */
+ // Means, that actual category Template field value should inherited from parent category
define('CATEGORY_TEMPLATE_INHERIT', '#inherit#');
define('REWRITE_MODE_BUILD', 1);
@@ -166,4 +160,13 @@
// site domains
define('SITE_DOMAIN_REDIRECT_CURRENT', 1);
- define('SITE_DOMAIN_REDIRECT_EXTERNAL', 2);
\ No newline at end of file
+ define('SITE_DOMAIN_REDIRECT_EXTERNAL', 2);
+
+ // email event address types
+ define('ADDRESS_TYPE_EMAIL', 1);
+ define('ADDRESS_TYPE_USER', 2);
+ define('ADDRESS_TYPE_GROUP', 3);
+
+ define('RECIPIENT_TYPE_TO', 1);
+ define('RECIPIENT_TYPE_CC', 2);
+ define('RECIPIENT_TYPE_BCC', 3);
Index: core/units/categories/categories_config.php
===================================================================
--- core/units/categories/categories_config.php (revision 13557)
+++ core/units/categories/categories_config.php (working copy)
@@ -216,7 +216,7 @@
'PermItemPrefix' => 'CATEGORY',
- 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'email' => 'in-portal:configuration_email', 'custom' => 'in-portal:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'custom' => 'in-portal:configuration_custom'),
'Sections' => Array (
'in-portal:configure_categories' => Array (
@@ -239,23 +239,13 @@
'type' => stTREE,
),
- 'in-portal:configuration_email' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'module' => 'Core:Category', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 11.3,
- 'type' => stTREE,
- ),
-
'in-portal:configuration_custom' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 11.4,
+ 'priority' => 11.3,
'type' => stTREE,
),
),
Index: core/units/email_events/email_event_tp.php
===================================================================
--- core/units/email_events/email_event_tp.php (revision 13557)
+++ core/units/email_events/email_event_tp.php (working copy)
@@ -21,4 +21,54 @@
$this->Application->setUnitOption($this->Prefix, 'Grids', $grids);
}
}
+
+ /**
+ * Checks, that field can be edited
+ *
+ * @param Array $params
+ * @return string
+ */
+ function IsEditable($params)
+ {
+ if ($this->Application->isDebugMode()) {
+ return true;
+ }
+
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ return $object->GetDBField($params['check_field']);
+ }
+
+ /**
+ * Removes "To" options from possible options in "RecipientType" field
+ *
+ * @param Array $params
+ */
+ function RemoveToRecipientType($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $field_options = $object->GetFieldOptions('RecipientType');
+ unset($field_options['options'][RECIPIENT_TYPE_TO]);
+ $object->SetFieldOptions('RecipientType', $field_options);
+ }
+
+ /**
+ * Restores "To" option in possible option list in "RecipientType" field
+ *
+ * @param Array $params
+ */
+ function RestoreRecipientType($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $field_options = $object->GetFieldOptions('RecipientType');
+ $virtual_fields = $this->Application->getUnitOption($this->Prefix, 'VirtualFields');
+ $field_options['options'] = $virtual_fields['RecipientType']['options'];
+ $object->SetFieldOptions('RecipientType', $field_options);
+ }
+
}
\ No newline at end of file
Index: core/units/email_events/email_events_config.php
===================================================================
--- core/units/email_events/email_events_config.php (revision 13557)
+++ core/units/email_events/email_events_config.php (working copy)
@@ -38,30 +38,28 @@
'TitlePresets' => 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!'),
@@ -69,6 +67,13 @@
'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
Index: core/units/email_events/email_events_event_handler.php
===================================================================
--- core/units/email_events/email_events_event_handler.php (revision 13557)
+++ core/units/email_events/email_events_event_handler.php (working copy)
@@ -23,12 +23,23 @@
function mapPermissions()
{
parent::mapPermissions();
- $permissions = Array(
- 'OnFrontOnly' => Array('self' => 'edit'),
- 'OnSaveSelected' => Array('self' => 'view'),
- 'OnProcessEmailQueue' => Array('self' => 'add|edit'),
+ $permissions = Array (
+ 'OnFrontOnly' => Array ('self' => 'edit'),
+ 'OnSaveSelected' => Array ('self' => 'view'),
+ 'OnProcessEmailQueue' => Array ('self' => 'add|edit'),
+
+ 'OnSuggestAddress' => Array ('self' => 'add|edit'),
+
+ // events only for developers
+ 'OnPreCreate' => Array ('self' => 'debug'),
+ 'OnDelete' => Array ('self' => 'debug'),
+ 'OnDeleteAll' => Array ('self' => 'debug'),
+ 'OnMassDelete' => Array ('self' => 'debug'),
+ 'OnMassApprove' => Array ('self' => 'debug'),
+ 'OnMassDecline' => Array ('self' => 'debug'),
);
+
$this->permMapping = array_merge($this->permMapping, $permissions);
}
@@ -201,76 +212,250 @@
}
/**
- * Returns sender & recipients ids plus event_id (as parameter by reference)
+ * Processes email sender
*
* @param kEvent $event
- *
- * @return mixed
+ * @param Array $direct_params
*/
- function GetMessageRecipients(&$event)
+ function _processSender(&$event, $direct_params = Array ())
{
+ $this->Application->removeObject('u.email-from');
+
$object =& $this->_getEmailEvent($event);
/* @var $object kDBItem */
- // initial values
- $to_user_id = $event->getEventParam('EmailEventToUserId');
- if ( !is_numeric($to_user_id) ) {
- $to_user_id = -1; // when not specified, then send to "root"
- }
- $from_user_id = $object->GetDBField('FromUserId');
+ $email = $name = '';
- if ($object->GetDBField('Type') == EVENT_TYPE_ADMIN) {
- // For type "Admin" recipient is a user from field FromUserId which means From/To user in Email events list
- if ($to_user_id == -1) {
- $to_user_id = $from_user_id;
+ // set defaults from event
+ if ($object->GetDBField('CustomSender')) {
+ $address = $object->GetDBField('SenderAddress');
+ $address_type = $object->GetDBField('SenderAddressType');
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $email = $address;
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT FirstName, LastName, Email, PortalUserId
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ // user still exists
+ $email = $user_info['Email'];
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $user =& $this->Application->recallObject('u.email-from', null, Array('skip_autoload' => true));
+ /* @var $user UsersItem */
+
+ $user->Load($user_info['PortalUserId']);
+ }
+ break;
}
- $from_user_id = -1;
+
+ if ($object->GetDBField('SenderName')) {
+ $name = $object->GetDBField('SenderName');
+ }
}
- return Array ($from_user_id, $to_user_id);
+ // update with custom data given during event execution
+ if (array_key_exists('from_email', $direct_params)) {
+ $email = $direct_params['from_email'];
+ }
+
+ if (array_key_exists('from_name', $direct_params)) {
+ $name = $direct_params['from_name'];
+ }
+
+ // still nothing, set defaults
+ if (!$email) {
+ $email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+ }
+
+ if (!$name) {
+ $name = strip_tags( $this->Application->ConfigValue('Site_Name') );
+ }
+
+ $esender =& $this->Application->recallObject('EmailSender');
+ /* @var $esender kEmailSendingHelper */
+
+ $esender->SetFrom($email, $name);
+
+ return Array ($email, $name);
}
/**
- * Returns user name, email by id, or ones, that specified in $direct_params
+ * Processes email recipients
*
- * @param int $user_id
- * @param string $user_type type of user = {to,from}
+ * @param kEvent $event
* @param Array $direct_params
- * @return Array
*/
- function GetRecipientInfo($user_id, $user_type, $direct_params = null)
+ function _processRecipients(&$event, $direct_params = Array ())
{
- // load user, because it can be addressed from email template tags
- $user =& $this->Application->recallObject('u.email-'.$user_type, null, Array('skip_autoload' => true));
- /* @var $user UsersItem */
+ $this->Application->removeObject('u.email-to');
- $email = $name = '';
- $result = $user_id > 0 ? $user->Load( (int)$user_id ) : $user->Clear();
- if ($user->IsLoaded()) {
- $email = $user->GetDBField('Email');
- $name = trim($user->GetDBField('FirstName').' '.$user->GetDBField('LastName'));
- }
+ $object =& $this->_getEmailEvent($event);
+ /* @var $object kDBItem */
- if (is_array($direct_params)) {
- if (isset($direct_params[$user_type.'_email'])) {
- $email = $direct_params[$user_type.'_email'];
+ $to_email = $to_name = '';
+ $all_recipients = Array ();
+ $recipients_xml = $object->GetDBField('Recipients');
+
+ if ($recipients_xml) {
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ // group recipients by type
+ $records = $minput_helper->parseMInputXML($recipients_xml);
+
+ foreach ($records as $record) {
+ $recipient_type = $record['RecipientType'];
+
+ if (!array_key_exists($recipient_type, $all_recipients)) {
+ $all_recipients[$recipient_type] = Array ();
+ }
+
+ $all_recipients[$recipient_type][] = $record;
}
+ }
- if (isset($direct_params[$user_type.'_name'])) {
- $name = $direct_params[$user_type.'_name'];
+ if (!array_key_exists(RECIPIENT_TYPE_TO, $all_recipients)) {
+ $all_recipients[RECIPIENT_TYPE_TO] = Array ();
+ }
+
+ // remove all "To" recipients, when not allowed
+ $overwrite_to_email = array_key_exists('overwrite_to_email', $direct_params) ? $direct_params['overwrite_to_email'] : false;
+
+ if (!$object->GetDBField('CustomRecipient') || $overwrite_to_email) {
+ $all_recipients[RECIPIENT_TYPE_TO] = Array ();
+ }
+
+ // update with custom data given during event execution (user_id)
+ $to_user_id = $event->getEventParam('EmailEventToUserId');
+
+ if ($to_user_id > 0) {
+ $sql = 'SELECT FirstName, LastName, Email
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE PortalUserId = ' . $to_user_id;
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ $add_recipient = Array (
+ 'RecipientAddressType' => ADDRESS_TYPE_EMAIL,
+ 'RecipientAddress' => $user_info['Email'],
+ 'RecipientName' => trim($user_info['FirstName'] . ' ' . $user_info['LastName']),
+ );
+
+ array_unshift($all_recipients[RECIPIENT_TYPE_TO], $add_recipient);
+
+ $user =& $this->Application->recallObject('u.email-to', null, Array('skip_autoload' => true));
+ /* @var $user UsersItem */
+
+ $user->Load($to_user_id);
}
}
- if (!$email) {
- // if email is empty, then use admins email
- $email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+ // update with custom data given during event execution (email + name)
+ $add_recipient = Array ();
+
+ if (array_key_exists('to_email', $direct_params)) {
+ $add_recipient['RecipientName'] = '';
+ $add_recipient['RecipientAddressType'] = ADDRESS_TYPE_EMAIL;
+ $add_recipient['RecipientAddress'] = $direct_params['to_email'];
}
- if (!$name) {
- $name = $user_type == 'from' ? strip_tags($this->Application->ConfigValue('Site_Name')) : $email;
+ if (array_key_exists('to_name', $direct_params)) {
+ $add_recipient['RecipientName'] = $direct_params['to_name'];
}
- return Array ($email, $name);
+ if ($add_recipient) {
+ array_unshift($all_recipients[RECIPIENT_TYPE_TO], $add_recipient);
+ }
+
+ $esender =& $this->Application->recallObject('EmailSender');
+ /* @var $esender kEmailSendingHelper */
+
+ $header_mapping = Array (
+ RECIPIENT_TYPE_TO => 'To',
+ RECIPIENT_TYPE_CC => 'Cc',
+ RECIPIENT_TYPE_BCC => 'Bcc',
+ );
+
+ $default_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+
+ foreach ($all_recipients as $recipient_type => $recipients) {
+ // add recipients to email
+ $pairs = Array ();
+
+ foreach ($recipients as $recipient) {
+ $address = $recipient['RecipientAddress'];
+ $address_type = $recipient['RecipientAddressType'];
+ $repipient_name = $recipient['RecipientName'];
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $pairs[] = Array ('email' => $address, 'name' => $repipient_name);
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT FirstName, LastName, Email
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ // user still exists
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $pairs[] = Array (
+ 'email' => $user_info['Email'],
+ 'name' => $name ? $name : $repipient_name,
+ );
+ }
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $sql = 'SELECT u.FirstName, u.LastName, u.Email
+ FROM ' . TABLE_PREFIX . 'PortalGroup g
+ JOIN ' . TABLE_PREFIX . 'UserGroup ug ON ug.GroupId = g.GroupId
+ JOIN ' . TABLE_PREFIX . 'PortalUser u ON u.PortalUserId = ug.PortalUserId
+ WHERE g.Name = ' . $this->Conn->qstr($address);
+ $users = $this->Conn->Query($sql);
+
+ foreach ($users as $user) {
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $pairs[] = Array (
+ 'email' => $user_info['Email'],
+ 'name' => $name ? $name : $repipient_name,
+ );
+ }
+ break;
+ }
+ }
+
+ if (!$pairs) {
+ continue;
+ }
+
+ if ($recipient_type == RECIPIENT_TYPE_TO) {
+ $to_email = $pairs[0]['email'] ? $pairs[0]['email'] : $default_email;
+ $to_name = $pairs[0]['name'] ? $pairs[0]['name'] : $to_email;
+ }
+
+ $header_name = $header_mapping[$recipient_type];
+
+ foreach ($pairs as $pair) {
+ $email = $pair['email'] ? $pair['email'] : $default_email;
+ $name = $pair['name'] ? $pair['name'] : $email;
+
+ $esender->AddRecipient($header_name, $email, $name);
+ }
+ }
+
+ return Array ($to_email, $to_name);
}
/**
@@ -279,7 +464,7 @@
* @param kEvent $event
* @param int $language_id
*/
- function GetMessageBody(&$event, $language_id = null)
+ function _getMessageBody(&$event, $language_id = null)
{
if (!isset($language_id)) {
$language_id = $this->Application->GetVar('m_lang');
@@ -399,7 +584,7 @@
* @param Array $direct_params
* @return Array
*/
- function ParseMessageBody($message, $direct_params = null)
+ function ParseMessageBody($message, $direct_params = Array ())
{
$message_language = $this->_getSendLanguage($direct_params);
$this->_changeLanguage($message_language);
@@ -463,15 +648,12 @@
$send_params = $event->getEventParam('DirectSendParams');
// 1. get information about message sender and recipient
- $recipients = $this->GetMessageRecipients($event);
+ list ($from_email, $from_name) = $this->_processSender($event, $send_params);
+ list ($to_email, $to_name) = $this->_processRecipients($event, $send_params);
- list ($from_id, $to_id) = $recipients;
- list ($from_email, $from_name) = $this->GetRecipientInfo($from_id, 'from', $send_params);
- list ($to_email, $to_name) = $this->GetRecipientInfo($to_id, 'to', $send_params);
-
// 2. prepare message to be sent
$message_language = $this->_getSendLanguage($send_params);
- $message_template = $this->GetMessageBody($event, $message_language);
+ $message_template = $this->_getMessageBody($event, $message_language);
if (!trim($message_template)) {
trigger_error('Message template is empty', E_USER_WARNING);
return false;
@@ -487,15 +669,12 @@
$esender =& $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
- $esender->SetFrom($from_email, $from_name);
- $esender->AddTo($to_email, $to_name);
-
$message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
$esender->SetSubject($message_subject);
if ($this->Application->isDebugMode()) {
// set special header with event name, so it will be easier to determite what's actually was received
- $message_headers['X-Event-Name'] = $email_event_name . ' - ' . ($event->getEventParam('EmailEventType') == EVENT_TYPE_ADMIN ? 'ADMIN' : 'USER');
+ $message_headers['X-Event-Name'] = $email_event_name . ' - ' . ($object->GetDBField('Type') == EVENT_TYPE_ADMIN ? 'ADMIN' : 'USER');
}
foreach ($message_headers as $header_name => $header_value) {
@@ -524,14 +703,11 @@
$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'EmailLog');
}
-
- $this->Application->removeObject('u.email-from');
- $this->Application->removeObject('u.email-to');
}
function _getSendLanguage($send_params)
{
- if ($send_params && array_key_exists('language_id', $send_params)) {
+ if (array_key_exists('language_id', $send_params)) {
return $send_params['language_id'];
}
@@ -634,10 +810,10 @@
{
parent::OnAfterConfigRead($event);
- $options = Array ('Core:Users' => 'Core - Users', 'Core:Category' => 'Core - Categories');
+ $options = Array ();
foreach ($this->Application->ModuleInfo as $module_name => $module_info) {
- if (($module_name == 'In-Portal') || ($module_name == 'Core')) {
+ if ($module_name == 'In-Portal') {
continue;
}
@@ -666,4 +842,221 @@
// use language from grid, instead of primary language used by default
$event->SetRedirectParam('m_lang', $this->Application->GetVar('m_lang'));
}
+
+ /**
+ * Fixes default recipient type
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemLoad(&$event)
+ {
+ parent::OnAfterItemLoad($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if (!$this->Application->isDebugMode(false)) {
+ if ($object->GetDBField('AllowChangingRecipient')) {
+ $object->SetDBField('RecipientType', RECIPIENT_TYPE_TO);
+ }
+ else {
+ $object->SetDBField('RecipientType', RECIPIENT_TYPE_CC);
+ }
+ }
+
+ // process replacement tags
+ $records = Array ();
+ $replacement_tags = $object->GetDBField('ReplacementTags');
+ $replacement_tags = $replacement_tags ? unserialize($replacement_tags) : Array ();
+
+ foreach ($replacement_tags as $tag => $replacement) {
+ $records[] = Array ('Tag' => $tag, 'Replacement' => $replacement);
+ }
+
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ $xml = $minput_helper->prepareMInputXML($records, Array ('Tag', 'Replacement'));
+ $object->SetDBField('ReplacementTagsXML', $xml);
+ }
+
+ /**
+ * Performs custom validation + keep read-only fields
+ *
+ * @param kEvent $event
+ */
+ function _itemChanged(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ($object->GetDBField('CustomSender')) {
+ $this->_validateAddress($event, 'Sender');
+ }
+
+ $this->_validateAddress($event, 'Recipient');
+
+ if (!$this->Application->isDebugMode(false)) {
+ // only allow to enable/disable event while in debug mode
+ $to_restore = Array ('Enabled', 'AllowChangingSender', 'AllowChangingRecipient');
+
+ if (!$object->GetOriginalField('AllowChangingSender')) {
+ $to_restore = array_merge($to_restore, Array ('CustomSender', 'SenderName', 'SenderAddressType', 'SenderAddress'));
+ }
+
+ if (!$object->GetOriginalField('AllowChangingRecipient')) {
+ $to_restore = array_merge($to_restore, Array ('CustomRecipient'/*, 'Recipients'*/));
+ }
+
+ // prevent specific fields from editing
+ foreach ($to_restore as $restore_field) {
+ $original_value = $object->GetOriginalField($restore_field);
+
+ if ($object->GetDBField($restore_field) != $original_value) {
+ $object->SetDBField($restore_field, $original_value);
+ }
+ }
+ }
+
+ // process replacement tags
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ $replacement_tags = Array ();
+ $records = $minput_helper->parseMInputXML( $object->GetDBField('ReplacementTagsXML') );
+
+ foreach ($records as $record) {
+ $replacement_tags[ trim($record['Tag']) ] = trim($record['Replacement']);
+ }
+
+ $object->SetDBField('ReplacementTags', $replacement_tags ? serialize($replacement_tags) : NULL);
+ }
+
+ /**
+ * Validates address using given field prefix
+ *
+ * @param kEvent $event
+ * @param string $field_prefix
+ */
+ function _validateAddress(&$event, $field_prefix)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $address_type = $object->GetDBField($field_prefix . 'AddressType');
+ $object->setRequired($field_prefix . 'Address', $address_type > 0);
+ $address = $object->GetDBField($field_prefix . 'Address');
+
+ if (!$address) {
+ // don't validate against empty address
+ return ;
+ }
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ if (!preg_match('/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', $address)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_email');
+ }
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT PortalUserId
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ if (!$this->Conn->GetOne($sql)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_user');
+ }
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $sql = 'SELECT GroupId
+ FROM ' . TABLE_PREFIX . 'PortalGroup
+ WHERE Name = ' . $this->Conn->qstr($address);
+ if (!$this->Conn->GetOne($sql)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_group');
+ }
+ break;
+ }
+ }
+
+ /**
+ * Don't allow to enable/disable events in non-debug mode
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->_itemChanged($event);
+ }
+
+ /**
+ * Don't allow to enable/disable events in non-debug mode
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+ $this->_itemChanged($event);
+ }
+
+ /**
+ * Suggest address based on typed address and selected address type
+ *
+ * @param kEvent $event
+ */
+ function OnSuggestAddress(&$event)
+ {
+ $event->status = erSTOP;
+
+ $address_type = $this->Application->GetVar('type');
+ $address = $this->Application->GetVar('value');
+ $limit = $this->Application->GetVar('limit');
+
+ if (!$limit) {
+ $limit = 20;
+ }
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $field = 'Email';
+ $table_name = TABLE_PREFIX . 'PortalUser';
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $field = 'Login';
+ $table_name = TABLE_PREFIX . 'PortalUser';
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $field = 'Name';
+ $table_name = TABLE_PREFIX . 'PortalGroup';
+ break;
+ }
+
+ if (isset($field)) {
+ $sql = 'SELECT DISTINCT ' . $field . '
+ FROM ' . $table_name . '
+ WHERE ' . $field . ' LIKE ' . $this->Conn->qstr($address . '%') . '
+ ORDER BY ' . $field . ' ASC
+ LIMIT 0,' . $limit;
+ $data = $this->Conn->GetCol($sql);
+ }
+ else {
+ $data = Array ();
+ }
+
+ $this->Application->XMLHeader();
+
+ echo '<suggestions>';
+
+ foreach ($data as $item) {
+ echo '<item>' . htmlspecialchars($item) . '</item>';
+ }
+
+ echo '</suggestions>';
+ }
}
\ No newline at end of file
Index: core/units/users/users_config.php
===================================================================
--- core/units/users/users_config.php (revision 13557)
+++ core/units/users/users_config.php (working copy)
@@ -225,7 +225,7 @@
),
),
- 'PermSection' => Array('main' => 'in-portal:user_list', 'email' => 'in-portal:user_email', 'custom' => 'in-portal:user_custom'),
+ 'PermSection' => Array('main' => 'in-portal:user_list', 'custom' => 'in-portal:user_custom'),
'Sections' => Array (
'in-portal:user_list' => Array (
@@ -272,23 +272,13 @@
'type' => stTREE,
),
- 'in-portal:user_email' => Array (
- 'parent' => 'in-portal:user_setting_folder',
- 'icon' => 'conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'module' => 'Core:Users', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 2,
- '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' => 3,
+ 'priority' => 2,
'type' => stTREE,
),
),
email_event_recipient_modules.patch [^] (69,313 bytes) 2010-05-18 08:07
[Show Content]
Index: in-auction/install/install_data.sql
===================================================================
--- in-auction/install/install_data.sql (revision 13557)
+++ in-auction/install/install_data.sql (working copy)
@@ -1758,10 +1758,10 @@
INSERT INTO eBayStoreCategories VALUES (1, 0, 'Other');
INSERT INTO eBayListingDetailTemplates VALUES (1, 'Default Details Template', 'Product Name: <inp2:p_Field name="Title"/>\r\nProduct Description: <inp2:p_Field name="Description"/>\r\nProduct Retail Price: <inp2:p_Field name="MSRP"/>\r\nProduct Features: <inp2:p_Field name="cust_Features"/>\r\n');
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'EBAYORDER.CREATE', NULL, 1, 0, NULL, 'In-Auction', 'eBay order created', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'EBAYNOTPAID.NOTIFY', NULL, 1, 0, NULL, 'In-Auction', 'eBay item not paid', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'EBAYNOTPAID.NOTIFY', NULL, 1, 0, NULL, 'In-Auction', 'eBay item not paid', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'EBAYFEEDBACKNOTRECEIVED.NOTIFY', NULL, 1, 0, NULL, 'In-Auction', 'eBay feedback not received', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'EBAYORDER.CREATE', NULL, 1, 0, 'In-Auction', 'eBay order created', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'EBAYNOTPAID.NOTIFY', NULL, 1, 0, 'In-Auction', 'eBay item not paid', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'EBAYNOTPAID.NOTIFY', NULL, 1, 0, 'In-Auction', 'eBay item not paid', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'EBAYFEEDBACKNOTRECEIVED.NOTIFY', NULL, 1, 0, 'In-Auction', 'eBay feedback not received', 0, 1, 1);
INSERT INTO Permissions VALUES (DEFAULT, 'ebay.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'ebay:setting_folder.view', 11, 1, 1, 0);
@@ -1788,8 +1788,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'ebay:error_log.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'ebay:configuration_feedbacks.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'ebay:configuration_general.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'ebay:ebay_configemail.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'ebay:ebay_configemail.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'ebay:listings_defaults.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'ebay:configuration_feedbacks.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'ebay:configuration_general.edit', 11, 1, 1, 0);
Index: in-auction/install/upgrades.sql
===================================================================
--- in-auction/install/upgrades.sql (revision 13557)
+++ in-auction/install/upgrades.sql (working copy)
@@ -53,3 +53,5 @@
# ===== v 5.1.0-B1 =====
UPDATE Modules SET Path = 'modules/in-auction/' WHERE `Name` = 'In-Auction';
+
+DELETE FROM Permissions WHERE Permission LIKE 'ebay:ebay_configemail%';
\ No newline at end of file
Index: in-auction/units/sections/sections_config.php
===================================================================
--- in-auction/units/sections/sections_config.php (revision 13557)
+++ in-auction/units/sections/sections_config.php (working copy)
@@ -167,12 +167,8 @@
'tree_ebay' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'eBay', 'Version')),
),
- 'PermSection' => Array(
- 'main' => 'ebay',
- 'email' => 'ebay:ebay_configemail',
- ),
+ 'PermSection' => Array('main' => 'ebay'),
-
'Sections' => Array (
'ebay' => Array (
'parent' => 'in-portal:root',
@@ -218,23 +214,13 @@
'type' => stTREE,
),
- 'ebay:ebay_configemail' => Array(
- 'parent' => 'ebay:setting_folder',
- 'icon' => 'in-auction:email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
- 'priority' => 3,
- 'type' => stTREE,
- ),
-
'ebay:configuration_feedbacks' => Array (
'parent' => 'ebay:setting_folder',
'icon' => 'in-auction:general_settings',
'label' => 'la_tab_ConfigGeneral',
'url' => Array('t' => 'in-auction/feedbacks_config', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view','edit'),
- 'priority' => 4,
+ 'priority' => 3,
'type' => stTREE,
),
),
Index: in-bulletin/install/english.lang
===================================================================
--- in-bulletin/install/english.lang (revision 13557)
+++ in-bulletin/install/english.lang (working copy)
@@ -26,7 +26,6 @@
<PHRASE Label="la_fld_PollGuestName" Module="In-Bulletin" Type="1">R3Vlc3QgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_PostedBy" Module="In-Bulletin" Type="1">UG9zdGVkIEJ5</PHRASE>
<PHRASE Label="la_fld_Question" Module="In-Bulletin" Type="1">UXVlc3Rpb24=</PHRASE>
- <PHRASE Label="la_fld_Replacement" Module="In-Bulletin" Type="1">UmVwbGFjZW1lbnQ=</PHRASE>
<PHRASE Label="la_fld_RequireLogin" Module="In-Bulletin" Type="1">UmVxdWlyZSBMb2dpbg==</PHRASE>
<PHRASE Label="la_fld_TopicType" Module="In-Bulletin" Type="1">VG9waWMgTG9ja2Vk</PHRASE>
<PHRASE Label="la_fld_Topic_MaxHotNumber" Module="In-Bulletin" Type="1">TWF4aW11bSBudW1iZXIgb2YgSE9UIHRvcGljcw==</PHRASE>
Index: in-bulletin/install/install_data.sql
===================================================================
--- in-bulletin/install/install_data.sql (revision 13557)
+++ in-bulletin/install/install_data.sql (working copy)
@@ -66,19 +66,19 @@
UPDATE Emoticon SET EmotionImage = CONCAT('0_',EmoticonId,'.gif');
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, NULL, 'In-Bulletin', 'Topic Added', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, NULL, 'In-Bulletin', 'Topic Added', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'Add Pending Topic', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'Add Pending Topic', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, NULL, 'In-Bulletin', 'Modify Topic', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, NULL, 'In-Bulletin', 'Modify Topic', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'Topic Modifications Pending', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, NULL, 'In-Bulletin', 'Topic Modifications Pending', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'TOPIC.APPROVE', NULL, 1, 0, NULL, 'In-Bulletin', 'Approve Topic', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 1, NULL, 'In-Bulletin', 'Post Added', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'POST.MODIFY', NULL, 1, 1, NULL, 'In-Bulletin', 'Post Modified', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 0, NULL, 'In-Bulletin', 'Post Added', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'PM.ADD', NULL, 1, 0, NULL, 'In-Bulletin', 'New Private Message', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.APPROVE', NULL, 1, 0, 'In-Bulletin', 'Approve Topic', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 1, 'In-Bulletin', 'Post Added', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Post Modified', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 0, 'In-Bulletin', 'Post Added', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PM.ADD', NULL, 1, 0, 'In-Bulletin', 'New Private Message', 0, 1, 1);
INSERT INTO ItemTypes VALUES (3, 'In-Bulletin', 'bb', 'Topic', 'TopicText', 'OwnerId', 'Views', 'CachedRating', 'la_ItemTab_Topics', 1, '', 'clsTopic', 'Topic');
INSERT INTO ItemTypes VALUES (30, 'In-Bulletin', 'posting', 'Posting', 'Subject', 'CreatedById', NULL, NULL, 'la_ItemTab_Posts', 0, '', '', 'Post');
@@ -213,8 +213,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_emoticon.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_emoticon.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_emoticon.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:configuration_custom.edit', 11, 1, 1, 0);
Index: in-bulletin/install/upgrades.sql
===================================================================
--- in-bulletin/install/upgrades.sql (revision 13557)
+++ in-bulletin/install/upgrades.sql (working copy)
@@ -184,4 +184,7 @@
'Topic_Background1', 'Topic_Background2', 'Post_Background1', 'Post_Background2',
'Posting_SortOrder', 'Bulletin_TopCount', 'Bulletin_CatNewDays', 'Bulletin_Pick_First'
);
-UPDATE ConfigurationValues SET ModuleOwner = 'In-Bulletin' WHERE VariableName = 'BBTags';
\ No newline at end of file
+UPDATE ConfigurationValues SET ModuleOwner = 'In-Bulletin' WHERE VariableName = 'BBTags';
+
+UPDATE Phrase SET Module = 'Core' WHERE Phrase = 'la_fld_Replacement';
+DELETE FROM Permissions WHERE Permission LIKE 'in-bulletin:configuration_email%';
\ No newline at end of file
Index: in-bulletin/units/topics/topics_config.php
===================================================================
--- in-bulletin/units/topics/topics_config.php (revision 13557)
+++ in-bulletin/units/topics/topics_config.php (working copy)
@@ -163,7 +163,7 @@
'PermItemPrefix' => 'TOPIC',
'PermTabText' => 'In-Bulletin',
- 'PermSection' => Array ('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'email' => 'in-bulletin:configuration_email', 'custom' => 'in-bulletin:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'custom' => 'in-bulletin:configuration_custom'),
'Sections' => Array (
/*'in-bulletin' => Array (
@@ -231,24 +231,13 @@
'type' => stTREE,
),
-
- 'in-bulletin:configuration_email' => Array (
- 'parent' => 'in-bulletin:setting_folder',
- 'icon' => 'core:conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 5,
- 'type' => stTREE,
- ),
-
'in-bulletin:configuration_custom' => Array (
'parent' => 'in-bulletin:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 3, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 6,
+ 'priority' => 5,
'type' => stTREE,
),
),
Index: in-commerce/install/english.lang
===================================================================
--- in-commerce/install/english.lang (revision 13558)
+++ in-commerce/install/english.lang (working copy)
@@ -42,7 +42,6 @@
<PHRASE Label="la_BRL" Module="In-Commerce" Type="1">QnJhemlsaWFuIFJlYWw=</PHRASE>
<PHRASE Label="la_BSD" Module="In-Commerce" Type="1">QmFoYW1pYW4gRG9sbGFy</PHRASE>
<PHRASE Label="la_BTN" Module="In-Commerce" Type="1">Tmd1bHRydW0=</PHRASE>
- <PHRASE Label="la_btn_Add" Module="In-Commerce" Type="1">QWRk</PHRASE>
<PHRASE Label="la_btn_AddLocation" Module="In-Commerce" Type="1">QWRkIExvY2F0aW9u</PHRASE>
<PHRASE Label="la_btn_CancelOrder" Module="In-Commerce" Type="1">Q2FuY2VsIE9yZGVy</PHRASE>
<PHRASE Label="la_btn_Order" Module="In-Commerce" Type="1">T3JkZXI=</PHRASE>
@@ -404,13 +403,11 @@
<PHRASE Label="la_fld_QtyReserved" Module="In-Commerce" Type="1">UXR5IFJlc2VydmVk</PHRASE>
<PHRASE Label="la_fld_QtySold" Module="In-Commerce" Type="1">UXR5IFNvbGQ=</PHRASE>
<PHRASE Label="la_fld_RateToPrimary" Module="In-Commerce" Type="1">UmF0ZSBUbyBQcmltYXJ5</PHRASE>
- <PHRASE Label="la_fld_RecipientName" Module="In-Commerce" Type="1">UmVjaXBpZW50J3MgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_RegisteredOn" Module="In-Commerce" Type="1">UmVnaXN0ZXJlZCBPbg==</PHRASE>
<PHRASE Label="la_fld_RemainingAmount" Module="In-Commerce" Type="1">UmVtYWluaW5nIEFtb3VudA==</PHRASE>
<PHRASE Label="la_fld_ReportType" Module="In-Commerce" Type="1">UmVwb3J0IFR5cGU=</PHRASE>
<PHRASE Label="la_fld_SecondDayDelivery" Module="In-Commerce" Type="1">U2Vjb25kIERheQ==</PHRASE>
<PHRASE Label="la_fld_SelectedGroups" Module="In-Commerce" Type="1">U2VsZWN0ZWQgVXNlciBHcm91cHM=</PHRASE>
- <PHRASE Label="la_fld_SenderName" Module="In-Commerce" Type="1">U2VuZGVyJ3MgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_ShipMethod" Module="In-Commerce" Type="1">U2hpcCBNZXRob2Q=</PHRASE>
<PHRASE Label="la_fld_ShippingAddress1" Module="In-Commerce" Type="1">U2hpcHBpbmcgQWRkcmVzcyBMaW5lIDE=</PHRASE>
<PHRASE Label="la_fld_ShippingAddress2" Module="In-Commerce" Type="1">U2hpcHBpbmcgQWRkcmVzcyBMaW5lIDI=</PHRASE>
Index: in-commerce/install/install_data.sql
===================================================================
--- in-commerce/install/install_data.sql (revision 13565)
+++ in-commerce/install/install_data.sql (working copy)
@@ -255,33 +255,33 @@
INSERT INTO CustomField VALUES (DEFAULT, 1, 'p_ItemTemplate', 'la_fld_cust_p_ItemTemplate', 0, 'la_title_SystemCF', 'la_fld_cust_p_ItemTemplate', 'text', NULL, '', 0, 0, 1, 0);
INSERT INTO CustomField VALUES (DEFAULT, 6, 'shipping_addr_block', 'la_fld_BlockShippingAddress', 0, 'la_section_StoreSettings', 'la_fld_BlockShippingAddress', 'checkbox', '1=+Block', '', 0, 1, 1, 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, NULL, 'In-Commerce', 'Order Submitted', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, NULL, 'In-Commerce', 'Order Submitted', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.APPROVE', NULL, 1, 0, NULL, 'In-Commerce', 'Order Approved', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.DENY', NULL, 1, 0, NULL, 'In-Commerce', 'Order Denied', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.SHIP', NULL, 1, 0, NULL, 'In-Commerce', 'Order Shipped', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, NULL, 'In-Commerce', 'Backorder Added', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, NULL, 'In-Commerce', 'Backorder Added', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.FULLFILL', NULL, 1, 0, NULL, 'In-Commerce', 'Back-order is Fulfilled', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.PROCESS', NULL, 1, 0, NULL, 'In-Commerce', 'Backorder Processed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 0, NULL, 'In-Commerce', 'Suggest product to a friend', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 1, NULL, 'In-Commerce', 'Suggest product to a friend', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, NULL, 'In-Commerce', 'Affiliate registered', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, NULL, 'In-Commerce', 'Affiliate registered', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment issued', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment issued', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate registration approved', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 0, 0, NULL, 'In-Commerce', 'Affiliate registration approved', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate registration denied', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 0, 0, NULL, 'In-Commerce', 'Affiliate registration denied', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment type changed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment type changed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Processed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Processed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Denied', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Denied', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, NULL, 'In-Commerce', 'Gift Certificate', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, NULL, 'In-Commerce', 'Gift Certificate', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, 'In-Commerce', 'Order Submitted', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, 'In-Commerce', 'Order Submitted', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.APPROVE', NULL, 1, 0, 'In-Commerce', 'Order Approved', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.DENY', NULL, 1, 0, 'In-Commerce', 'Order Denied', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.SHIP', NULL, 1, 0, 'In-Commerce', 'Order Shipped', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, 'In-Commerce', 'Backorder Added', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, 'In-Commerce', 'Backorder Added', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.FULLFILL', NULL, 1, 0, 'In-Commerce', 'Back-order is Fulfilled', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.PROCESS', NULL, 1, 0, 'In-Commerce', 'Backorder Processed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 0, 'In-Commerce', 'Suggest product to a friend', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 1, 'In-Commerce', 'Suggest product to a friend', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, 'In-Commerce', 'Affiliate registered', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, 'In-Commerce', 'Affiliate registered', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, 'In-Commerce', 'Affiliate payment issued', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, 'In-Commerce', 'Affiliate payment issued', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 1, 0, 'In-Commerce', 'Affiliate registration approved', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 0, 0, 'In-Commerce', 'Affiliate registration approved', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 1, 0, 'In-Commerce', 'Affiliate registration denied', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 0, 0, 'In-Commerce', 'Affiliate registration denied', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, 'In-Commerce', 'Affiliate payment type changed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, 'In-Commerce', 'Affiliate payment type changed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Processed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Processed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Denied', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Denied', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, 'In-Commerce', 'Gift Certificate', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, 'In-Commerce', 'Gift Certificate', 1, 1, 1);
INSERT INTO GatewayConfigFields VALUES (1, 'submit_url', 'Gateway URL', 'text', '', 2);
INSERT INTO GatewayConfigFields VALUES (2, 'user_account', 'Authorize.net User Name', 'text', '', 2);
@@ -424,8 +424,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:incommerce_configemail.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:incommerce_configemail.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.view', 11, 1, 1, 0);
Index: in-commerce/install/upgrades.sql
===================================================================
--- in-commerce/install/upgrades.sql (revision 13565)
+++ in-commerce/install/upgrades.sql (working copy)
@@ -154,4 +154,7 @@
ADD INDEX (PrimaryCurrencyId),
ADD INDEX (Currencies),
ADD INDEX (PrimaryPaymentTypeId),
- ADD INDEX (PaymentTypes);
\ No newline at end of file
+ ADD INDEX (PaymentTypes);
+
+UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_btn_Add', 'la_fld_RecipientName', 'la_fld_SenderName');
+DELETE FROM Permissions WHERE Permission LIKE 'in-commerce:incommerce_configemail%';
\ No newline at end of file
Index: in-commerce/units/products/products_config.php
===================================================================
--- in-commerce/units/products/products_config.php (revision 13557)
+++ in-commerce/units/products/products_config.php (working copy)
@@ -255,7 +255,7 @@
'PermItemPrefix' => 'PRODUCT',
'PermTabText' => 'In-Commerce',
- 'PermSection' => Array ('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'email' => 'in-commerce:incommerce_configemail', 'custom' => 'in-commerce:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'custom' => 'in-commerce:configuration_custom'),
'Sections' => Array (
'in-commerce' => Array (
@@ -323,23 +323,13 @@
'type' => stTREE,
),
- 'in-commerce:incommerce_configemail' => Array (
- 'parent' => 'in-commerce:setting_folder',
- 'icon' => 'core:conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 8,
- 'type' => stTREE,
- ),
-
'in-commerce:configuration_custom' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 9,
+ 'priority' => 8,
'type' => stTREE,
),
Index: in-link/install/install_data.sql
===================================================================
--- in-link/install/install_data.sql (revision 13557)
+++ in-link/install/install_data.sql (working copy)
@@ -63,46 +63,46 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_Link_CatchedVotesQty', '1', 'In-Link', 'in-link:configuration_search', 'la_Text_Link_Search', 'la_Link_CatchedVotesQty', 'checkbox', '', '', 8, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_Link_CatchedReviewsQty', '1', 'In-Link', 'in-link:configuration_search', 'la_Text_Link_Search', 'la_Link_CatchedReviewsQty', 'checkbox', '', '', 9, 0, 1, NULL);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ADD', NULL, 1, 1, NULL, 'In-Link', 'Add Link', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ADD', NULL, 1, 0, NULL, 'In-Link', 'Add Link', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ADD.PENDING', NULL, 1, 0, NULL, 'In-Link', 'Add Pending Link', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ADD.PENDING', NULL, 1, 1, NULL, 'In-Link', 'Add Pending Link', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.MODIFY', NULL, 1, 1, NULL, 'In-Link', 'Modify Link', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.MODIFY', NULL, 1, 0, NULL, 'In-Link', 'Modify Link', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.MODIFY.PENDING', NULL, 1, 0, NULL, 'In-Link', 'Link Modification Pending', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.MODIFY.PENDING', NULL, 1, 1, NULL, 'In-Link', 'Link Modification Pending', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.MODIFY.APPROVE', NULL, 1, 0, NULL, 'In-Link', 'Approve Link Modification', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.MODIFY.DENY', NULL, 1, 0, NULL, 'In-Link', 'Decline link modification', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.APPROVE', NULL, 1, 0, NULL, 'In-Link', 'Approve Pending Link', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.DENY', NULL, 1, 0, NULL, 'In-Link', 'Deny Link', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.REVIEW.ADD', NULL, 1, 1, NULL, 'In-Link', 'Link Comment Added', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.REVIEW.ADD', NULL, 1, 0, NULL, 'In-Link', 'Link Comment Added', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-Link', 'Link Comment Pending', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-Link', 'Link Comment Pending', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.REVIEW.APPROVE', NULL, 1, 0, NULL, 'In-Link', 'Link Comment Approved', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.REVIEW.DENY', NULL, 1, 0, NULL, 'In-Link', 'Link Comment Declined', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement submitted', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement submitted', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.APPROVE', NULL, 0, 0, NULL, 'In-Link', 'Link enhancement approved', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.APPROVE', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement approved', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.DENY', NULL, 0, 0, NULL, 'In-Link', 'Link enhancement denied', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.DENY', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement denied', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.EXPIRE', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement expired', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.EXPIRE', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement expired', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.EXTEND', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement renewal submitted', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.EXTEND', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement renewal submitted', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW', NULL, 0, 0, NULL, 'In-Link', 'Link enhancement extended', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement extended', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW.FAILED', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement renewal failed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW.FAILED', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement renewal failed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.CANCEL', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement cancelled', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.CANCEL', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement cancelled', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.RENEWAL.NOTICE', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement is about to expire', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.ENHANCE.RENEWAL.NOTICE', NULL, 1, 0, NULL, 'In-Link', 'Link enhancement is about to expire', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.CONTACTFORM', NULL, 1, 0, NULL, 'In-Link', 'Link Contact Form', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.CONTACTFORM', NULL, 1, 0, NULL, 'In-Link', 'Link Contact Form', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.RECIPROCAL.CHECK.FAILED', NULL, 1, 0, NULL, 'In-Link', 'Reciprocal Check Failed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'LINK.VALIDATION.RESULTS', NULL, 1, 0, NULL, 'In-Link', 'Link Validation Results', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ADD', NULL, 1, 1, 'In-Link', 'Add Link', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ADD', NULL, 1, 0, 'In-Link', 'Add Link', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ADD.PENDING', NULL, 1, 0, 'In-Link', 'Add Pending Link', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ADD.PENDING', NULL, 1, 1, 'In-Link', 'Add Pending Link', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.MODIFY', NULL, 1, 1, 'In-Link', 'Modify Link', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.MODIFY', NULL, 1, 0, 'In-Link', 'Modify Link', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.MODIFY.PENDING', NULL, 1, 0, 'In-Link', 'Link Modification Pending', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.MODIFY.PENDING', NULL, 1, 1, 'In-Link', 'Link Modification Pending', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.MODIFY.APPROVE', NULL, 1, 0, 'In-Link', 'Approve Link Modification', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.MODIFY.DENY', NULL, 1, 0, 'In-Link', 'Decline link modification', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.APPROVE', NULL, 1, 0, 'In-Link', 'Approve Pending Link', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.DENY', NULL, 1, 0, 'In-Link', 'Deny Link', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.REVIEW.ADD', NULL, 1, 1, 'In-Link', 'Link Comment Added', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.REVIEW.ADD', NULL, 1, 0, 'In-Link', 'Link Comment Added', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.REVIEW.ADD.PENDING', NULL, 1, 0, 'In-Link', 'Link Comment Pending', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.REVIEW.ADD.PENDING', NULL, 1, 0, 'In-Link', 'Link Comment Pending', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.REVIEW.APPROVE', NULL, 1, 0, 'In-Link', 'Link Comment Approved', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.REVIEW.DENY', NULL, 1, 0, 'In-Link', 'Link Comment Declined', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE', NULL, 1, 0, 'In-Link', 'Link enhancement submitted', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE', NULL, 1, 0, 'In-Link', 'Link enhancement submitted', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.APPROVE', NULL, 0, 0, 'In-Link', 'Link enhancement approved', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.APPROVE', NULL, 1, 0, 'In-Link', 'Link enhancement approved', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.DENY', NULL, 0, 0, 'In-Link', 'Link enhancement denied', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.DENY', NULL, 1, 0, 'In-Link', 'Link enhancement denied', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.EXPIRE', NULL, 1, 0, 'In-Link', 'Link enhancement expired', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.EXPIRE', NULL, 1, 0, 'In-Link', 'Link enhancement expired', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.EXTEND', NULL, 1, 0, 'In-Link', 'Link enhancement renewal submitted', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.EXTEND', NULL, 1, 0, 'In-Link', 'Link enhancement renewal submitted', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW', NULL, 0, 0, 'In-Link', 'Link enhancement extended', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW', NULL, 1, 0, 'In-Link', 'Link enhancement extended', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW.FAILED', NULL, 1, 0, 'In-Link', 'Link enhancement renewal failed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.RENEW.FAILED', NULL, 1, 0, 'In-Link', 'Link enhancement renewal failed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.CANCEL', NULL, 1, 0, 'In-Link', 'Link enhancement cancelled', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.CANCEL', NULL, 1, 0, 'In-Link', 'Link enhancement cancelled', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.RENEWAL.NOTICE', NULL, 1, 0, 'In-Link', 'Link enhancement is about to expire', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.ENHANCE.RENEWAL.NOTICE', NULL, 1, 0, 'In-Link', 'Link enhancement is about to expire', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.CONTACTFORM', NULL, 1, 0, 'In-Link', 'Link Contact Form', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.CONTACTFORM', NULL, 1, 0, 'In-Link', 'Link Contact Form', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.RECIPROCAL.CHECK.FAILED', NULL, 1, 0, 'In-Link', 'Reciprocal Check Failed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'LINK.VALIDATION.RESULTS', NULL, 1, 0, 'In-Link', 'Link Validation Results', 1, 1, 1);
INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkAddress', 'lu_fld_LinkAddress', 0, 'la_section_BusinessLocation', 'la_fld_LinkAddress', 'text', 'size="40"', '', 1, 1, 0, 0);
INSERT INTO CustomField VALUES (DEFAULT, 4, 'LinkCity', 'lu_fld_LinkCity', 0, 'la_section_BusinessLocation', 'la_fld_LinkCity', 'text', 'size="40"', '', 2, 1, 0, 0);
@@ -205,8 +205,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_search.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-link:configuration_custom.edit', 11, 1, 1, 0);
Index: in-link/install/upgrades.sql
===================================================================
--- in-link/install/upgrades.sql (revision 13557)
+++ in-link/install/upgrades.sql (working copy)
@@ -90,3 +90,5 @@
UPDATE CustomField
SET ValueList = '=+||<SQL+>SELECT IsoCode AS OptionValue, l%3$s_Name AS OptionName FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY IsoCode ASC</SQL>'
WHERE ValueList = '=+||<SQL>SELECT DestAbbr AS OptionValue, DestName AS OptionName FROM <PREFIX>StdDestinations WHERE DestType = 1 ORDER BY DestAbbr ASC</SQL>';
+
+DELETE FROM Permissions WHERE Permission LIKE 'in-link:configuration_email%';
\ No newline at end of file
Index: in-link/units/links/links_config.php
===================================================================
--- in-link/units/links/links_config.php (revision 13557)
+++ in-link/units/links/links_config.php (working copy)
@@ -287,7 +287,7 @@
'PermItemPrefix' => 'LINK',
'PermTabText' => 'In-Link',
- 'PermSection' => Array ('main' => 'CATEGORY:in-link:links_list', 'search' => 'in-link:configuration_search', 'email' => 'in-link:configuration_email', 'custom' => 'in-link:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-link:links_list', 'search' => 'in-link:configuration_search', 'custom' => 'in-link:configuration_custom'),
'Sections' => Array (
'in-link' => Array (
@@ -365,23 +365,13 @@
'type' => stTREE,
),
- 'in-link:configuration_email' => Array (
- 'parent' => 'in-link:setting_folder',
- 'icon' => 'core:conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 3,
- 'type' => stTREE,
- ),
-
'in-link:configuration_custom' => Array (
'parent' => 'in-link:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 4, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 4,
+ 'priority' => 3,
'type' => stTREE,
),
),
Index: in-news/install/install_data.sql
===================================================================
--- in-news/install/install_data.sql (revision 13557)
+++ in-news/install/install_data.sql (working copy)
@@ -39,24 +39,24 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Increase_articles', '30', 'In-News', 'in-news:configuration_search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_ShowMultiple_articles', '0', 'In-News', 'in-news:configuration_search', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1, NULL);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 1, NULL, 'In-News', 'Add Article', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 0, NULL, 'In-News', 'Add Article', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 1, NULL, 'In-News', 'Article Add Pending', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'Article Add Pending', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 1, NULL, 'In-News', 'Modify Article', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 0, NULL, 'In-News', 'Modify Article', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 1, NULL, 'In-News', 'Article Modify Pending', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 0, NULL, 'In-News', 'Article Modify Pending', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.MODIFY.APPROVE', NULL, 1, 0, NULL, 'In-News', 'Approve Article Modification', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.MODIFY.DENY', NULL, 1, 0, NULL, 'In-News', 'Decline Article Modification', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.APPROVE', NULL, 1, 0, NULL, 'In-News', 'Approve Article', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.DENY', NULL, 1, 0, NULL, 'In-News', 'Decline Article', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 1, NULL, 'In-News', 'Article Comment Added', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 0, NULL, 'In-News', 'Article Comment Added', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.REVIEW.APPROVE', NULL, 1, 0, NULL, 'In-News', 'Article Comment Approved', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.REVIEW.DENY', NULL, 1, 0, NULL, 'In-News', 'Article Comment Declined', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'Article Comment Pending', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, NULL, 'In-News', 'Article Comment Pending', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 1, 'In-News', 'Add Article', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD', NULL, 1, 0, 'In-News', 'Add Article', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 1, 'In-News', 'Article Add Pending', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.ADD.PENDING', NULL, 1, 0, 'In-News', 'Article Add Pending', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 1, 'In-News', 'Modify Article', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY', NULL, 1, 0, 'In-News', 'Modify Article', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 1, 'In-News', 'Article Modify Pending', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.PENDING', NULL, 1, 0, 'In-News', 'Article Modify Pending', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.APPROVE', NULL, 1, 0, 'In-News', 'Approve Article Modification', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.MODIFY.DENY', NULL, 1, 0, 'In-News', 'Decline Article Modification', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.APPROVE', NULL, 1, 0, 'In-News', 'Approve Article', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.DENY', NULL, 1, 0, 'In-News', 'Decline Article', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 1, 'In-News', 'Article Comment Added', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD', NULL, 1, 0, 'In-News', 'Article Comment Added', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.APPROVE', NULL, 1, 0, 'In-News', 'Article Comment Approved', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.DENY', NULL, 1, 0, 'In-News', 'Article Comment Declined', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, 'In-News', 'Article Comment Pending', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'NEWS.REVIEW.ADD.PENDING', NULL, 1, 0, 'In-News', 'Article Comment Pending', 0, 1, 1);
INSERT INTO ItemTypes VALUES (2, 'In-News', 'n', 'News', 'Title', 'CreatedById', 'Hits', 'CachedRating', 'la_ItemTab_News', 1, 'in-news/admin/addarticle.php', 'clsNews', 'Article');
@@ -176,8 +176,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.edit', 11, 1, 1, 0);
Index: in-news/install/upgrades.sql
===================================================================
--- in-news/install/upgrades.sql (revision 13557)
+++ in-news/install/upgrades.sql (working copy)
@@ -79,3 +79,5 @@
'News_User_Notice_New', 'News_User_Notice_Approve', 'News_User_Notice_Deny',
'News_User_Notice_Modify', 'News_User_Notice_Modify_Approve', 'News_User_Notice_Modify_Deny'
);
+
+DELETE FROM Permissions WHERE Permission LIKE 'in-news:configuration_email%';
\ No newline at end of file
Index: in-news/units/articles/articles_config.php
===================================================================
--- in-news/units/articles/articles_config.php (revision 13557)
+++ in-news/units/articles/articles_config.php (working copy)
@@ -204,7 +204,7 @@
'PermItemPrefix' => 'NEWS',
'PermTabText' => 'In-News',
- 'PermSection' => Array ('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'email' => 'in-news:configuration_email', 'custom' => 'in-news:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-news:articles_list', 'search' => 'in-news:configuration_search', 'custom' => 'in-news:configuration_custom'),
'Sections' => Array (
/*'in-news' => Array (
@@ -272,23 +272,13 @@
'type' => stTREE,
),
- 'in-news:configuration_email' => Array (
- 'parent' => 'in-news:setting_folder',
- 'icon' => 'core:conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 3,
- 'type' => stTREE,
- ),
-
'in-news:configuration_custom' => Array (
'parent' => 'in-news:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 2, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 4,
+ 'priority' => 3,
'type' => stTREE,
),
email_event_recipient_core_v2.patch [^] (141,688 bytes) 2010-05-22 03:46
[Show Content]
Index: admin/system_presets/simple/email_events_emailevents.php
===================================================================
--- admin/system_presets/simple/email_events_emailevents.php (revision 13557)
+++ admin/system_presets/simple/email_events_emailevents.php (working copy)
@@ -14,45 +14,51 @@
// toolbar buttons
$remove_buttons = Array (
-// list of all email templates (direct list)
-// 'email_messages_direct_list' => Array ('edit', 'view', 'dbl-click'),
+// list of all email templates
+// 'email_message_list' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'frontend_mail', 'view', 'dbl-click'),
-// edit email body direct
-// 'email_messages_edit_direct' => Array ('select', 'cancel', 'reset_edit'),
+// edit email edit - general tab
+// 'email_message_edit' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+
+// edit email edit - settings tab
+// 'email_message_edit_settings' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
);
// fields to hide
$hidden_fields = Array (
- /*'EventId', 'Event',*/ 'Headers', /*'ReplacementTags', 'Subject', 'Body',*/
- 'MessageType', 'Enabled', 'FrontEndOnly', 'FromUserId', /*'Module',
- 'Description', 'Type',*/
+ /*'EventId', 'Event', 'ReplacementTags', 'AllowChangingSender', 'CustomSender',
+ 'SenderName', 'SenderAddressType', 'SenderAddress', 'AllowChangingRecipient',
+ 'CustomRecipient', 'Recipients', 'Subject', 'Body', 'Headers', 'MessageType',
+ 'Enabled', 'FrontEndOnly', 'Module', 'Description', 'Type'*/
);
// virtual fields to hide
$virtual_hidden_fields = Array (
-
+ /*'RecipientType', 'RecipientName', 'RecipientAddressType',
+ 'RecipientAddress', 'Tag', 'Replacement', 'ReplacementTagsXML',*/
);
// fields to make required
$required_fields = Array (
- 'EventId', 'Event', /*'Headers', 'ReplacementTags',*/ 'Subject', 'Body',
- 'MessageType', /*'Enabled', 'FrontEndOnly', 'FromUserId',*/ 'Module',
- /*'Description',*/ 'Type',
+ /*'EventId',*/ 'Event', /*'ReplacementTags', 'AllowChangingSender', 'CustomSender',
+ 'SenderName', 'SenderAddressType', 'SenderAddress', 'AllowChangingRecipient',
+ 'CustomRecipient', 'Recipients',*/ 'Subject', 'Body', /*'Headers',*/ 'MessageType',
+ /*'Enabled', 'FrontEndOnly',*/ 'Module', /*'Description',*/ 'Type'
);
// virtual fields to make required
$virtual_required_fields = Array (
-
+ /*'RecipientType', 'RecipientName', 'RecipientAddressType',
+ 'RecipientAddress', 'Tag', 'Replacement', 'ReplacementTagsXML',*/
);
// tabs during editing
$hide_edit_tabs = Array (
-
+ 'Default' => Array (/*'general',*/ 'settings'),
);
// hide columns in grids
$hide_columns = Array (
-// currently not in user
-// 'Default' => Array ('Subject', 'Description', 'Type', ),
-// 'Emails' => Array ('EventId', 'Subject', 'Description', 'Type', ),
+// 'Default' => Array ('EventId', 'Description', 'Event', 'Module', 'Type', 'Enabled'),
+// 'Emails' => Array ('EventId', 'Event', 'Subject', 'Description', 'Type', 'Enabled', 'Module', 'FrontEndOnly'),
);
\ No newline at end of file
Index: admin/system_presets/simple/email_messages_emailmessages.php
===================================================================
--- admin/system_presets/simple/email_messages_emailmessages.php (revision 13557)
+++ admin/system_presets/simple/email_messages_emailmessages.php (working copy)
@@ -1,56 +1,3 @@
<?php
- defined('FULL_PATH') or die('restricted access!');
-
- // section removal
- $remove_sections = Array (
-// 'in-portal:configemail',
- );
-
- // sections shown with debug on
- $debug_only_sections = Array (
- 'in-portal:configemail',
- );
-
- // toolbar buttons
- $remove_buttons = Array (
-// list of all email templates (direct list)
-// 'email_messages_direct_list' => Array ('edit', 'view', 'dbl-click'),
-
-// edit email body direct
-// 'email_messages_edit_direct' => Array ('select', 'cancel', 'reset_edit'),
- );
-
- // fields to hide
- $hidden_fields = Array (
- /*'EmailMessageId', 'Template',*/ 'MessageType', /*'LanguageId', 'EventId', 'Subject' */
- );
-
- // virtual fields to hide
- $virtual_hidden_fields = Array (
- 'Headers',/* 'Body', 'ReplacementTags', 'Description', 'Module', 'Type', 'MassSubject', 'MassAttachment',
- 'MassHtmlMessage', 'MassTextMessage', */
- );
-
- // fields to make required
- $required_fields = Array (
- /*'EmailMessageId', 'Template', 'MessageType', 'LanguageId', 'EventId', 'Subject' */
- );
-
- // virtual fields to make required
- $virtual_required_fields = Array (
- /* 'Headers', 'Body', 'ReplacementTags', 'Description', 'Module', 'Type', 'MassSubject', 'MassAttachment',
- 'MassHtmlMessage', 'MassTextMessage', */
- );
-
- // tabs during editing
- $hide_edit_tabs = Array (
-
- );
-
- // hide columns in grids
- $hide_columns = Array (
-// currently not in user
-// 'Default' => Array ('Subject', 'Description', 'Type', ),
-// 'Emails' => Array ('EventId', 'Subject', 'Description', 'Type', 'LanguageId', ),
- );
\ No newline at end of file
+ // TO REMOVE
\ No newline at end of file
Index: core/admin_templates/incs/style_template.css
===================================================================
--- core/admin_templates/incs/style_template.css (revision 13557)
+++ core/admin_templates/incs/style_template.css (working copy)
@@ -663,4 +663,21 @@
.tree tr td a.debug-only-item {
color: grey;
+}
+
+/* Ajax Dropdown */
+.suggest-box {
+ border: 1px solid #999;
+ background-color: #fff;
+}
+
+.suggest-item, .suggest-item-over {
+ padding: 1px 2px 0px 2px;
+ font-family: arial,verdana;
+ font-size: 12px;
+}
+
+.suggest-item-over {
+ background-color: #3366CC;
+ color: #fff;
}
\ No newline at end of file
Index: core/admin_templates/languages/email_message_edit.tpl
===================================================================
--- core/admin_templates/languages/email_message_edit.tpl (revision 13557)
+++ core/admin_templates/languages/email_message_edit.tpl (working copy)
@@ -1,7 +1,7 @@
<inp2:adm_SetPopupSize width="875" height="650"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_messages_edit_direct"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_message_edit" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
@@ -26,8 +26,22 @@
}
) );
+ <inp2:m_if check="emailevents_IsSingle" inverse="inverse">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ </inp2:m_if>
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_NextId/>');
+ }
+ ) );
+
a_toolbar.Render();
+ <inp2:m_RenderElement name="edit_navigation" prefix="emailevents"/>
</script>
</td>
@@ -38,26 +52,28 @@
<inp2:emailevents_SaveWarning name="grid_save_warning"/>
<inp2:emailevents_ErrorWarning name="form_error_warning"/>
-<inp2:m_RenderElement name="inp_edit_hidden" prefix="emailevents" field="EventId"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="EventId,Event,Subject,Enabled,FrontEndOnly,FromUserId,Module,Description,Type,MessageType,Headers" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="EventId,Description,Subject" title="!la_section_General!"/>
<inp2:m_RenderElement name="inp_id_label" prefix="emailevents" field="EventId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Event" title="la_fld_Event"/>
+
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Event" title="la_fld_Event"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="Event" title="la_fld_Event"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="Description" title="la_fld_Description"/>
<inp2:m_RenderElement name="inp_edit_box_ml" prefix="emailevents" field="Subject" format="no_default" title="la_fld_Subject"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Description" title="la_fld_Description" control_options="{max_height: 50}"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Headers" title="la_fld_ExtraHeaders" control_options="{max_height: 50}"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="Enabled" title="la_fld_Enabled"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="FrontEndOnly" title="la_fld_FrontEndOnly"/>
- <inp2:m_RenderElement name="inp_edit_user" prefix="emailevents" field="FromUserId" title="la_fld_FromToUser"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="Type" title="la_fld_Type"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="emailevents" field="Module" title="la_fld_Module" has_empty="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="MessageType" title="la_fld_MessageType"/>
<inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Body" title="!la_section_Message!"/>
- <inp2:m_RenderElement name="inp_edit_fck" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" rows="5" cols="60" control_options="{min_height: 200}"/>
- <!-- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" control_options="{min_height: 200}"/> -->
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" control_options="{min_height: 200}"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_fck" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" rows="5" cols="60" control_options="{min_height: 200}"/>
+ </inp2:m_if>
+
<inp2:m_RenderElement name="inp_edit_filler" control_options="{max_height: 8}"/>
</table>
</div>
Index: core/admin_templates/languages/email_message_list.tpl
===================================================================
--- core/admin_templates/languages/email_message_list.tpl (revision 13557)
+++ core/admin_templates/languages/email_message_list.tpl (working copy)
@@ -1,6 +1,6 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" pagination="1" prefix="emailevents" grid="Emails" title_preset="email_messages_direct_list" additional_blue_bar_render_as="grid_ml_selector"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" pagination="1" prefix="emailevents" grid="Emails" title_preset="email_message_list" additional_blue_bar_render_as="grid_ml_selector"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
@@ -14,30 +14,41 @@
a_toolbar = new ToolBar();
- a_toolbar.AddButton(
- new ToolBarButton(
- 'new_item',
- '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
- function() {
- std_precreate_item('emailevents', 'languages/email_message_edit');
- }
- )
- );
+ <inp2:m_if check="m_IsDebugMode">
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'new_item',
+ '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('emailevents', 'languages/email_message_edit');
+ }
+ )
+ );
+ </inp2:m_if>
- 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('emailevents');
- }
+ 'edit',
+ '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>',
+ edit
)
);
<inp2:m_if check="m_IsDebugMode">
- a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'delete',
+ '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('emailevents');
+ }
+ )
+ );
+ </inp2:m_if>
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ <inp2:m_if check="m_IsDebugMode">
a_toolbar.AddButton(
new ToolBarButton(
'approve',
@@ -59,12 +70,27 @@
);
</inp2:m_if>
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'frontend_mail',
+ '<inp2:m_phrase label="la_ToolTip_Email_FrontOnly" escape="1"/>',
+ function() {
+ submit_event('emailevents', 'OnFrontOnly');
+ }
+ )
+ );
+
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'view',
+ '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
+ function() {
show_viewmenu(a_toolbar,'view');
}
- ) );
+ )
+ );
a_toolbar.Render();
@@ -93,6 +119,6 @@
<inp2:m_RenderElement name="grid" PrefixSpecial="emailevents" IdField="EventId" grid="Emails" row_class_render_as="row_class"/>
<script type="text/javascript">
- Grids['emailevents'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline') );
+ Grids['emailevents'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline', 'frontend_mail') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: core/admin_templates/languages/email_message_settings.tpl
===================================================================
--- core/admin_templates/languages/email_message_settings.tpl (revision 0)
+++ core/admin_templates/languages/email_message_settings.tpl (revision 0)
@@ -0,0 +1,301 @@
+<inp2:adm_SetPopupSize width="875" height="650"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_message_edit_settings" 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('emailevents','<inp2:emailevents_SaveEvent/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ cancel_edit('emailevents','OnCancelEdit','<inp2:emailevents_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('emailevents', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ }
+ ) );
+
+ <inp2:m_if check="emailevents_IsSingle" inverse="inverse">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ </inp2:m_if>
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_NextId/>');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_RenderElement name="edit_navigation" prefix="emailevents"/>
+ </script>
+ </td>
+
+ <inp2:m_RenderElement name="ml_selector" prefix="emailevents"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:emailevents_SaveWarning name="grid_save_warning"/>
+<inp2:emailevents_ErrorWarning name="form_error_warning"/>
+
+<inp2:m_DefineElement name="inp_edit_combo_target" caption_render_as="default_field_caption_element" read_only="0" has_empty="" hint_label="">
+ <inp2:m_if check="{$prefix}_FieldVisible" field="$field">
+ <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" id="<inp2:$prefix_InputName field='$field'/>_row">
+ <inp2:m_RenderElement name="inp_edit_field_caption" caption_render_as="$caption_render_as" prefix="$prefix" field="$field" title="$title" hint_label="$hint_label"/>
+ <td class="control-cell">
+ <inp2:m_if check="m_Param" name="read_only">
+ <inp2:$prefix_Field name="{$field}Type"/>: "<inp2:$prefix_Field name="$field"/>"
+ <inp2:m_else/>
+ <select tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:{$prefix}_InputName field='{$field}Type'/>" id="<inp2:{$prefix}_InputName field='{$field}Type'/>">
+ <inp2:{$prefix}_PredefinedOptions field="{$field}Type" block="inp_option_phrase" selected="selected" has_empty="$has_empty"/>
+ </select>
+
+ <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'/>" style="width: 250px;"/>
+ </inp2:m_if>
+
+ <script type="text/javascript">
+ fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>Type'] = '<inp2:m_phrase label="{$title}Type" js_escape="1"/>'
+
+ new AJAXDropDown(
+ '<inp2:$prefix_InputName name="$field" js_escape="1"/>',
+ function(cur_value) {
+ var $type = $( jq('#<inp2:$prefix_InputName name="{$field}Type" js_escape="1"/>') ).val();
+
+ if ( !isNaN( parseInt($type) ) ) {
+ var $url = '<inp2:m_Link template="dummy" pass="m,$prefix" {$prefix}_event="OnSuggestAddress" value="#VALUE#" type="#TYPE#" no_amp="1"/>';
+
+ return $url.replace('#VALUE#', encodeURIComponent(cur_value)).replace('#TYPE#', encodeURIComponent($type));
+ }
+
+ return false;
+ }
+ );
+
+ $(document).ready(
+ function () {
+ $( jq('#<inp2:$prefix_InputName name="{$field}Type"/>') ).change(
+ function ($e) {
+ var $me = $(this);
+
+ if ($me.attr('disabled')) {
+ return ;
+ }
+
+ var $type_selected = !isNaN( parseInt( $me.val() ) );
+ $( jq('#<inp2:$prefix_InputName name="$field"/>') ).attr('disabled', $type_selected ? '' : 'disabled');
+ }
+ )
+ .change();
+ }
+ );
+ </script>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+ </tr>
+ </inp2:m_if>
+</inp2:m_DefineElement>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="AllowChangingSender,CustomSender,SenderAddress,SenderAddressType,SenderName" title="la_section_SenderInfo"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="AllowChangingSender" title="la_fld_AllowChangingSender"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingSender">
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="CustomSender" title="la_fld_CustomSender"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="SenderAddress" title="la_fld_SenderAddress" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="SenderName" title="la_fld_SenderName" style="width: 318px;"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="CustomSender" title="la_fld_CustomSender"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="SenderAddress" title="la_fld_SenderAddress" read_only="1"/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="SenderName" title="la_fld_SenderName"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="AllowChangingRecipient,CustomRecipient,RecipientType,RecipientAddress,RecipientAddressType,RecipientName,Recipients" title="la_section_RecipientsInfo"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="AllowChangingRecipient" title="la_fld_AllowChangingRecipient"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="CustomRecipient" title="la_fld_CustomRecipient"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="CustomRecipient" title="la_fld_CustomRecipient"/>
+ <inp2:emailevents_RemoveToRecipientType/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="RecipientType" title="la_fld_RecipientType"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="RecipientAddress" title="la_fld_RecipientAddress" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="RecipientName" title="la_fld_RecipientName" style="width: 318px;"/>
+ <inp2:m_RenderElement name="inp_edit_minput" prefix="emailevents" field="Recipients" title="la_fld_Recipients" format="auto" style="width: 400px; height: 150px;"/>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Tag,Replacement,ReplacementTagsXML" title="la_section_ReplacementTags"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Tag" title="la_fld_Tag"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Replacement" title="la_fld_Replacement"control_options="{height: 60}"/>
+ <inp2:m_RenderElement name="inp_edit_minput" prefix="emailevents" field="ReplacementTagsXML" title="la_fld_ReplacementTags" allow_move="0" format="#Tag# = #Replacement#" style="width: 600px; height: 100px;"/>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Enabled,Description,FrontEndOnly,Type,MessageType,Headers,Module" title="!la_section_General!"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="Enabled" title="la_fld_Enabled"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Description" title="la_fld_Description" control_options="{max_height: 50}"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="FrontEndOnly" title="la_fld_FrontEndOnly"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="Type" title="la_fld_Type"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="MessageType" title="la_fld_MessageType"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Headers" title="la_fld_ExtraHeaders" control_options="{max_height: 50}"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="emailevents" field="Module" title="la_fld_Module" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<script type="text/javascript">
+ <inp2:m_if check="emailevents_FieldVisible" field="Recipients">
+ // recipients
+ Recipients.formatLine = function($record_index) {
+ if (this.Records[$record_index]['RecipientName']) {
+ // name specified
+ if (this.Records[$record_index]['RecipientAddressType'] == 1) {
+ // email
+ this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#>';
+ }
+ else {
+ // other
+ this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#> - #RecipientAddressType#';
+ }
+ }
+ else {
+ // name not specified
+ this.ResultMask = '#RecipientType#: #RecipientAddress# - #RecipientAddressType#';
+ }
+
+ return MultiInputControl.prototype.formatLine.call(this, $record_index);
+ }
+
+ Recipients.compareRecords = function($record_a, $record_b) {
+ var $equals = true;
+ var $compare_fields = ['RecipientAddressType', 'RecipientAddress'];
+
+ for (var $i = 0; $i < $compare_fields.length; $i++) {
+ var $field_name = $compare_fields[$i];
+
+ if ($record_a[$field_name] !== $record_b[$field_name]) {
+ return false;
+ }
+ }
+
+ return $equals;
+ }
+
+ <inp2:m_ifnot check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ Recipients.isReadOnly = function($record_index) {
+ return this.Records[$record_index]['RecipientType'] == <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>;
+ }
+
+ <inp2:emailevents_RestoreRecipientType/>
+ Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientType" strip_nl="2"/>, 'default': <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>});
+ <inp2:m_else/>
+ Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientType" strip_nl="2"/>, 'default': <inp2:emailevents_FieldOption field="RecipientType" option="default"/>});
+ </inp2:m_ifnot>
+
+ Recipients.registerControl('RecipientAddressType', {type: 'select', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientAddressType" strip_nl="2"/>, 'default': <inp2:emailevents_FieldOption field="RecipientAddressType" option="default"/>});
+ Recipients.registerControl('RecipientAddress', {type: 'textbox', required: true, 'default': '<inp2:emailevents_FieldOption field="RecipientAddress" option="default" js_escape="1"/>'});
+ Recipients.registerControl('RecipientName', {type: 'textbox', required: false, 'default': '<inp2:emailevents_FieldOption field="RecipientName" option="default" js_escape="1"/>'});
+ Recipients.LoadValues();
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_FieldVisible" field="ReplacementTagsXML">
+ // replacement tags
+ ReplacementTagsXML.formatLine = function($record_index) {
+ var $ret = MultiInputControl.prototype.formatLine.call(this, $record_index, false);
+
+ if ($ret.length > 80) {
+ $ret = $ret.substring(0, 80) + ' ...';
+ }
+
+ return this.htmlspecialchars($ret);
+ }
+
+ ReplacementTagsXML.compareRecords = function($record_a, $record_b) {
+ return $record_a['Tag'] == $record_b['Tag'];
+ }
+
+ ReplacementTagsXML.registerControl('Tag', 'textbox', true);
+ ReplacementTagsXML.registerControl('Replacement', 'textbox', true);
+ ReplacementTagsXML.LoadValues();
+ </inp2:m_if>
+
+ // reflect custom sender & custom recipient radio button-dependent controls
+ var $field_mask = '<inp2:emailevents_InputName name="#FIELD_NAME#" js_escape="1"/>';
+
+ function reflectCustomSender() {
+ var $default_sender = get_control($field_mask, 'CustomSender', '0').checked;
+ var $type = get_control($field_mask, 'SenderAddressType');
+
+ $type.disabled = $default_sender;
+ get_control($field_mask, 'SenderAddress').disabled = $default_sender;
+ get_control($field_mask, 'SenderName').disabled = $default_sender;
+
+ $($type).change();
+ }
+
+ function reflectCustomRecipient() {
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ var $default_recipient = get_control($field_mask, 'CustomRecipient', '0').checked;
+ var $to_recipient = get_control($field_mask, 'RecipientType', <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>);
+ <inp2:m_else/>
+ var $default_recipient = <inp2:m_if check="emailevents_Field" name="CustomRecipient" db="db" equals_to="0">true<inp2:m_else/>false</inp2:m_if>;
+ </inp2:m_if>
+
+ if ($default_recipient) {
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ if ($to_recipient.checked) {
+ get_control($field_mask, 'RecipientType', <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>).checked = true;
+ }
+ </inp2:m_if>
+
+ Recipients.registerControl('RecipientType', {'default': <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>}, true);
+ }
+ else {
+ Recipients.registerControl('RecipientType', {'default': <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>}, true);
+ }
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ $to_recipient.disabled = $default_recipient;
+ </inp2:m_if>
+ }
+
+ reflectCustomSender();
+ reflectCustomRecipient();
+
+ $(document).ready(
+ function () {
+ $("input[name='" + jq($field_mask.replace('#FIELD_NAME#', 'CustomSender')) + "']").click(reflectCustomSender);
+ $("input[name='" + jq($field_mask.replace('#FIELD_NAME#', 'CustomRecipient')) + "']").click(reflectCustomRecipient);
+ }
+ );
+
+ // enable all disabled controls before submit
+ Application.setHook('emailevents:*',
+ function () {
+ $(':input:disabled').attr('disabled', '');
+ }
+ )
+</script>
+
+<inp2:m_include t="incs/footer"/>
Index: core/install/english.lang
===================================================================
--- core/install/english.lang (revision 13559)
+++ core/install/english.lang (working copy)
@@ -16,6 +16,7 @@
<PHRASE Label="la_AvailableItems" Module="Core" Type="1">QXZhaWxhYmxlIEl0ZW1z</PHRASE>
<PHRASE Label="la_Background" Module="Core" Type="1">QmFja2dyb3VuZA==</PHRASE>
<PHRASE Label="la_Borders" Module="Core" Type="1">Qm9yZGVycw==</PHRASE>
+ <PHRASE Label="la_btn_Add" Module="Core" Type="1">QWRk</PHRASE>
<PHRASE Label="la_btn_BrowseMode" Module="Core" Type="1">QnJvd3NlIE1vZGU=</PHRASE>
<PHRASE Label="la_btn_Cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
<PHRASE Label="la_btn_Change" Module="Core" Type="1">Q2hhbmdl</PHRASE>
@@ -86,7 +87,6 @@
<PHRASE Label="la_col_FilePath" Module="Core" Type="1">UGF0aA==</PHRASE>
<PHRASE Label="la_col_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
<PHRASE Label="la_col_FromEmail" Module="Core" Type="1">RnJvbSBFLW1haWw=</PHRASE>
- <PHRASE Label="la_col_FromToUser" Module="Core" Type="1">RnJvbSAvIFRvIFVzZXI=</PHRASE>
<PHRASE Label="la_col_FrontEndOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_col_FrontRegistration" Module="Core" Type="1">QWxsb3cgUmVnaXN0cmF0aW9u</PHRASE>
<PHRASE Label="la_col_GroupName" Module="Core" Type="1">R3JvdXAgTmFtZQ==</PHRASE>
@@ -307,6 +307,7 @@
<PHRASE Label="la_error_copy_subcategory" Module="Core" Type="1">RXJyb3IgY29weWluZyBzdWJzZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_error_CustomExists" Module="Core" Type="1">Q3VzdG9tIGZpZWxkIHdpdGggaWRlbnRpY2FsIG5hbWUgYWxyZWFkeSBleGlzdHM=</PHRASE>
<PHRASE Label="la_error_FileTooLarge" Module="Core" Type="1">RmlsZSBpcyB0b28gbGFyZ2U=</PHRASE>
+ <PHRASE Label="la_error_GroupNotFound" Module="Core" Type="1">Z3JvdXAgbm90IGZvdW5k</PHRASE>
<PHRASE Label="la_error_InvalidFileFormat" Module="Core" Type="1">SW52YWxpZCBGaWxlIEZvcm1hdA==</PHRASE>
<PHRASE Label="la_error_invalidoption" Module="Core" Type="1">aW52YWxpZCBvcHRpb24=</PHRASE>
<PHRASE Label="la_error_LoginFailed" Module="Core" Type="1">TG9naW4gRmFpbGVk</PHRASE>
@@ -353,6 +354,8 @@
<PHRASE Label="la_fld_AdminInterfaceLang" Module="Core" Type="1">QWRtaW4gUHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_fld_AdvancedCSS" Module="Core" Type="1">QWR2YW5jZWQgQ1NT</PHRASE>
<PHRASE Label="la_fld_AdvancedSearch" Module="Core" Type="1">QWR2YW5jZWQgU2VhcmNo</PHRASE>
+ <PHRASE Label="la_fld_AllowChangingRecipient" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgIlRvIiBSZWNpcGllbnQ=</PHRASE>
+ <PHRASE Label="la_fld_AllowChangingSender" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgU2VuZGVy</PHRASE>
<PHRASE Label="la_fld_AltValue" Module="Core" Type="1">QWx0IFZhbHVl</PHRASE>
<PHRASE Label="LA_FLD_ATTACHMENT" Module="Core" Type="1">QXR0YWNobWVudA==</PHRASE>
<PHRASE Label="la_fld_AutoCreateFileName" Module="Core" Type="1">QXV0byBDcmVhdGUgRmlsZSBOYW1l</PHRASE>
@@ -394,6 +397,8 @@
<PHRASE Label="la_fld_CSS" Module="Core" Type="1">Q1NTIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_Cursor" Module="Core" Type="1">Q3Vyc29y</PHRASE>
<PHRASE Label="la_fld_CustomDetailTemplate" Module="Core" Type="1">Q3VzdG9tIERldGFpbHMgVGVtcGxhdGU=</PHRASE>
+ <PHRASE Label="la_fld_CustomRecipient" Module="Core" Type="1">U2VuZCBFbWFpbCBUbw==</PHRASE>
+ <PHRASE Label="la_fld_CustomSender" Module="Core" Type="1">U2VuZCBFbWFpbCBGcm9t</PHRASE>
<PHRASE Label="la_fld_CustomTemplate" Module="Core" Type="1">DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KRGV0YWlscyBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_DateFormat" Module="Core" Type="1">RGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_DecimalPoint" Module="Core" Type="1">RGVjaW1hbCBQb2ludA==</PHRASE>
@@ -453,7 +458,6 @@
<PHRASE Label="la_fld_FormSubmittedTemplate" Module="Core" Type="1">T25saW5lIEZvcm0gU3VibWl0dGVkIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_FriendlyURL" Module="Core" Type="1">U2hvcnQgVVJM</PHRASE>
<PHRASE Label="la_fld_FromEmail" Module="Core" Type="1">RnJvbSBFbWFpbA==</PHRASE>
- <PHRASE Label="la_fld_FromToUser" Module="Core" Type="1">RnJvbSAvIFRvIFVzZXI=</PHRASE>
<PHRASE Label="la_fld_FrontEndOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_fld_FrontRegistration" Module="Core" Type="1">QWxsb3cgUmVnaXN0cmF0aW9uIG9uIEZyb250LWVuZA==</PHRASE>
<PHRASE Label="la_fld_GroupId" Module="Core" Type="1">SUQ=</PHRASE>
@@ -557,12 +561,18 @@
<PHRASE Label="la_fld_Priority" Module="Core" Type="1">T3JkZXI=</PHRASE>
<PHRASE Label="la_fld_Qty" Module="Core" Type="1">UXVhbnRpdHk=</PHRASE>
<PHRASE Label="la_fld_Rating" Module="Core" Type="1">UmF0aW5n</PHRASE>
+ <PHRASE Label="la_fld_RecipientAddress" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcw==</PHRASE>
+ <PHRASE Label="la_fld_RecipientAddressType" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcyBUeXBl</PHRASE>
+ <PHRASE Label="la_fld_RecipientName" Module="Core" Type="1">UmVjaXBpZW50J3MgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_fld_Recipients" Module="Core" Type="1">UmVjaXBpZW50cw==</PHRASE>
+ <PHRASE Label="la_fld_RecipientType" Module="Core" Type="1">UmVjaXBpZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_fld_RedirectOnIPMatch" Module="Core" Type="1">Rm9yY2UgUmVkaXJlY3QgKHdoZW4gdXNlcidzIElQIG1hdGNoZXMp</PHRASE>
<PHRASE Label="la_fld_ReferrerURL" Module="Core" Type="1">UmVmZXJyZXIgVVJM</PHRASE>
<PHRASE Label="la_fld_RelatedSearchKeyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
<PHRASE Label="la_fld_RelationshipType" Module="Core" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_fld_RemoteUrl" Module="Core" Type="1">UmVtb3RlIFVSTA==</PHRASE>
<PHRASE Label="la_fld_ReplaceDuplicates" Module="Core" Type="1">UmVwbGFjZSBEdXBsaWNhdGVz</PHRASE>
+ <PHRASE Label="la_fld_Replacement" Module="Core" Type="1">UmVwbGFjZW1lbnQ=</PHRASE>
<PHRASE Label="la_fld_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
<PHRASE Label="la_fld_RepliedOn" Module="Core" Type="1">UmVwbGllZCBPbg==</PHRASE>
<PHRASE Label="la_fld_ReplyBcc" Module="Core" Type="1">UmVwbHkgQmNj</PHRASE>
@@ -583,6 +593,8 @@
<PHRASE Label="la_fld_SelectorData" Module="Core" Type="1">U3R5bGU=</PHRASE>
<PHRASE Label="la_fld_SelectorId" Module="Core" Type="1">U2VsZWN0b3IgSUQ=</PHRASE>
<PHRASE Label="la_fld_SelectorName" Module="Core" Type="1">U2VsZWN0b3IgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_fld_SenderAddress" Module="Core" Type="1">U2VuZGVyJ3MgQWRkcmVzcw==</PHRASE>
+ <PHRASE Label="la_fld_SenderName" Module="Core" Type="1">U2VuZGVyJ3MgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SentOn" Module="Core" Type="1">U2VudCBPbg==</PHRASE>
<PHRASE Label="la_fld_SentStatus" Module="Core" Type="1">U2VudA==</PHRASE>
<PHRASE Label="la_fld_Server" Module="Core" Type="1">U2VydmVy</PHRASE>
@@ -603,6 +615,7 @@
<PHRASE Label="la_fld_SuggestedCorrection" Module="Core" Type="1">U3VnZ2VzdGVkIENvcnJlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_SymLinkCategoryId" Module="Core" Type="1">UG9pbnRzIHRvIFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_TableName" Module="Core" Type="1">VGFibGUgTmFtZSBpbiBEYXRhYmFzZSA=</PHRASE>
+ <PHRASE Label="la_fld_Tag" Module="Core" Type="1">VGFn</PHRASE>
<PHRASE Label="la_fld_TargetId" Module="Core" Type="1">SXRlbQ==</PHRASE>
<PHRASE Label="la_fld_TemplateFile" Module="Core" Type="1">VGVtcGxhdGUgRmlsZQ==</PHRASE>
<PHRASE Label="la_fld_TemplateType" Module="Core" Type="1">VGVtcGxhdGU=</PHRASE>
@@ -730,7 +743,10 @@
<PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_opt_CurrentDomain" Module="Core" Type="1">Q3VycmVudCBEb21haW4=</PHRASE>
+ <PHRASE Label="la_opt_CustomRecipients" Module="Core" Type="1">Q3VzdG9tICJUbyIgUmVjaXBpZW50KC1zKQ==</PHRASE>
+ <PHRASE Label="la_opt_CustomSender" Module="Core" Type="1">Q3VzdG9tIFNlbmRlcg==</PHRASE>
<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
+ <PHRASE Label="la_opt_DefaultAddress" Module="Core" Type="1">RGVmYXVsdCBXZWJzaXRlIGFkZHJlc3M=</PHRASE>
<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
<PHRASE Label="la_opt_Description" Module="Core" Type="1">RGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="la_opt_Disabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
@@ -744,6 +760,7 @@
<PHRASE Label="la_opt_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVXJs</PHRASE>
<PHRASE Label="la_opt_Failed" Module="Core" Type="1">RmFpbGVk</PHRASE>
<PHRASE Label="la_opt_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_opt_Group" Module="Core" Type="1">R3JvdXA=</PHRASE>
<PHRASE Label="la_opt_GuestsOnly" Module="Core" Type="1">R3Vlc3RzIE9ubHk=</PHRASE>
<PHRASE Label="la_opt_hour" Module="Core" Type="1">aG91cihzKQ==</PHRASE>
<PHRASE Label="la_opt_InheritFromParent" Module="Core" Type="1">SW5oZXJpdCBmcm9tIFBhcmVudA==</PHRASE>
@@ -960,7 +977,11 @@
<PHRASE Label="la_section_Page" Module="Core" Type="1">U2VjdGlvbiBQcm9wZXJ0aWVz</PHRASE>
<PHRASE Label="la_section_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
<PHRASE Label="la_section_QuickLinks" Module="Core" Type="1">UXVpY2sgTGlua3M=</PHRASE>
+ <PHRASE Label="la_section_RecipientsInfo" Module="Core" Type="1">UmVjaXBpZW50cyBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_section_Relation" Module="Core" Type="1">UmVsYXRpb24=</PHRASE>
+ <PHRASE Label="la_section_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
+ <PHRASE Label="la_section_SenderInfo" Module="Core" Type="1">U2VuZGVyIEluZm9ybWF0aW9u</PHRASE>
+ <PHRASE Label="la_section_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_section_SettingsAdmin" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsCSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydCBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsMailling" Module="Core" Type="1">TWFpbGluZyBTZXR0aW5ncw==</PHRASE>
@@ -1054,6 +1075,7 @@
<PHRASE Label="la_Tab_Service" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
<PHRASE Label="la_tab_SessionLog" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
<PHRASE Label="la_tab_SessionLogs" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
+ <PHRASE Label="la_tab_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_tab_ShowAll" Module="Core" Type="1">U2hvdyBBbGw=</PHRASE>
<PHRASE Label="la_tab_ShowStructure" Module="Core" Type="1">U2hvdyBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_tab_Site_Structure" Module="Core" Type="1">V2Vic2l0ZSAmIENvbnRlbnQ=</PHRASE>
@@ -1237,6 +1259,7 @@
<PHRASE Label="la_title_Messages" Module="Core" Type="1">TWVzc2FnZXM=</PHRASE>
<PHRASE Label="la_title_Module_Status" Module="Core" Type="1">TW9kdWxlcw==</PHRASE>
<PHRASE Label="la_title_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</PHRASE>
+ <PHRASE Label="la_title_NewEmailEvent" Module="Core" Type="1">TmV3IEVtYWlsIEV2ZW50</PHRASE>
<PHRASE Label="la_title_NewFile" Module="Core" Type="1">TmV3IEZpbGU=</PHRASE>
<PHRASE Label="la_title_NewReply" Module="Core" Type="1">TmV3IFJlcGx5</PHRASE>
<PHRASE Label="la_title_NewTheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
Index: core/install/install_data.sql
===================================================================
--- core/install/install_data.sql (revision 13557)
+++ core/install/install_data.sql (working copy)
@@ -133,41 +133,41 @@
INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category');
INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User');
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 0, NULL, 'Core:Users', 'Add User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 1, NULL, 'Core:Users', 'Add User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 0, NULL, 'Core:Users', 'Approve User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 1, NULL, 'Core:Users', 'Approve User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 0, NULL, 'Core:Users', 'Validate User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 1, NULL, 'Core:Users', 'Validate User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 0, NULL, 'Core:Users', 'Deny User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 1, NULL, 'Core:Users', 'Deny User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 1, NULL, 'Core:Users', 'Forgot Password', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 0, NULL, 'Core:Users', 'Forgot Password', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, NULL, 'Core:Users', 'Add Pending User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 1, NULL, 'Core:Users', 'Add Pending User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, NULL, 'Core:Category', 'Add Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, NULL, 'Core:Category', 'Add Pending Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 1, NULL, 'Core:Category', 'Add Pending Category', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 1, NULL, 'Core:Category', 'Add Category', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, NULL, 'Core:Category', 'Approve Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, NULL, 'Core:Category', 'Deny Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, NULL, 'Core:Users', 'User subscribed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 1, NULL, 'Core:Users', 'User subscribed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, NULL, 'Core:Users', 'User unsubscribed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 1, NULL, 'Core:Users', 'User unsubscribed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 0, NULL, 'Core:Users', 'Suggest to a friend', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 1, NULL, 'Core:Users', 'Suggest to a friend', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWDC', NULL, 1, 0, NULL, 'Core:Users', 'Password Confirmation', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, NULL, 'Core:Users', 'Membership expired', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, NULL, 'Core:Users', 'Membership expired', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, NULL, 'Core:Users', 'Membership expiration notice', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, NULL, 'Core:Users', 'Membership expiration notice', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, NULL, 'Core', 'Common Footer Template', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, NULL, 'Core:Category', 'This e-mail is sent to a user after filling in the Contact Us form', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, NULL, 'Core:Category', 'This e-mail is sent to a user after filling in the Contact Us form', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, NULL, 'Core:Category', 'Admin Reply to User Form Submission', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, NULL, 'Core:Category', 'User Replied to It\'s Form Submission', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, NULL, 'Core:Category', 'Form Submission Admin Reply Delivery Failure', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 0, 'Core', 'Add User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 1, 'Core', 'Add User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 0, 'Core', 'Approve User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 1, 'Core', 'Approve User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 0, 'Core', 'Validate User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 1, 'Core', 'Validate User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 0, 'Core', 'Deny User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 1, 'Core', 'Deny User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 1, 'Core', 'Forgot Password', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 0, 'Core', 'Forgot Password', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, 'Core', 'Add Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending Category', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 1, 'Core', 'Add Category', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, 'Core', 'Approve Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, 'Core', 'Deny Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, 'Core', 'User subscribed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 1, 'Core', 'User subscribed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, 'Core', 'User unsubscribed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 1, 'Core', 'User unsubscribed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 0, 'Core', 'Suggest to a friend', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 1, 'Core', 'Suggest to a friend', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWDC', NULL, 1, 0, 'Core', 'Password Confirmation', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, 'Core', 'Common Footer Template', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, 'Core', 'Admin Reply to User Form Submission', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, 'Core', 'User Replied to It\'s Form Submission', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, 'Core', 'Form Submission Admin Reply Delivery Failure', 1, 1, 1);
INSERT INTO IdGenerator VALUES ('100');
@@ -570,8 +570,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.edit', 11, 1, 1, 0);
@@ -588,8 +586,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.edit', 11, 1, 1, 0);
@@ -678,7 +674,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.delete', 11, 1, 1, 0);
-INSERT INTO Skins VALUES(DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n font-size: 11px;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/progress_left.gif'');\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1272217243, 1);
+INSERT INTO Skins VALUES(DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n font-size: 11px;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/progress_left.gif'');\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}\r\n\r\n/* Ajax Dropdown */\r\n.suggest-box {\r\n border: 1px solid #999;\r\n background-color: #fff;\r\n}\r\n\r\n.suggest-item, .suggest-item-over {\r\n padding: 1px 2px 0px 2px;\r\n font-family: arial,verdana;\r\n font-size: 12px;\r\n}\r\n\r\n.suggest-item-over {\r\n background-color: #3366CC;\r\n color: #fff;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1273946818, 1);
INSERT INTO LocalesList VALUES
(1, '0x0436', 'Afrikaans (South Africa)', 'af-ZA', 'Latn', '1252'),
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql (revision 13559)
+++ core/install/install_schema.sql (working copy)
@@ -93,6 +93,14 @@
EventId int(11) NOT NULL AUTO_INCREMENT,
`Event` varchar(40) NOT NULL DEFAULT '',
ReplacementTags text,
+ AllowChangingSender tinyint(4) NOT NULL DEFAULT '0',
+ CustomSender tinyint(4) NOT NULL DEFAULT '0',
+ SenderName varchar(255) NOT NULL DEFAULT '',
+ SenderAddressType tinyint(4) NOT NULL DEFAULT '0',
+ SenderAddress varchar(255) NOT NULL DEFAULT '',
+ AllowChangingRecipient tinyint(4) NOT NULL DEFAULT '0',
+ CustomRecipient tinyint(4) NOT NULL DEFAULT '0',
+ Recipients text,
l1_Subject text,
l2_Subject text,
l3_Subject text,
@@ -107,7 +115,6 @@
MessageType varchar(4) NOT NULL DEFAULT 'text',
Enabled int(11) NOT NULL DEFAULT '1',
FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
- FromUserId int(11) DEFAULT NULL,
Module varchar(40) NOT NULL DEFAULT '',
Description text,
`Type` int(11) NOT NULL DEFAULT '0',
@@ -115,7 +122,12 @@
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY `Event` (`Event`),
- KEY FrontEndOnly (FrontEndOnly)
+ KEY FrontEndOnly (FrontEndOnly),
+ KEY AllowChangingSender (AllowChangingSender),
+ KEY CustomSender (CustomSender),
+ KEY SenderAddressType (SenderAddressType),
+ KEY AllowChangingRecipient (AllowChangingRecipient),
+ KEY CustomRecipient (CustomRecipient)
);
CREATE TABLE IdGenerator (
Index: core/install/upgrades.php
===================================================================
--- core/install/upgrades.php (revision 13557)
+++ core/install/upgrades.php (working copy)
@@ -1208,7 +1208,7 @@
if ($mode == 'before') {
// fix "Content" category
$fields_hash = Array (
- 'CreatedById' => -1, // root
+ 'CreatedById' => USER_ROOT,
'CreatedOn' => time(),
'ResourceId' => $this->Application->NextResourceId(),
);
@@ -1517,78 +1517,156 @@
$this->Conn->Query('DROP TABLE IF EXISTS ' . TABLE_PREFIX . 'Phrase');
$this->Conn->Query('RENAME TABLE ' . $temp_table . ' TO ' . TABLE_PREFIX . 'Phrase');
- // refactor StdDestinations table
- $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
- $this->Conn->Query($sql);
+ $this->_updateCountryStatesTable();
+ $this->_replaceConfigurationValueSeparator();
- $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
- CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
- CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
- CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
- CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
- CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
- DROP INDEX DestType,
- DROP INDEX DestParentId,
- ADD INDEX (`Type`),
- ADD INDEX (StateCountryId)';
- $this->Conn->Query($sql);
+ // save "config.php" in php format, not ini format as before
+ $this->_toolkit->SaveConfig();
+ }
- // move country/state translations from Phrase to CountryStates table
- $ml_helper->createFields('country-state');
+ if ($mode == 'after') {
+ $this->_transformEmailRecipients();
+ }
+ }
- for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
- if (!$ml_helper->LanguageFound($language_id)) {
- continue;
- }
+ /**
+ * Move country/state translations from Phrase to CountryStates table
+ *
+ */
+ function _updateCountryStatesTable()
+ {
+ // refactor StdDestinations table
+ $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
+ $this->Conn->Query($sql);
- $sub_select = ' SELECT l' . $language_id . '_Translation
- FROM ' . TABLE_PREFIX . 'Phrase
- WHERE Phrase = DestName';
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
+ CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
+ CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
+ CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
+ CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
+ DROP INDEX DestType,
+ DROP INDEX DestParentId,
+ ADD INDEX (`Type`),
+ ADD INDEX (StateCountryId)';
+ $this->Conn->Query($sql);
- $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
- SET l' . $language_id . '_Name = (' . $sub_select . ')';
- $this->Conn->Query($sql);
+ $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
+ /* @var $ml_helper kMultiLanguageHelper */
+
+ $ml_helper->createFields('country-state');
+
+ for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
+ if (!$ml_helper->LanguageFound($language_id)) {
+ continue;
}
- $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
- DROP DestName';
- $this->Conn->Query($sql);
+ $sub_select = ' SELECT l' . $language_id . '_Translation
+ FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase = DestName';
- $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
- WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
+ SET l' . $language_id . '_Name = (' . $sub_select . ')';
$this->Conn->Query($sql);
+ }
- // makes configuration values dropdowns use "||" as separator
- $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
- /* @var $custom_field_helper InpCustomFieldsHelper */
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ DROP DestName';
+ $this->Conn->Query($sql);
- $sql = 'SELECT ValueList, VariableName
- FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
- WHERE ValueList LIKE "%,%"';
- $variables = $this->Conn->GetCol($sql, 'VariableName');
+ $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $this->Conn->Query($sql);
+ }
- foreach ($variables as $variable_name => $value_list) {
- $ret = Array ();
- $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+ /**
+ * Makes configuration values dropdowns use "||" as separator
+ *
+ */
+ function _replaceConfigurationValueSeparator()
+ {
+ $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
+ /* @var $custom_field_helper InpCustomFieldsHelper */
- foreach ($options as $option_key => $option_title) {
- if (substr($option_key, 0, 3) == 'SQL') {
- $ret[] = $option_title;
- }
- else {
- $ret[] = $option_key . '=' . $option_title;
- }
+ $sql = 'SELECT ValueList, VariableName
+ FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
+ WHERE ValueList LIKE "%,%"';
+ $variables = $this->Conn->GetCol($sql, 'VariableName');
+
+ foreach ($variables as $variable_name => $value_list) {
+ $ret = Array ();
+ $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+
+ foreach ($options as $option_key => $option_title) {
+ if (substr($option_key, 0, 3) == 'SQL') {
+ $ret[] = $option_title;
}
+ else {
+ $ret[] = $option_key . '=' . $option_title;
+ }
+ }
+ $fields_hash = Array (
+ 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ );
+
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ }
+ }
+
+ /**
+ * Transforms "FromUserId" into Sender* and Recipients columns
+ *
+ */
+ function _transformEmailRecipients()
+ {
+ $sql = 'SELECT FromUserId, Type, EventId
+ FROM ' . TABLE_PREFIX . 'Events
+ WHERE FromUserId IS NOT NULL AND (FromUserId <> ' . USER_ROOT . ')';
+ $events = $this->Conn->Query($sql, 'EventId');
+
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ foreach ($events as $event_id => $event_data) {
+ $sql = 'SELECT Login
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE PortalUserId = ' . $event_data['FromUserId'];
+ $username = $this->Conn->GetOne($sql);
+
+ if (!$username) {
+ continue;
+ }
+
+ if ($event_data['Type'] == EVENT_TYPE_FRONTEND) {
+ // from user
$fields_hash = Array (
- 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ 'CustomSender' => 1,
+ 'SenderAddressType' => ADDRESS_TYPE_USER,
+ 'SenderAddress' => $username
);
+ }
- $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ if ($event_data['Type'] == EVENT_TYPE_ADMIN) {
+ // to user
+ $records = Array (
+ Array (
+ 'RecipientType' => RECIPIENT_TYPE_TO,
+ 'RecipientName' => '',
+ 'RecipientAddressType' => ADDRESS_TYPE_USER,
+ 'RecipientAddress' => $username
+ )
+ );
+
+ $fields_hash = Array (
+ 'CustomRecipient' => 1,
+ 'Recipients' => $minput_helper->prepareMInputXML($records, array_keys( reset($records) ))
+ );
}
- // save "config.php" in php format, not ini format as before
- $this->_toolkit->SaveConfig();
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'Events', 'EventId = ' . $event_id);
}
+
+ $this->Conn->Query('ALTER TABLE ' . TABLE_PREFIX . 'Events DROP FromUserId');
}
}
\ No newline at end of file
Index: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql (revision 13559)
+++ core/install/upgrades.sql (working copy)
@@ -1864,3 +1864,25 @@
KEY RedirectOnIPMatch (RedirectOnIPMatch),
KEY Priority (Priority)
);
+
+ALTER TABLE Events
+ ADD AllowChangingSender TINYINT NOT NULL DEFAULT '0' AFTER ReplacementTags ,
+ ADD CustomSender TINYINT NOT NULL DEFAULT '0' AFTER AllowChangingSender ,
+ ADD SenderName VARCHAR(255) NOT NULL DEFAULT '' AFTER CustomSender ,
+ ADD SenderAddressType TINYINT NOT NULL DEFAULT '0' AFTER SenderName ,
+ ADD SenderAddress VARCHAR(255) NOT NULL DEFAULT '' AFTER SenderAddressType ,
+ ADD AllowChangingRecipient TINYINT NOT NULL DEFAULT '0' AFTER SenderAddress ,
+ ADD CustomRecipient TINYINT NOT NULL DEFAULT '0' AFTER AllowChangingRecipient ,
+ ADD Recipients TEXT AFTER CustomRecipient,
+ ADD INDEX (AllowChangingSender),
+ ADD INDEX (CustomSender),
+ ADD INDEX (SenderAddressType),
+ ADD INDEX (AllowChangingRecipient),
+ ADD INDEX (CustomRecipient);
+
+UPDATE Events SET AllowChangingSender = 1, AllowChangingRecipient = 1;
+UPDATE Events SET Module = 'Core' WHERE Module LIKE 'Core:%';
+
+DELETE FROM Permissions WHERE Permission LIKE 'in-portal:configuration_email%';
+DELETE FROM Permissions WHERE Permission LIKE 'in-portal:user_email%';
+DELETE FROM Phrase WHERE Phrase IN ('la_fld_FromToUser', 'la_col_FromToUser');
Index: core/kernel/application.php
===================================================================
--- core/kernel/application.php (revision 13581)
+++ core/kernel/application.php (working copy)
@@ -2830,11 +2830,12 @@
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEventAdmin($email_event_name, $to_user_id = null, $send_params = false)
+ function &EmailEventAdmin($email_event_name, $to_user_id = null, $send_params = Array ())
{
- $event =& $this->EmailEvent($email_event_name, 1, $to_user_id, $send_params);
+ $event =& $this->EmailEvent($email_event_name, EVENT_TYPE_ADMIN, $to_user_id, $send_params);
+
return $event;
}
@@ -2844,11 +2845,12 @@
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEventUser($email_event_name, $to_user_id = null, $send_params = false)
+ function &EmailEventUser($email_event_name, $to_user_id = null, $send_params = Array ())
{
- $event =& $this->EmailEvent($email_event_name, 0, $to_user_id, $send_params);
+ $event =& $this->EmailEvent($email_event_name, EVENT_TYPE_FRONTEND, $to_user_id, $send_params);
+
return $event;
}
@@ -2856,23 +2858,28 @@
* Triggers general email event
*
* @param string $email_event_name
- * @param int $email_event_type ( 0 for User, 1 for Admin)
+ * @param int $email_event_type (0 for User, 1 for Admin)
* @param int $to_user_id
* @param array $send_params associative array of direct send params,
* possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEvent($email_event_name, $email_event_type, $to_user_id = -1, $send_params = false)
+ function &EmailEvent($email_event_name, $email_event_type, $to_user_id = null, $send_params = Array ())
{
- $params = array(
+ $params = Array (
'EmailEventName' => $email_event_name,
'EmailEventToUserId' => $to_user_id,
'EmailEventType' => $email_event_type,
+ 'DirectSendParams' => $send_params,
);
- if ($send_params) {
- $params['DirectSendParams'] = $send_params;
+
+ if (array_key_exists('use_special', $send_params)) {
+ $event_str = 'emailevents.' . $send_params['use_special'] . ':OnEmailEvent';
}
- $event_str = isset($send_params['use_special']) ? 'emailevents.'.$send_params['use_special'].':OnEmailEvent' : 'emailevents:OnEmailEvent';
+ else {
+ $event_str = 'emailevents:OnEmailEvent';
+ }
+
$this->HandleEvent($event, $event_str, $params);
return $event;
Index: core/kernel/constants.php
===================================================================
--- core/kernel/constants.php (revision 13581)
+++ core/kernel/constants.php (working copy)
@@ -84,10 +84,7 @@
define('clUPDATE', 2);
define('clDELETE', 3);
- /**
- * Separator for ValueList fields
- *
- */
+ // Separator for ValueList fields
define('VALUE_LIST_SEPARATOR', '||');
// template editing modes
@@ -117,10 +114,7 @@
define('SMS_MODE_AUTO', 1);
define('SMS_MODE_FORCE', 2);
- /**
- * Means, that actual category Template field value should inherited from parent category
- *
- */
+ // Means, that actual category Template field value should inherited from parent category
define('CATEGORY_TEMPLATE_INHERIT', '#inherit#');
define('REWRITE_MODE_BUILD', 1);
@@ -168,5 +162,14 @@
define('SITE_DOMAIN_REDIRECT_CURRENT', 1);
define('SITE_DOMAIN_REDIRECT_EXTERNAL', 2);
+ // email event address types
+ define('ADDRESS_TYPE_EMAIL', 1);
+ define('ADDRESS_TYPE_USER', 2);
+ define('ADDRESS_TYPE_GROUP', 3);
+
+ define('RECIPIENT_TYPE_TO', 1);
+ define('RECIPIENT_TYPE_CC', 2);
+ define('RECIPIENT_TYPE_BCC', 3);
+
define ('KG_TO_POUND', 2.20462262);
define ('POUND_TO_KG', 0.45359237);
\ No newline at end of file
Index: core/units/categories/categories_config.php
===================================================================
--- core/units/categories/categories_config.php (revision 13581)
+++ core/units/categories/categories_config.php (working copy)
@@ -216,7 +216,7 @@
'PermItemPrefix' => 'CATEGORY',
- 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'email' => 'in-portal:configuration_email', 'custom' => 'in-portal:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'custom' => 'in-portal:configuration_custom'),
'Sections' => Array (
'in-portal:configure_categories' => Array (
@@ -239,23 +239,13 @@
'type' => stTREE,
),
- 'in-portal:configuration_email' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'module' => 'Core:Category', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 11.3,
- 'type' => stTREE,
- ),
-
'in-portal:configuration_custom' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 11.4,
+ 'priority' => 11.3,
'type' => stTREE,
),
),
Index: core/units/email_events/email_event_tp.php
===================================================================
--- core/units/email_events/email_event_tp.php (revision 13557)
+++ core/units/email_events/email_event_tp.php (working copy)
@@ -21,4 +21,54 @@
$this->Application->setUnitOption($this->Prefix, 'Grids', $grids);
}
}
+
+ /**
+ * Checks, that field can be edited
+ *
+ * @param Array $params
+ * @return string
+ */
+ function IsEditable($params)
+ {
+ if ($this->Application->isDebugMode()) {
+ return true;
+ }
+
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ return $object->GetDBField($params['check_field']);
+ }
+
+ /**
+ * Removes "To" options from possible options in "RecipientType" field
+ *
+ * @param Array $params
+ */
+ function RemoveToRecipientType($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $field_options = $object->GetFieldOptions('RecipientType');
+ unset($field_options['options'][RECIPIENT_TYPE_TO]);
+ $object->SetFieldOptions('RecipientType', $field_options);
+ }
+
+ /**
+ * Restores "To" option in possible option list in "RecipientType" field
+ *
+ * @param Array $params
+ */
+ function RestoreRecipientType($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $field_options = $object->GetFieldOptions('RecipientType');
+ $virtual_fields = $this->Application->getUnitOption($this->Prefix, 'VirtualFields');
+ $field_options['options'] = $virtual_fields['RecipientType']['options'];
+ $object->SetFieldOptions('RecipientType', $field_options);
+ }
+
}
\ No newline at end of file
Index: core/units/email_events/email_events_config.php
===================================================================
--- core/units/email_events/email_events_config.php (revision 13557)
+++ core/units/email_events/email_events_config.php (working copy)
@@ -38,30 +38,28 @@
'TitlePresets' => 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!'),
@@ -69,6 +67,13 @@
'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
Index: core/units/email_events/email_events_event_handler.php
===================================================================
--- core/units/email_events/email_events_event_handler.php (revision 13557)
+++ core/units/email_events/email_events_event_handler.php (working copy)
@@ -23,12 +23,23 @@
function mapPermissions()
{
parent::mapPermissions();
- $permissions = Array(
- 'OnFrontOnly' => Array('self' => 'edit'),
- 'OnSaveSelected' => Array('self' => 'view'),
- 'OnProcessEmailQueue' => Array('self' => 'add|edit'),
+ $permissions = Array (
+ 'OnFrontOnly' => Array ('self' => 'edit'),
+ 'OnSaveSelected' => Array ('self' => 'view'),
+ 'OnProcessEmailQueue' => Array ('self' => 'add|edit'),
+
+ 'OnSuggestAddress' => Array ('self' => 'add|edit'),
+
+ // events only for developers
+ 'OnPreCreate' => Array ('self' => 'debug'),
+ 'OnDelete' => Array ('self' => 'debug'),
+ 'OnDeleteAll' => Array ('self' => 'debug'),
+ 'OnMassDelete' => Array ('self' => 'debug'),
+ 'OnMassApprove' => Array ('self' => 'debug'),
+ 'OnMassDecline' => Array ('self' => 'debug'),
);
+
$this->permMapping = array_merge($this->permMapping, $permissions);
}
@@ -201,76 +212,250 @@
}
/**
- * Returns sender & recipients ids plus event_id (as parameter by reference)
+ * Processes email sender
*
* @param kEvent $event
- *
- * @return mixed
+ * @param Array $direct_params
*/
- function GetMessageRecipients(&$event)
+ function _processSender(&$event, $direct_params = Array ())
{
+ $this->Application->removeObject('u.email-from');
+
$object =& $this->_getEmailEvent($event);
/* @var $object kDBItem */
- // initial values
- $to_user_id = $event->getEventParam('EmailEventToUserId');
- if ( !is_numeric($to_user_id) ) {
- $to_user_id = -1; // when not specified, then send to "root"
- }
- $from_user_id = $object->GetDBField('FromUserId');
+ $email = $name = '';
- if ($object->GetDBField('Type') == EVENT_TYPE_ADMIN) {
- // For type "Admin" recipient is a user from field FromUserId which means From/To user in Email events list
- if ($to_user_id == -1) {
- $to_user_id = $from_user_id;
+ // set defaults from event
+ if ($object->GetDBField('CustomSender')) {
+ $address = $object->GetDBField('SenderAddress');
+ $address_type = $object->GetDBField('SenderAddressType');
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $email = $address;
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT FirstName, LastName, Email, PortalUserId
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ // user still exists
+ $email = $user_info['Email'];
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $user =& $this->Application->recallObject('u.email-from', null, Array('skip_autoload' => true));
+ /* @var $user UsersItem */
+
+ $user->Load($user_info['PortalUserId']);
+ }
+ break;
}
- $from_user_id = -1;
+
+ if ($object->GetDBField('SenderName')) {
+ $name = $object->GetDBField('SenderName');
+ }
}
- return Array ($from_user_id, $to_user_id);
+ // update with custom data given during event execution
+ if (array_key_exists('from_email', $direct_params)) {
+ $email = $direct_params['from_email'];
+ }
+
+ if (array_key_exists('from_name', $direct_params)) {
+ $name = $direct_params['from_name'];
+ }
+
+ // still nothing, set defaults
+ if (!$email) {
+ $email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+ }
+
+ if (!$name) {
+ $name = strip_tags( $this->Application->ConfigValue('Site_Name') );
+ }
+
+ $esender =& $this->Application->recallObject('EmailSender');
+ /* @var $esender kEmailSendingHelper */
+
+ $esender->SetFrom($email, $name);
+
+ return Array ($email, $name);
}
/**
- * Returns user name, email by id, or ones, that specified in $direct_params
+ * Processes email recipients
*
- * @param int $user_id
- * @param string $user_type type of user = {to,from}
+ * @param kEvent $event
* @param Array $direct_params
- * @return Array
*/
- function GetRecipientInfo($user_id, $user_type, $direct_params = null)
+ function _processRecipients(&$event, $direct_params = Array ())
{
- // load user, because it can be addressed from email template tags
- $user =& $this->Application->recallObject('u.email-'.$user_type, null, Array('skip_autoload' => true));
- /* @var $user UsersItem */
+ $this->Application->removeObject('u.email-to');
- $email = $name = '';
- $result = $user_id > 0 ? $user->Load( (int)$user_id ) : $user->Clear();
- if ($user->IsLoaded()) {
- $email = $user->GetDBField('Email');
- $name = trim($user->GetDBField('FirstName').' '.$user->GetDBField('LastName'));
- }
+ $object =& $this->_getEmailEvent($event);
+ /* @var $object kDBItem */
- if (is_array($direct_params)) {
- if (isset($direct_params[$user_type.'_email'])) {
- $email = $direct_params[$user_type.'_email'];
+ $to_email = $to_name = '';
+ $all_recipients = Array ();
+ $recipients_xml = $object->GetDBField('Recipients');
+
+ if ($recipients_xml) {
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ // group recipients by type
+ $records = $minput_helper->parseMInputXML($recipients_xml);
+
+ foreach ($records as $record) {
+ $recipient_type = $record['RecipientType'];
+
+ if (!array_key_exists($recipient_type, $all_recipients)) {
+ $all_recipients[$recipient_type] = Array ();
+ }
+
+ $all_recipients[$recipient_type][] = $record;
}
+ }
- if (isset($direct_params[$user_type.'_name'])) {
- $name = $direct_params[$user_type.'_name'];
+ if (!array_key_exists(RECIPIENT_TYPE_TO, $all_recipients)) {
+ $all_recipients[RECIPIENT_TYPE_TO] = Array ();
+ }
+
+ // remove all "To" recipients, when not allowed
+ $overwrite_to_email = array_key_exists('overwrite_to_email', $direct_params) ? $direct_params['overwrite_to_email'] : false;
+
+ if (!$object->GetDBField('CustomRecipient') || $overwrite_to_email) {
+ $all_recipients[RECIPIENT_TYPE_TO] = Array ();
+ }
+
+ // update with custom data given during event execution (user_id)
+ $to_user_id = $event->getEventParam('EmailEventToUserId');
+
+ if ($to_user_id > 0) {
+ $sql = 'SELECT FirstName, LastName, Email
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE PortalUserId = ' . $to_user_id;
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ $add_recipient = Array (
+ 'RecipientAddressType' => ADDRESS_TYPE_EMAIL,
+ 'RecipientAddress' => $user_info['Email'],
+ 'RecipientName' => trim($user_info['FirstName'] . ' ' . $user_info['LastName']),
+ );
+
+ array_unshift($all_recipients[RECIPIENT_TYPE_TO], $add_recipient);
+
+ $user =& $this->Application->recallObject('u.email-to', null, Array('skip_autoload' => true));
+ /* @var $user UsersItem */
+
+ $user->Load($to_user_id);
}
}
- if (!$email) {
- // if email is empty, then use admins email
- $email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+ // update with custom data given during event execution (email + name)
+ $add_recipient = Array ();
+
+ if (array_key_exists('to_email', $direct_params)) {
+ $add_recipient['RecipientName'] = '';
+ $add_recipient['RecipientAddressType'] = ADDRESS_TYPE_EMAIL;
+ $add_recipient['RecipientAddress'] = $direct_params['to_email'];
}
- if (!$name) {
- $name = $user_type == 'from' ? strip_tags($this->Application->ConfigValue('Site_Name')) : $email;
+ if (array_key_exists('to_name', $direct_params)) {
+ $add_recipient['RecipientName'] = $direct_params['to_name'];
}
- return Array ($email, $name);
+ if ($add_recipient) {
+ array_unshift($all_recipients[RECIPIENT_TYPE_TO], $add_recipient);
+ }
+
+ $esender =& $this->Application->recallObject('EmailSender');
+ /* @var $esender kEmailSendingHelper */
+
+ $header_mapping = Array (
+ RECIPIENT_TYPE_TO => 'To',
+ RECIPIENT_TYPE_CC => 'Cc',
+ RECIPIENT_TYPE_BCC => 'Bcc',
+ );
+
+ $default_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+
+ foreach ($all_recipients as $recipient_type => $recipients) {
+ // add recipients to email
+ $pairs = Array ();
+
+ foreach ($recipients as $recipient) {
+ $address = $recipient['RecipientAddress'];
+ $address_type = $recipient['RecipientAddressType'];
+ $repipient_name = $recipient['RecipientName'];
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $pairs[] = Array ('email' => $address, 'name' => $repipient_name);
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT FirstName, LastName, Email
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ // user still exists
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $pairs[] = Array (
+ 'email' => $user_info['Email'],
+ 'name' => $name ? $name : $repipient_name,
+ );
+ }
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $sql = 'SELECT u.FirstName, u.LastName, u.Email
+ FROM ' . TABLE_PREFIX . 'PortalGroup g
+ JOIN ' . TABLE_PREFIX . 'UserGroup ug ON ug.GroupId = g.GroupId
+ JOIN ' . TABLE_PREFIX . 'PortalUser u ON u.PortalUserId = ug.PortalUserId
+ WHERE g.Name = ' . $this->Conn->qstr($address);
+ $users = $this->Conn->Query($sql);
+
+ foreach ($users as $user) {
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $pairs[] = Array (
+ 'email' => $user_info['Email'],
+ 'name' => $name ? $name : $repipient_name,
+ );
+ }
+ break;
+ }
+ }
+
+ if (!$pairs) {
+ continue;
+ }
+
+ if ($recipient_type == RECIPIENT_TYPE_TO) {
+ $to_email = $pairs[0]['email'] ? $pairs[0]['email'] : $default_email;
+ $to_name = $pairs[0]['name'] ? $pairs[0]['name'] : $to_email;
+ }
+
+ $header_name = $header_mapping[$recipient_type];
+
+ foreach ($pairs as $pair) {
+ $email = $pair['email'] ? $pair['email'] : $default_email;
+ $name = $pair['name'] ? $pair['name'] : $email;
+
+ $esender->AddRecipient($header_name, $email, $name);
+ }
+ }
+
+ return Array ($to_email, $to_name);
}
/**
@@ -279,7 +464,7 @@
* @param kEvent $event
* @param int $language_id
*/
- function GetMessageBody(&$event, $language_id = null)
+ function _getMessageBody(&$event, $language_id = null)
{
if (!isset($language_id)) {
$language_id = $this->Application->GetVar('m_lang');
@@ -399,7 +584,7 @@
* @param Array $direct_params
* @return Array
*/
- function ParseMessageBody($message, $direct_params = null)
+ function ParseMessageBody($message, $direct_params = Array ())
{
$message_language = $this->_getSendLanguage($direct_params);
$this->_changeLanguage($message_language);
@@ -463,15 +648,12 @@
$send_params = $event->getEventParam('DirectSendParams');
// 1. get information about message sender and recipient
- $recipients = $this->GetMessageRecipients($event);
+ list ($from_email, $from_name) = $this->_processSender($event, $send_params);
+ list ($to_email, $to_name) = $this->_processRecipients($event, $send_params);
- list ($from_id, $to_id) = $recipients;
- list ($from_email, $from_name) = $this->GetRecipientInfo($from_id, 'from', $send_params);
- list ($to_email, $to_name) = $this->GetRecipientInfo($to_id, 'to', $send_params);
-
// 2. prepare message to be sent
$message_language = $this->_getSendLanguage($send_params);
- $message_template = $this->GetMessageBody($event, $message_language);
+ $message_template = $this->_getMessageBody($event, $message_language);
if (!trim($message_template)) {
trigger_error('Message template is empty', E_USER_WARNING);
return false;
@@ -487,15 +669,12 @@
$esender =& $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
- $esender->SetFrom($from_email, $from_name);
- $esender->AddTo($to_email, $to_name);
-
$message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
$esender->SetSubject($message_subject);
if ($this->Application->isDebugMode()) {
// set special header with event name, so it will be easier to determite what's actually was received
- $message_headers['X-Event-Name'] = $email_event_name . ' - ' . ($event->getEventParam('EmailEventType') == EVENT_TYPE_ADMIN ? 'ADMIN' : 'USER');
+ $message_headers['X-Event-Name'] = $email_event_name . ' - ' . ($object->GetDBField('Type') == EVENT_TYPE_ADMIN ? 'ADMIN' : 'USER');
}
foreach ($message_headers as $header_name => $header_value) {
@@ -524,14 +703,11 @@
$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'EmailLog');
}
-
- $this->Application->removeObject('u.email-from');
- $this->Application->removeObject('u.email-to');
}
function _getSendLanguage($send_params)
{
- if ($send_params && array_key_exists('language_id', $send_params)) {
+ if (array_key_exists('language_id', $send_params)) {
return $send_params['language_id'];
}
@@ -634,10 +810,10 @@
{
parent::OnAfterConfigRead($event);
- $options = Array ('Core:Users' => 'Core - Users', 'Core:Category' => 'Core - Categories');
+ $options = Array ();
foreach ($this->Application->ModuleInfo as $module_name => $module_info) {
- if (($module_name == 'In-Portal') || ($module_name == 'Core')) {
+ if ($module_name == 'In-Portal') {
continue;
}
@@ -666,4 +842,221 @@
// use language from grid, instead of primary language used by default
$event->SetRedirectParam('m_lang', $this->Application->GetVar('m_lang'));
}
+
+ /**
+ * Fixes default recipient type
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemLoad(&$event)
+ {
+ parent::OnAfterItemLoad($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if (!$this->Application->isDebugMode(false)) {
+ if ($object->GetDBField('AllowChangingRecipient')) {
+ $object->SetDBField('RecipientType', RECIPIENT_TYPE_TO);
+ }
+ else {
+ $object->SetDBField('RecipientType', RECIPIENT_TYPE_CC);
+ }
+ }
+
+ // process replacement tags
+ $records = Array ();
+ $replacement_tags = $object->GetDBField('ReplacementTags');
+ $replacement_tags = $replacement_tags ? unserialize($replacement_tags) : Array ();
+
+ foreach ($replacement_tags as $tag => $replacement) {
+ $records[] = Array ('Tag' => $tag, 'Replacement' => $replacement);
+ }
+
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ $xml = $minput_helper->prepareMInputXML($records, Array ('Tag', 'Replacement'));
+ $object->SetDBField('ReplacementTagsXML', $xml);
+ }
+
+ /**
+ * Performs custom validation + keep read-only fields
+ *
+ * @param kEvent $event
+ */
+ function _itemChanged(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ($object->GetDBField('CustomSender')) {
+ $this->_validateAddress($event, 'Sender');
+ }
+
+ $this->_validateAddress($event, 'Recipient');
+
+ if (!$this->Application->isDebugMode(false)) {
+ // only allow to enable/disable event while in debug mode
+ $to_restore = Array ('Enabled', 'AllowChangingSender', 'AllowChangingRecipient');
+
+ if (!$object->GetOriginalField('AllowChangingSender')) {
+ $to_restore = array_merge($to_restore, Array ('CustomSender', 'SenderName', 'SenderAddressType', 'SenderAddress'));
+ }
+
+ if (!$object->GetOriginalField('AllowChangingRecipient')) {
+ $to_restore = array_merge($to_restore, Array ('CustomRecipient'/*, 'Recipients'*/));
+ }
+
+ // prevent specific fields from editing
+ foreach ($to_restore as $restore_field) {
+ $original_value = $object->GetOriginalField($restore_field);
+
+ if ($object->GetDBField($restore_field) != $original_value) {
+ $object->SetDBField($restore_field, $original_value);
+ }
+ }
+ }
+
+ // process replacement tags
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ $replacement_tags = Array ();
+ $records = $minput_helper->parseMInputXML( $object->GetDBField('ReplacementTagsXML') );
+
+ foreach ($records as $record) {
+ $replacement_tags[ trim($record['Tag']) ] = trim($record['Replacement']);
+ }
+
+ $object->SetDBField('ReplacementTags', $replacement_tags ? serialize($replacement_tags) : NULL);
+ }
+
+ /**
+ * Validates address using given field prefix
+ *
+ * @param kEvent $event
+ * @param string $field_prefix
+ */
+ function _validateAddress(&$event, $field_prefix)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $address_type = $object->GetDBField($field_prefix . 'AddressType');
+ $object->setRequired($field_prefix . 'Address', $address_type > 0);
+ $address = $object->GetDBField($field_prefix . 'Address');
+
+ if (!$address) {
+ // don't validate against empty address
+ return ;
+ }
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ if (!preg_match('/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', $address)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_email');
+ }
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT PortalUserId
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ if (!$this->Conn->GetOne($sql)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_user');
+ }
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $sql = 'SELECT GroupId
+ FROM ' . TABLE_PREFIX . 'PortalGroup
+ WHERE Name = ' . $this->Conn->qstr($address);
+ if (!$this->Conn->GetOne($sql)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_group');
+ }
+ break;
+ }
+ }
+
+ /**
+ * Don't allow to enable/disable events in non-debug mode
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->_itemChanged($event);
+ }
+
+ /**
+ * Don't allow to enable/disable events in non-debug mode
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+ $this->_itemChanged($event);
+ }
+
+ /**
+ * Suggest address based on typed address and selected address type
+ *
+ * @param kEvent $event
+ */
+ function OnSuggestAddress(&$event)
+ {
+ $event->status = erSTOP;
+
+ $address_type = $this->Application->GetVar('type');
+ $address = $this->Application->GetVar('value');
+ $limit = $this->Application->GetVar('limit');
+
+ if (!$limit) {
+ $limit = 20;
+ }
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $field = 'Email';
+ $table_name = TABLE_PREFIX . 'PortalUser';
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $field = 'Login';
+ $table_name = TABLE_PREFIX . 'PortalUser';
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $field = 'Name';
+ $table_name = TABLE_PREFIX . 'PortalGroup';
+ break;
+ }
+
+ if (isset($field)) {
+ $sql = 'SELECT DISTINCT ' . $field . '
+ FROM ' . $table_name . '
+ WHERE ' . $field . ' LIKE ' . $this->Conn->qstr($address . '%') . '
+ ORDER BY ' . $field . ' ASC
+ LIMIT 0,' . $limit;
+ $data = $this->Conn->GetCol($sql);
+ }
+ else {
+ $data = Array ();
+ }
+
+ $this->Application->XMLHeader();
+
+ echo '<suggestions>';
+
+ foreach ($data as $item) {
+ echo '<item>' . htmlspecialchars($item) . '</item>';
+ }
+
+ echo '</suggestions>';
+ }
}
\ No newline at end of file
Index: core/units/users/users_config.php
===================================================================
--- core/units/users/users_config.php (revision 13557)
+++ core/units/users/users_config.php (working copy)
@@ -225,7 +225,7 @@
),
),
- 'PermSection' => Array('main' => 'in-portal:user_list', 'email' => 'in-portal:user_email', 'custom' => 'in-portal:user_custom'),
+ 'PermSection' => Array('main' => 'in-portal:user_list', 'custom' => 'in-portal:user_custom'),
'Sections' => Array (
'in-portal:user_list' => Array (
@@ -272,23 +272,13 @@
'type' => stTREE,
),
- 'in-portal:user_email' => Array (
- 'parent' => 'in-portal:user_setting_folder',
- 'icon' => 'conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'module' => 'Core:Users', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 2,
- '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' => 3,
+ 'priority' => 2,
'type' => stTREE,
),
),
Fatal_Improvements_E-mail_Template_editing.jpg [^] (152,090 bytes) 2010-05-23 19:01
email_event_recipient_core_v3.patch [^] (142,345 bytes) 2010-05-25 04:16
[Show Content]
Index: admin/system_presets/simple/email_events_emailevents.php
===================================================================
--- admin/system_presets/simple/email_events_emailevents.php (revision 13557)
+++ admin/system_presets/simple/email_events_emailevents.php (working copy)
@@ -14,45 +14,51 @@
// toolbar buttons
$remove_buttons = Array (
-// list of all email templates (direct list)
-// 'email_messages_direct_list' => Array ('edit', 'view', 'dbl-click'),
+// list of all email templates
+// 'email_message_list' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'frontend_mail', 'view', 'dbl-click'),
-// edit email body direct
-// 'email_messages_edit_direct' => Array ('select', 'cancel', 'reset_edit'),
+// edit email edit - general tab
+// 'email_message_edit' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+
+// edit email edit - settings tab
+// 'email_message_edit_settings' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
);
// fields to hide
$hidden_fields = Array (
- /*'EventId', 'Event',*/ 'Headers', /*'ReplacementTags', 'Subject', 'Body',*/
- 'MessageType', 'Enabled', 'FrontEndOnly', 'FromUserId', /*'Module',
- 'Description', 'Type',*/
+ /*'EventId', 'Event', 'ReplacementTags', 'AllowChangingSender', 'CustomSender',
+ 'SenderName', 'SenderAddressType', 'SenderAddress', 'AllowChangingRecipient',
+ 'CustomRecipient', 'Recipients', 'Subject', 'Body', 'Headers', 'MessageType',
+ 'Enabled', 'FrontEndOnly', 'Module', 'Description', 'Type'*/
);
// virtual fields to hide
$virtual_hidden_fields = Array (
-
+ /*'RecipientType', 'RecipientName', 'RecipientAddressType',
+ 'RecipientAddress', 'Tag', 'Replacement', 'ReplacementTagsXML',*/
);
// fields to make required
$required_fields = Array (
- 'EventId', 'Event', /*'Headers', 'ReplacementTags',*/ 'Subject', 'Body',
- 'MessageType', /*'Enabled', 'FrontEndOnly', 'FromUserId',*/ 'Module',
- /*'Description',*/ 'Type',
+ /*'EventId',*/ 'Event', /*'ReplacementTags', 'AllowChangingSender', 'CustomSender',
+ 'SenderName', 'SenderAddressType', 'SenderAddress', 'AllowChangingRecipient',
+ 'CustomRecipient', 'Recipients',*/ 'Subject', 'Body', /*'Headers',*/ 'MessageType',
+ /*'Enabled', 'FrontEndOnly',*/ 'Module', /*'Description',*/ 'Type'
);
// virtual fields to make required
$virtual_required_fields = Array (
-
+ /*'RecipientType', 'RecipientName', 'RecipientAddressType',
+ 'RecipientAddress', 'Tag', 'Replacement', 'ReplacementTagsXML',*/
);
// tabs during editing
$hide_edit_tabs = Array (
-
+ 'Default' => Array (/*'general',*/ 'settings'),
);
// hide columns in grids
$hide_columns = Array (
-// currently not in user
-// 'Default' => Array ('Subject', 'Description', 'Type', ),
-// 'Emails' => Array ('EventId', 'Subject', 'Description', 'Type', ),
+// 'Default' => Array ('EventId', 'Description', 'Event', 'Module', 'Type', 'Enabled'),
+// 'Emails' => Array ('EventId', 'Event', 'Subject', 'Description', 'Type', 'Enabled', 'Module', 'FrontEndOnly'),
);
\ No newline at end of file
Index: admin/system_presets/simple/email_messages_emailmessages.php
===================================================================
--- admin/system_presets/simple/email_messages_emailmessages.php (revision 13557)
+++ admin/system_presets/simple/email_messages_emailmessages.php (working copy)
@@ -1,56 +1,3 @@
<?php
- defined('FULL_PATH') or die('restricted access!');
-
- // section removal
- $remove_sections = Array (
-// 'in-portal:configemail',
- );
-
- // sections shown with debug on
- $debug_only_sections = Array (
- 'in-portal:configemail',
- );
-
- // toolbar buttons
- $remove_buttons = Array (
-// list of all email templates (direct list)
-// 'email_messages_direct_list' => Array ('edit', 'view', 'dbl-click'),
-
-// edit email body direct
-// 'email_messages_edit_direct' => Array ('select', 'cancel', 'reset_edit'),
- );
-
- // fields to hide
- $hidden_fields = Array (
- /*'EmailMessageId', 'Template',*/ 'MessageType', /*'LanguageId', 'EventId', 'Subject' */
- );
-
- // virtual fields to hide
- $virtual_hidden_fields = Array (
- 'Headers',/* 'Body', 'ReplacementTags', 'Description', 'Module', 'Type', 'MassSubject', 'MassAttachment',
- 'MassHtmlMessage', 'MassTextMessage', */
- );
-
- // fields to make required
- $required_fields = Array (
- /*'EmailMessageId', 'Template', 'MessageType', 'LanguageId', 'EventId', 'Subject' */
- );
-
- // virtual fields to make required
- $virtual_required_fields = Array (
- /* 'Headers', 'Body', 'ReplacementTags', 'Description', 'Module', 'Type', 'MassSubject', 'MassAttachment',
- 'MassHtmlMessage', 'MassTextMessage', */
- );
-
- // tabs during editing
- $hide_edit_tabs = Array (
-
- );
-
- // hide columns in grids
- $hide_columns = Array (
-// currently not in user
-// 'Default' => Array ('Subject', 'Description', 'Type', ),
-// 'Emails' => Array ('EventId', 'Subject', 'Description', 'Type', 'LanguageId', ),
- );
\ No newline at end of file
+ // TO REMOVE
\ No newline at end of file
Index: core/admin_templates/incs/style_template.css
===================================================================
--- core/admin_templates/incs/style_template.css (revision 13557)
+++ core/admin_templates/incs/style_template.css (working copy)
@@ -663,4 +663,21 @@
.tree tr td a.debug-only-item {
color: grey;
+}
+
+/* Ajax Dropdown */
+.suggest-box {
+ border: 1px solid #999;
+ background-color: #fff;
+}
+
+.suggest-item, .suggest-item-over {
+ padding: 1px 2px 0px 2px;
+ font-family: arial,verdana;
+ font-size: 12px;
+}
+
+.suggest-item-over {
+ background-color: #3366CC;
+ color: #fff;
}
\ No newline at end of file
Index: core/admin_templates/languages/email_message_edit.tpl
===================================================================
--- core/admin_templates/languages/email_message_edit.tpl (revision 13557)
+++ core/admin_templates/languages/email_message_edit.tpl (working copy)
@@ -1,7 +1,7 @@
<inp2:adm_SetPopupSize width="875" height="650"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_messages_edit_direct"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_message_edit" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
@@ -26,8 +26,22 @@
}
) );
+ <inp2:m_if check="emailevents_IsSingle" inverse="inverse">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ </inp2:m_if>
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_NextId/>');
+ }
+ ) );
+
a_toolbar.Render();
+ <inp2:m_RenderElement name="edit_navigation" prefix="emailevents"/>
</script>
</td>
@@ -38,26 +52,28 @@
<inp2:emailevents_SaveWarning name="grid_save_warning"/>
<inp2:emailevents_ErrorWarning name="form_error_warning"/>
-<inp2:m_RenderElement name="inp_edit_hidden" prefix="emailevents" field="EventId"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="EventId,Event,Subject,Enabled,FrontEndOnly,FromUserId,Module,Description,Type,MessageType,Headers" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="EventId,Description,Subject" title="!la_section_General!"/>
<inp2:m_RenderElement name="inp_id_label" prefix="emailevents" field="EventId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Event" title="la_fld_Event"/>
+
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Event" title="la_fld_Event"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="Event" title="la_fld_Event"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="Description" title="la_fld_Description"/>
<inp2:m_RenderElement name="inp_edit_box_ml" prefix="emailevents" field="Subject" format="no_default" title="la_fld_Subject"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Description" title="la_fld_Description" control_options="{max_height: 50}"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Headers" title="la_fld_ExtraHeaders" control_options="{max_height: 50}"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="Enabled" title="la_fld_Enabled"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="FrontEndOnly" title="la_fld_FrontEndOnly"/>
- <inp2:m_RenderElement name="inp_edit_user" prefix="emailevents" field="FromUserId" title="la_fld_FromToUser"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="Type" title="la_fld_Type"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="emailevents" field="Module" title="la_fld_Module" has_empty="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="MessageType" title="la_fld_MessageType"/>
<inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Body" title="!la_section_Message!"/>
- <inp2:m_RenderElement name="inp_edit_fck" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" rows="5" cols="60" control_options="{min_height: 200}"/>
- <!-- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" control_options="{min_height: 200}"/> -->
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" control_options="{min_height: 200}"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_fck" prefix="emailevents" field="Body" format="no_default" title="la_fld_MessageBody" rows="5" cols="60" control_options="{min_height: 200}"/>
+ </inp2:m_if>
+
<inp2:m_RenderElement name="inp_edit_filler" control_options="{max_height: 8}"/>
</table>
</div>
Index: core/admin_templates/languages/email_message_list.tpl
===================================================================
--- core/admin_templates/languages/email_message_list.tpl (revision 13557)
+++ core/admin_templates/languages/email_message_list.tpl (working copy)
@@ -1,6 +1,6 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" pagination="1" prefix="emailevents" grid="Emails" title_preset="email_messages_direct_list" additional_blue_bar_render_as="grid_ml_selector"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" pagination="1" prefix="emailevents" grid="Emails" title_preset="email_message_list" additional_blue_bar_render_as="grid_ml_selector"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
@@ -14,30 +14,41 @@
a_toolbar = new ToolBar();
- a_toolbar.AddButton(
- new ToolBarButton(
- 'new_item',
- '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
- function() {
- std_precreate_item('emailevents', 'languages/email_message_edit');
- }
- )
- );
+ <inp2:m_if check="m_IsDebugMode">
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'new_item',
+ '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
+ function() {
+ std_precreate_item('emailevents', 'languages/email_message_edit');
+ }
+ )
+ );
+ </inp2:m_if>
- 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('emailevents');
- }
+ 'edit',
+ '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>',
+ edit
)
);
<inp2:m_if check="m_IsDebugMode">
- a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'delete',
+ '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('emailevents');
+ }
+ )
+ );
+ </inp2:m_if>
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ <inp2:m_if check="m_IsDebugMode">
a_toolbar.AddButton(
new ToolBarButton(
'approve',
@@ -59,12 +70,27 @@
);
</inp2:m_if>
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'frontend_mail',
+ '<inp2:m_phrase label="la_ToolTip_Email_FrontOnly" escape="1"/>',
+ function() {
+ submit_event('emailevents', 'OnFrontOnly');
+ }
+ )
+ );
+
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'view',
+ '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
+ function() {
show_viewmenu(a_toolbar,'view');
}
- ) );
+ )
+ );
a_toolbar.Render();
@@ -93,6 +119,6 @@
<inp2:m_RenderElement name="grid" PrefixSpecial="emailevents" IdField="EventId" grid="Emails" row_class_render_as="row_class"/>
<script type="text/javascript">
- Grids['emailevents'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline') );
+ Grids['emailevents'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline', 'frontend_mail') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: core/admin_templates/languages/email_message_settings.tpl
===================================================================
--- core/admin_templates/languages/email_message_settings.tpl (revision 0)
+++ core/admin_templates/languages/email_message_settings.tpl (revision 0)
@@ -0,0 +1,301 @@
+<inp2:adm_SetPopupSize width="875" height="650"/>
+
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailevents" title_preset="email_message_edit_settings" 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('emailevents','<inp2:emailevents_SaveEvent/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ cancel_edit('emailevents','OnCancelEdit','<inp2:emailevents_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('emailevents', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
+ }
+ ) );
+
+ <inp2:m_if check="emailevents_IsSingle" inverse="inverse">
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+ </inp2:m_if>
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('emailevents', '<inp2:emailevents_NextId/>');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_RenderElement name="edit_navigation" prefix="emailevents"/>
+ </script>
+ </td>
+
+ <inp2:m_RenderElement name="ml_selector" prefix="emailevents"/>
+ </tr>
+</tbody>
+</table>
+
+<inp2:emailevents_SaveWarning name="grid_save_warning"/>
+<inp2:emailevents_ErrorWarning name="form_error_warning"/>
+
+<inp2:m_DefineElement name="inp_edit_combo_target" caption_render_as="default_field_caption_element" read_only="0" has_empty="" hint_label="">
+ <inp2:m_if check="{$prefix}_FieldVisible" field="$field">
+ <tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" id="<inp2:$prefix_InputName field='$field'/>_row">
+ <inp2:m_RenderElement name="inp_edit_field_caption" caption_render_as="$caption_render_as" prefix="$prefix" field="$field" title="$title" hint_label="$hint_label"/>
+ <td class="control-cell">
+ <inp2:m_if check="m_Param" name="read_only">
+ <inp2:$prefix_Field name="{$field}Type"/>: "<inp2:$prefix_Field name="$field"/>"
+ <inp2:m_else/>
+ <select tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:{$prefix}_InputName field='{$field}Type'/>" id="<inp2:{$prefix}_InputName field='{$field}Type'/>">
+ <inp2:{$prefix}_PredefinedOptions field="{$field}Type" block="inp_option_phrase" selected="selected" has_empty="$has_empty"/>
+ </select>
+
+ <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'/>" style="width: 250px;"/>
+ </inp2:m_if>
+
+ <script type="text/javascript">
+ fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>Type'] = '<inp2:m_phrase label="{$title}Type" js_escape="1"/>'
+
+ new AJAXDropDown(
+ '<inp2:$prefix_InputName name="$field" js_escape="1"/>',
+ function(cur_value) {
+ var $type = $( jq('#<inp2:$prefix_InputName name="{$field}Type" js_escape="1"/>') ).val();
+
+ if ( !isNaN( parseInt($type) ) ) {
+ var $url = '<inp2:m_Link template="dummy" pass="m,$prefix" {$prefix}_event="OnSuggestAddress" value="#VALUE#" type="#TYPE#" no_amp="1"/>';
+
+ return $url.replace('#VALUE#', encodeURIComponent(cur_value)).replace('#TYPE#', encodeURIComponent($type));
+ }
+
+ return false;
+ }
+ );
+
+ $(document).ready(
+ function () {
+ $( jq('#<inp2:$prefix_InputName name="{$field}Type"/>') ).change(
+ function ($e) {
+ var $me = $(this);
+
+ if ($me.attr('disabled')) {
+ return ;
+ }
+
+ var $type_selected = !isNaN( parseInt( $me.val() ) );
+ $( jq('#<inp2:$prefix_InputName name="$field"/>') ).attr('disabled', $type_selected ? '' : 'disabled');
+ }
+ )
+ .change();
+ }
+ );
+ </script>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+ </tr>
+ </inp2:m_if>
+</inp2:m_DefineElement>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="AllowChangingSender,CustomSender,SenderAddress,SenderAddressType,SenderName" title="la_section_SenderInfo"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="AllowChangingSender" title="la_fld_AllowChangingSender"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingSender">
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="CustomSender" title="la_fld_CustomSender"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="SenderAddress" title="la_fld_SenderAddress" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="SenderName" title="la_fld_SenderName" style="width: 318px;"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="CustomSender" title="la_fld_CustomSender"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="SenderAddress" title="la_fld_SenderAddress" read_only="1"/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="SenderName" title="la_fld_SenderName"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="AllowChangingRecipient,CustomRecipient,RecipientType,RecipientAddress,RecipientAddressType,RecipientName,Recipients" title="la_section_RecipientsInfo"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="AllowChangingRecipient" title="la_fld_AllowChangingRecipient"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="CustomRecipient" title="la_fld_CustomRecipient"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="emailevents" field="CustomRecipient" title="la_fld_CustomRecipient"/>
+ <inp2:emailevents_RemoveToRecipientType/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="RecipientType" title="la_fld_RecipientType"/>
+ <inp2:m_RenderElement name="inp_edit_combo_target" prefix="emailevents" field="RecipientAddress" title="la_fld_RecipientAddress" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="RecipientName" title="la_fld_RecipientName" style="width: 318px;"/>
+ <inp2:m_RenderElement name="inp_edit_minput" prefix="emailevents" field="Recipients" title="la_fld_Recipients" format="auto" style="width: 400px; height: 150px;"/>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Tag,Replacement,ReplacementTagsXML" title="la_section_ReplacementTags"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="emailevents" field="Tag" title="la_fld_Tag"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Replacement" title="la_fld_Replacement"control_options="{height: 60}"/>
+ <inp2:m_RenderElement name="inp_edit_minput" prefix="emailevents" field="ReplacementTagsXML" title="la_fld_ReplacementTags" allow_move="0" format="#Tag# = #Replacement#" style="width: 600px; height: 100px;"/>
+
+ <inp2:m_RenderElement name="subsection" prefix="emailevents" fields="Enabled,Description,FrontEndOnly,Type,MessageType,Headers,Module" title="!la_section_General!"/>
+ <inp2:m_if check="m_IsDebugMode">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="Enabled" title="la_fld_Enabled"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Description" title="la_fld_Description" control_options="{max_height: 50}"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="emailevents" field="FrontEndOnly" title="la_fld_FrontEndOnly"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="Type" title="la_fld_Type"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="emailevents" field="MessageType" title="la_fld_MessageType"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailevents" field="Headers" title="la_fld_ExtraHeaders" control_options="{max_height: 50}"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="emailevents" field="Module" title="la_fld_Module" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<script type="text/javascript">
+ <inp2:m_if check="emailevents_FieldVisible" field="Recipients">
+ // recipients
+ Recipients.formatLine = function($record_index) {
+ if (this.Records[$record_index]['RecipientName']) {
+ // name specified
+ if (this.Records[$record_index]['RecipientAddressType'] == 1) {
+ // email
+ this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#>';
+ }
+ else {
+ // other
+ this.ResultMask = '#RecipientType#: "#RecipientName#" <#RecipientAddress#> - #RecipientAddressType#';
+ }
+ }
+ else {
+ // name not specified
+ this.ResultMask = '#RecipientType#: #RecipientAddress# - #RecipientAddressType#';
+ }
+
+ return MultiInputControl.prototype.formatLine.call(this, $record_index);
+ }
+
+ Recipients.compareRecords = function($record_a, $record_b) {
+ var $equals = true;
+ var $compare_fields = ['RecipientAddressType', 'RecipientAddress'];
+
+ for (var $i = 0; $i < $compare_fields.length; $i++) {
+ var $field_name = $compare_fields[$i];
+
+ if ($record_a[$field_name] !== $record_b[$field_name]) {
+ return false;
+ }
+ }
+
+ return $equals;
+ }
+
+ <inp2:m_ifnot check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ Recipients.isReadOnly = function($record_index) {
+ return this.Records[$record_index]['RecipientType'] == <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>;
+ }
+
+ <inp2:emailevents_RestoreRecipientType/>
+ Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientType" strip_nl="2"/>, 'default': <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>});
+ <inp2:m_else/>
+ Recipients.registerControl('RecipientType', {type: 'radio', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientType" strip_nl="2"/>, 'default': <inp2:emailevents_FieldOption field="RecipientType" option="default"/>});
+ </inp2:m_ifnot>
+
+ Recipients.registerControl('RecipientAddressType', {type: 'select', required: true, options: <inp2:m_RenderElement name="inp_json_options" prefix="emailevents" field="RecipientAddressType" strip_nl="2"/>, 'default': <inp2:emailevents_FieldOption field="RecipientAddressType" option="default"/>});
+ Recipients.registerControl('RecipientAddress', {type: 'textbox', required: true, 'default': '<inp2:emailevents_FieldOption field="RecipientAddress" option="default" js_escape="1"/>'});
+ Recipients.registerControl('RecipientName', {type: 'textbox', required: false, 'default': '<inp2:emailevents_FieldOption field="RecipientName" option="default" js_escape="1"/>'});
+ Recipients.LoadValues();
+ </inp2:m_if>
+
+ <inp2:m_if check="emailevents_FieldVisible" field="ReplacementTagsXML">
+ // replacement tags
+ ReplacementTagsXML.formatLine = function($record_index) {
+ var $ret = MultiInputControl.prototype.formatLine.call(this, $record_index, false);
+
+ if ($ret.length > 80) {
+ $ret = $ret.substring(0, 80) + ' ...';
+ }
+
+ return this.htmlspecialchars($ret);
+ }
+
+ ReplacementTagsXML.compareRecords = function($record_a, $record_b) {
+ return $record_a['Tag'] == $record_b['Tag'];
+ }
+
+ ReplacementTagsXML.registerControl('Tag', 'textbox', true);
+ ReplacementTagsXML.registerControl('Replacement', 'textbox', true);
+ ReplacementTagsXML.LoadValues();
+ </inp2:m_if>
+
+ // reflect custom sender & custom recipient radio button-dependent controls
+ var $field_mask = '<inp2:emailevents_InputName name="#FIELD_NAME#" js_escape="1"/>';
+
+ function reflectCustomSender() {
+ var $default_sender = get_control($field_mask, 'CustomSender', '0').checked;
+ var $type = get_control($field_mask, 'SenderAddressType');
+
+ $type.disabled = $default_sender;
+ get_control($field_mask, 'SenderAddress').disabled = $default_sender;
+ get_control($field_mask, 'SenderName').disabled = $default_sender;
+
+ $($type).change();
+ }
+
+ function reflectCustomRecipient() {
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ var $default_recipient = get_control($field_mask, 'CustomRecipient', '0').checked;
+ var $to_recipient = get_control($field_mask, 'RecipientType', <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>);
+ <inp2:m_else/>
+ var $default_recipient = <inp2:m_if check="emailevents_Field" name="CustomRecipient" db="db" equals_to="0">true<inp2:m_else/>false</inp2:m_if>;
+ </inp2:m_if>
+
+ if ($default_recipient) {
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ if ($to_recipient.checked) {
+ get_control($field_mask, 'RecipientType', <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>).checked = true;
+ }
+ </inp2:m_if>
+
+ Recipients.registerControl('RecipientType', {'default': <inp2:m_GetConst name="RECIPIENT_TYPE_CC"/>}, true);
+ }
+ else {
+ Recipients.registerControl('RecipientType', {'default': <inp2:m_GetConst name="RECIPIENT_TYPE_TO"/>}, true);
+ }
+
+ <inp2:m_if check="emailevents_IsEditable" check_field="AllowChangingRecipient">
+ $to_recipient.disabled = $default_recipient;
+ </inp2:m_if>
+ }
+
+ reflectCustomSender();
+ reflectCustomRecipient();
+
+ $(document).ready(
+ function () {
+ $("input[name='" + jq($field_mask.replace('#FIELD_NAME#', 'CustomSender')) + "']").click(reflectCustomSender);
+ $("input[name='" + jq($field_mask.replace('#FIELD_NAME#', 'CustomRecipient')) + "']").click(reflectCustomRecipient);
+ }
+ );
+
+ // enable all disabled controls before submit
+ Application.setHook('emailevents:*',
+ function () {
+ $(':input:disabled').attr('disabled', '');
+ }
+ )
+</script>
+
+<inp2:m_include t="incs/footer"/>
Index: core/install/english.lang
===================================================================
--- core/install/english.lang (revision 13614)
+++ core/install/english.lang (working copy)
@@ -16,6 +16,7 @@
<PHRASE Label="la_AvailableItems" Module="Core" Type="1">QXZhaWxhYmxlIEl0ZW1z</PHRASE>
<PHRASE Label="la_Background" Module="Core" Type="1">QmFja2dyb3VuZA==</PHRASE>
<PHRASE Label="la_Borders" Module="Core" Type="1">Qm9yZGVycw==</PHRASE>
+ <PHRASE Label="la_btn_Add" Module="Core" Type="1">QWRk</PHRASE>
<PHRASE Label="la_btn_BrowseMode" Module="Core" Type="1">QnJvd3NlIE1vZGU=</PHRASE>
<PHRASE Label="la_btn_Cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
<PHRASE Label="la_btn_Change" Module="Core" Type="1">Q2hhbmdl</PHRASE>
@@ -86,7 +87,6 @@
<PHRASE Label="la_col_FilePath" Module="Core" Type="1">UGF0aA==</PHRASE>
<PHRASE Label="la_col_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
<PHRASE Label="la_col_FromEmail" Module="Core" Type="1">RnJvbSBFLW1haWw=</PHRASE>
- <PHRASE Label="la_col_FromToUser" Module="Core" Type="1">RnJvbSAvIFRvIFVzZXI=</PHRASE>
<PHRASE Label="la_col_FrontEndOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_col_FrontRegistration" Module="Core" Type="1">QWxsb3cgUmVnaXN0cmF0aW9u</PHRASE>
<PHRASE Label="la_col_GroupName" Module="Core" Type="1">R3JvdXAgTmFtZQ==</PHRASE>
@@ -309,6 +309,7 @@
<PHRASE Label="la_error_copy_subcategory" Module="Core" Type="1">RXJyb3IgY29weWluZyBzdWJzZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_error_CustomExists" Module="Core" Type="1">Q3VzdG9tIGZpZWxkIHdpdGggaWRlbnRpY2FsIG5hbWUgYWxyZWFkeSBleGlzdHM=</PHRASE>
<PHRASE Label="la_error_FileTooLarge" Module="Core" Type="1">RmlsZSBpcyB0b28gbGFyZ2U=</PHRASE>
+ <PHRASE Label="la_error_GroupNotFound" Module="Core" Type="1">Z3JvdXAgbm90IGZvdW5k</PHRASE>
<PHRASE Label="la_error_InvalidFileFormat" Module="Core" Type="1">SW52YWxpZCBGaWxlIEZvcm1hdA==</PHRASE>
<PHRASE Label="la_error_invalidoption" Module="Core" Type="1">aW52YWxpZCBvcHRpb24=</PHRASE>
<PHRASE Label="la_error_LoginFailed" Module="Core" Type="1">TG9naW4gRmFpbGVk</PHRASE>
@@ -355,6 +356,8 @@
<PHRASE Label="la_fld_AdminInterfaceLang" Module="Core" Type="1">QWRtaW4gUHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_fld_AdvancedCSS" Module="Core" Type="1">QWR2YW5jZWQgQ1NT</PHRASE>
<PHRASE Label="la_fld_AdvancedSearch" Module="Core" Type="1">QWR2YW5jZWQgU2VhcmNo</PHRASE>
+ <PHRASE Label="la_fld_AllowChangingRecipient" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgIlRvIiBSZWNpcGllbnQ=</PHRASE>
+ <PHRASE Label="la_fld_AllowChangingSender" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgU2VuZGVy</PHRASE>
<PHRASE Label="la_fld_AltValue" Module="Core" Type="1">QWx0IFZhbHVl</PHRASE>
<PHRASE Label="LA_FLD_ATTACHMENT" Module="Core" Type="1">QXR0YWNobWVudA==</PHRASE>
<PHRASE Label="la_fld_AutoCreateFileName" Module="Core" Type="1">QXV0byBDcmVhdGUgRmlsZSBOYW1l</PHRASE>
@@ -396,6 +399,8 @@
<PHRASE Label="la_fld_CSS" Module="Core" Type="1">Q1NTIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_Cursor" Module="Core" Type="1">Q3Vyc29y</PHRASE>
<PHRASE Label="la_fld_CustomDetailTemplate" Module="Core" Type="1">Q3VzdG9tIERldGFpbHMgVGVtcGxhdGU=</PHRASE>
+ <PHRASE Label="la_fld_CustomRecipient" Module="Core" Type="1">U2VuZCBFbWFpbCBUbw==</PHRASE>
+ <PHRASE Label="la_fld_CustomSender" Module="Core" Type="1">U2VuZCBFbWFpbCBGcm9t</PHRASE>
<PHRASE Label="la_fld_CustomTemplate" Module="Core" Type="1">DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KRGV0YWlscyBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_DateFormat" Module="Core" Type="1">RGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_DecimalPoint" Module="Core" Type="1">RGVjaW1hbCBQb2ludA==</PHRASE>
@@ -456,7 +461,6 @@
<PHRASE Label="la_fld_FormSubmittedTemplate" Module="Core" Type="1">T25saW5lIEZvcm0gU3VibWl0dGVkIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_FriendlyURL" Module="Core" Type="1">U2hvcnQgVVJM</PHRASE>
<PHRASE Label="la_fld_FromEmail" Module="Core" Type="1">RnJvbSBFbWFpbA==</PHRASE>
- <PHRASE Label="la_fld_FromToUser" Module="Core" Type="1">RnJvbSAvIFRvIFVzZXI=</PHRASE>
<PHRASE Label="la_fld_FrontEndOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_fld_FrontRegistration" Module="Core" Type="1">QWxsb3cgUmVnaXN0cmF0aW9uIG9uIEZyb250LWVuZA==</PHRASE>
<PHRASE Label="la_fld_GroupId" Module="Core" Type="1">SUQ=</PHRASE>
@@ -563,12 +567,18 @@
<PHRASE Label="la_fld_Priority" Module="Core" Type="1">T3JkZXI=</PHRASE>
<PHRASE Label="la_fld_Qty" Module="Core" Type="1">UXVhbnRpdHk=</PHRASE>
<PHRASE Label="la_fld_Rating" Module="Core" Type="1">UmF0aW5n</PHRASE>
+ <PHRASE Label="la_fld_RecipientAddress" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcw==</PHRASE>
+ <PHRASE Label="la_fld_RecipientAddressType" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcyBUeXBl</PHRASE>
+ <PHRASE Label="la_fld_RecipientName" Module="Core" Type="1">UmVjaXBpZW50J3MgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_fld_Recipients" Module="Core" Type="1">UmVjaXBpZW50cw==</PHRASE>
+ <PHRASE Label="la_fld_RecipientType" Module="Core" Type="1">UmVjaXBpZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_fld_RedirectOnIPMatch" Module="Core" Type="1">Rm9yY2UgUmVkaXJlY3QgKHdoZW4gdXNlcidzIElQIG1hdGNoZXMp</PHRASE>
<PHRASE Label="la_fld_ReferrerURL" Module="Core" Type="1">UmVmZXJyZXIgVVJM</PHRASE>
<PHRASE Label="la_fld_RelatedSearchKeyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
<PHRASE Label="la_fld_RelationshipType" Module="Core" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_fld_RemoteUrl" Module="Core" Type="1">UmVtb3RlIFVSTA==</PHRASE>
<PHRASE Label="la_fld_ReplaceDuplicates" Module="Core" Type="1">UmVwbGFjZSBEdXBsaWNhdGVz</PHRASE>
+ <PHRASE Label="la_fld_Replacement" Module="Core" Type="1">UmVwbGFjZW1lbnQ=</PHRASE>
<PHRASE Label="la_fld_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
<PHRASE Label="la_fld_RepliedOn" Module="Core" Type="1">UmVwbGllZCBPbg==</PHRASE>
<PHRASE Label="la_fld_ReplyBcc" Module="Core" Type="1">UmVwbHkgQmNj</PHRASE>
@@ -589,6 +599,8 @@
<PHRASE Label="la_fld_SelectorData" Module="Core" Type="1">U3R5bGU=</PHRASE>
<PHRASE Label="la_fld_SelectorId" Module="Core" Type="1">U2VsZWN0b3IgSUQ=</PHRASE>
<PHRASE Label="la_fld_SelectorName" Module="Core" Type="1">U2VsZWN0b3IgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_fld_SenderAddress" Module="Core" Type="1">U2VuZGVyJ3MgQWRkcmVzcw==</PHRASE>
+ <PHRASE Label="la_fld_SenderName" Module="Core" Type="1">U2VuZGVyJ3MgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SentOn" Module="Core" Type="1">U2VudCBPbg==</PHRASE>
<PHRASE Label="la_fld_SentStatus" Module="Core" Type="1">U2VudA==</PHRASE>
<PHRASE Label="la_fld_Server" Module="Core" Type="1">U2VydmVy</PHRASE>
@@ -609,6 +621,7 @@
<PHRASE Label="la_fld_SuggestedCorrection" Module="Core" Type="1">U3VnZ2VzdGVkIENvcnJlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_SymLinkCategoryId" Module="Core" Type="1">UG9pbnRzIHRvIFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_TableName" Module="Core" Type="1">VGFibGUgTmFtZSBpbiBEYXRhYmFzZSA=</PHRASE>
+ <PHRASE Label="la_fld_Tag" Module="Core" Type="1">VGFn</PHRASE>
<PHRASE Label="la_fld_TargetId" Module="Core" Type="1">SXRlbQ==</PHRASE>
<PHRASE Label="la_fld_TemplateFile" Module="Core" Type="1">VGVtcGxhdGUgRmlsZQ==</PHRASE>
<PHRASE Label="la_fld_TemplateType" Module="Core" Type="1">VGVtcGxhdGU=</PHRASE>
@@ -738,7 +751,10 @@
<PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_opt_CurrentDomain" Module="Core" Type="1">Q3VycmVudCBEb21haW4=</PHRASE>
+ <PHRASE Label="la_opt_CustomRecipients" Module="Core" Type="1">Q3VzdG9tICJUbyIgUmVjaXBpZW50KC1zKQ==</PHRASE>
+ <PHRASE Label="la_opt_CustomSender" Module="Core" Type="1">Q3VzdG9tIFNlbmRlcg==</PHRASE>
<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
+ <PHRASE Label="la_opt_DefaultAddress" Module="Core" Type="1">RGVmYXVsdCBXZWJzaXRlIGFkZHJlc3M=</PHRASE>
<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
<PHRASE Label="la_opt_Description" Module="Core" Type="1">RGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="la_opt_Disabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
@@ -752,6 +768,7 @@
<PHRASE Label="la_opt_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVXJs</PHRASE>
<PHRASE Label="la_opt_Failed" Module="Core" Type="1">RmFpbGVk</PHRASE>
<PHRASE Label="la_opt_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
+ <PHRASE Label="la_opt_Group" Module="Core" Type="1">R3JvdXA=</PHRASE>
<PHRASE Label="la_opt_GuestsOnly" Module="Core" Type="1">R3Vlc3RzIE9ubHk=</PHRASE>
<PHRASE Label="la_opt_hour" Module="Core" Type="1">aG91cihzKQ==</PHRASE>
<PHRASE Label="la_opt_InheritFromParent" Module="Core" Type="1">SW5oZXJpdCBmcm9tIFBhcmVudA==</PHRASE>
@@ -978,7 +995,11 @@
<PHRASE Label="la_section_PageCaching" Module="Core" Type="1">U2VjdGlvbiBDYWNoaW5n</PHRASE>
<PHRASE Label="la_section_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
<PHRASE Label="la_section_QuickLinks" Module="Core" Type="1">UXVpY2sgTGlua3M=</PHRASE>
+ <PHRASE Label="la_section_RecipientsInfo" Module="Core" Type="1">UmVjaXBpZW50cyBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_section_Relation" Module="Core" Type="1">UmVsYXRpb24=</PHRASE>
+ <PHRASE Label="la_section_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
+ <PHRASE Label="la_section_SenderInfo" Module="Core" Type="1">U2VuZGVyIEluZm9ybWF0aW9u</PHRASE>
+ <PHRASE Label="la_section_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_section_SettingsAdmin" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsCaching" Module="Core" Type="1">Q2FjaGluZyBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsCSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydCBTZXR0aW5ncw==</PHRASE>
@@ -1073,6 +1094,7 @@
<PHRASE Label="la_Tab_Service" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
<PHRASE Label="la_tab_SessionLog" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
<PHRASE Label="la_tab_SessionLogs" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
+ <PHRASE Label="la_tab_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_tab_ShowAll" Module="Core" Type="1">U2hvdyBBbGw=</PHRASE>
<PHRASE Label="la_tab_ShowStructure" Module="Core" Type="1">U2hvdyBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_tab_Site_Structure" Module="Core" Type="1">V2Vic2l0ZSAmIENvbnRlbnQ=</PHRASE>
@@ -1256,6 +1278,7 @@
<PHRASE Label="la_title_Messages" Module="Core" Type="1">TWVzc2FnZXM=</PHRASE>
<PHRASE Label="la_title_Module_Status" Module="Core" Type="1">TW9kdWxlcw==</PHRASE>
<PHRASE Label="la_title_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</PHRASE>
+ <PHRASE Label="la_title_NewEmailEvent" Module="Core" Type="1">TmV3IEVtYWlsIEV2ZW50</PHRASE>
<PHRASE Label="la_title_NewFile" Module="Core" Type="1">TmV3IEZpbGU=</PHRASE>
<PHRASE Label="la_title_NewReply" Module="Core" Type="1">TmV3IFJlcGx5</PHRASE>
<PHRASE Label="la_title_NewTheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
Index: core/install/install_data.sql
===================================================================
--- core/install/install_data.sql (revision 13614)
+++ core/install/install_data.sql (working copy)
@@ -132,41 +132,41 @@
INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category');
INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User');
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 0, NULL, 'Core:Users', 'Add User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 1, NULL, 'Core:Users', 'Add User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 0, NULL, 'Core:Users', 'Approve User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 1, NULL, 'Core:Users', 'Approve User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 0, NULL, 'Core:Users', 'Validate User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 1, NULL, 'Core:Users', 'Validate User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 0, NULL, 'Core:Users', 'Deny User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 1, NULL, 'Core:Users', 'Deny User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 1, NULL, 'Core:Users', 'Forgot Password', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 0, NULL, 'Core:Users', 'Forgot Password', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, NULL, 'Core:Users', 'Add Pending User', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 1, NULL, 'Core:Users', 'Add Pending User', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, NULL, 'Core:Category', 'Add Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, NULL, 'Core:Category', 'Add Pending Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 1, NULL, 'Core:Category', 'Add Pending Category', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 1, NULL, 'Core:Category', 'Add Category', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, NULL, 'Core:Category', 'Approve Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, NULL, 'Core:Category', 'Deny Category', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, NULL, 'Core:Users', 'User subscribed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 1, NULL, 'Core:Users', 'User subscribed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, NULL, 'Core:Users', 'User unsubscribed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 1, NULL, 'Core:Users', 'User unsubscribed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 0, NULL, 'Core:Users', 'Suggest to a friend', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 1, NULL, 'Core:Users', 'Suggest to a friend', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.PSWDC', NULL, 1, 0, NULL, 'Core:Users', 'Password Confirmation', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, NULL, 'Core:Users', 'Membership expired', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, NULL, 'Core:Users', 'Membership expired', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, NULL, 'Core:Users', 'Membership expiration notice', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, NULL, 'Core:Users', 'Membership expiration notice', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, NULL, 'Core', 'Common Footer Template', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, NULL, 'Core:Category', 'This e-mail is sent to a user after filling in the Contact Us form', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, NULL, 'Core:Category', 'This e-mail is sent to a user after filling in the Contact Us form', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, NULL, 'Core:Category', 'Admin Reply to User Form Submission', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, NULL, 'Core:Category', 'User Replied to It\'s Form Submission', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, NULL, 'Core:Category', 'Form Submission Admin Reply Delivery Failure', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 0, 'Core', 'Add User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 1, 'Core', 'Add User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 0, 'Core', 'Approve User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 1, 'Core', 'Approve User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 0, 'Core', 'Validate User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 1, 'Core', 'Validate User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 0, 'Core', 'Deny User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 1, 'Core', 'Deny User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 1, 'Core', 'Forgot Password', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWD', NULL, 1, 0, 'Core', 'Forgot Password', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending User', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending User', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, 'Core', 'Add Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending Category', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 1, 'Core', 'Add Category', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, 'Core', 'Approve Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, 'Core', 'Deny Category', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, 'Core', 'User subscribed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 1, 'Core', 'User subscribed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, 'Core', 'User unsubscribed', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 1, 'Core', 'User unsubscribed', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 0, 'Core', 'Suggest to a friend', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 1, 'Core', 'Suggest to a friend', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWDC', NULL, 1, 0, 'Core', 'Password Confirmation', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, 'Core', 'Common Footer Template', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 0, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, 'Core', 'Admin Reply to User Form Submission', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, 'Core', 'User Replied to It\'s Form Submission', 1, 1, 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, 'Core', 'Form Submission Admin Reply Delivery Failure', 1, 1, 1);
INSERT INTO IdGenerator VALUES ('100');
@@ -569,8 +569,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.edit', 11, 1, 1, 0);
@@ -587,8 +585,6 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.edit', 11, 1, 1, 0);
@@ -677,7 +673,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.delete', 11, 1, 1, 0);
-INSERT INTO Skins VALUES(DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n font-size: 11px;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/progress_left.gif'');\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1272217243, 1);
+INSERT INTO Skins VALUES(DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n font-size: 11px;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/progress_left.gif'');\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}\r\n\r\n/* Ajax Dropdown */\r\n.suggest-box {\r\n border: 1px solid #999;\r\n background-color: #fff;\r\n}\r\n\r\n.suggest-item, .suggest-item-over {\r\n padding: 1px 2px 0px 2px;\r\n font-family: arial,verdana;\r\n font-size: 12px;\r\n}\r\n\r\n.suggest-item-over {\r\n background-color: #3366CC;\r\n color: #fff;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1273946818, 1);
INSERT INTO LocalesList VALUES
(1, '0x0436', 'Afrikaans (South Africa)', 'af-ZA', 'Latn', '1252'),
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql (revision 13559)
+++ core/install/install_schema.sql (working copy)
@@ -93,6 +93,14 @@
EventId int(11) NOT NULL AUTO_INCREMENT,
`Event` varchar(40) NOT NULL DEFAULT '',
ReplacementTags text,
+ AllowChangingSender tinyint(4) NOT NULL DEFAULT '0',
+ CustomSender tinyint(4) NOT NULL DEFAULT '0',
+ SenderName varchar(255) NOT NULL DEFAULT '',
+ SenderAddressType tinyint(4) NOT NULL DEFAULT '0',
+ SenderAddress varchar(255) NOT NULL DEFAULT '',
+ AllowChangingRecipient tinyint(4) NOT NULL DEFAULT '0',
+ CustomRecipient tinyint(4) NOT NULL DEFAULT '0',
+ Recipients text,
l1_Subject text,
l2_Subject text,
l3_Subject text,
@@ -107,7 +115,6 @@
MessageType varchar(4) NOT NULL DEFAULT 'text',
Enabled int(11) NOT NULL DEFAULT '1',
FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
- FromUserId int(11) DEFAULT NULL,
Module varchar(40) NOT NULL DEFAULT '',
Description text,
`Type` int(11) NOT NULL DEFAULT '0',
@@ -115,7 +122,12 @@
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY `Event` (`Event`),
- KEY FrontEndOnly (FrontEndOnly)
+ KEY FrontEndOnly (FrontEndOnly),
+ KEY AllowChangingSender (AllowChangingSender),
+ KEY CustomSender (CustomSender),
+ KEY SenderAddressType (SenderAddressType),
+ KEY AllowChangingRecipient (AllowChangingRecipient),
+ KEY CustomRecipient (CustomRecipient)
);
CREATE TABLE IdGenerator (
Index: core/install/upgrades.php
===================================================================
--- core/install/upgrades.php (revision 13557)
+++ core/install/upgrades.php (working copy)
@@ -1208,7 +1208,7 @@
if ($mode == 'before') {
// fix "Content" category
$fields_hash = Array (
- 'CreatedById' => -1, // root
+ 'CreatedById' => USER_ROOT,
'CreatedOn' => time(),
'ResourceId' => $this->Application->NextResourceId(),
);
@@ -1517,78 +1517,156 @@
$this->Conn->Query('DROP TABLE IF EXISTS ' . TABLE_PREFIX . 'Phrase');
$this->Conn->Query('RENAME TABLE ' . $temp_table . ' TO ' . TABLE_PREFIX . 'Phrase');
- // refactor StdDestinations table
- $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
- $this->Conn->Query($sql);
+ $this->_updateCountryStatesTable();
+ $this->_replaceConfigurationValueSeparator();
- $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
- CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
- CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
- CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
- CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
- CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
- DROP INDEX DestType,
- DROP INDEX DestParentId,
- ADD INDEX (`Type`),
- ADD INDEX (StateCountryId)';
- $this->Conn->Query($sql);
+ // save "config.php" in php format, not ini format as before
+ $this->_toolkit->SaveConfig();
+ }
- // move country/state translations from Phrase to CountryStates table
- $ml_helper->createFields('country-state');
+ if ($mode == 'after') {
+ $this->_transformEmailRecipients();
+ }
+ }
- for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
- if (!$ml_helper->LanguageFound($language_id)) {
- continue;
- }
+ /**
+ * Move country/state translations from Phrase to CountryStates table
+ *
+ */
+ function _updateCountryStatesTable()
+ {
+ // refactor StdDestinations table
+ $sql = 'RENAME TABLE ' . TABLE_PREFIX . 'StdDestinations TO ' . TABLE_PREFIX . 'CountryStates';
+ $this->Conn->Query($sql);
- $sub_select = ' SELECT l' . $language_id . '_Translation
- FROM ' . TABLE_PREFIX . 'Phrase
- WHERE Phrase = DestName';
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ CHANGE DestId CountryStateId INT(11) NOT NULL AUTO_INCREMENT,
+ CHANGE DestType Type INT(11) NOT NULL DEFAULT \'1\',
+ CHANGE DestParentId StateCountryId INT(11) NULL DEFAULT NULL,
+ CHANGE DestAbbr IsoCode CHAR(3) NOT NULL DEFAULT \'\',
+ CHANGE DestAbbr2 ShortIsoCode CHAR(2) NULL DEFAULT NULL,
+ DROP INDEX DestType,
+ DROP INDEX DestParentId,
+ ADD INDEX (`Type`),
+ ADD INDEX (StateCountryId)';
+ $this->Conn->Query($sql);
- $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
- SET l' . $language_id . '_Name = (' . $sub_select . ')';
- $this->Conn->Query($sql);
+ $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
+ /* @var $ml_helper kMultiLanguageHelper */
+
+ $ml_helper->createFields('country-state');
+
+ for ($language_id = 1; $language_id <= $ml_helper->languageCount; $language_id++) {
+ if (!$ml_helper->LanguageFound($language_id)) {
+ continue;
}
- $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
- DROP DestName';
- $this->Conn->Query($sql);
+ $sub_select = ' SELECT l' . $language_id . '_Translation
+ FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase = DestName';
- $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
- WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $sql = 'UPDATE ' . TABLE_PREFIX . 'CountryStates
+ SET l' . $language_id . '_Name = (' . $sub_select . ')';
$this->Conn->Query($sql);
+ }
- // makes configuration values dropdowns use "||" as separator
- $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
- /* @var $custom_field_helper InpCustomFieldsHelper */
+ $sql = 'ALTER TABLE ' . TABLE_PREFIX . 'CountryStates
+ DROP DestName';
+ $this->Conn->Query($sql);
- $sql = 'SELECT ValueList, VariableName
- FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
- WHERE ValueList LIKE "%,%"';
- $variables = $this->Conn->GetCol($sql, 'VariableName');
+ $sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
+ WHERE Phrase LIKE ' . $this->Conn->qstr('la_country_%') . ' OR Phrase LIKE ' . $this->Conn->qstr('la_state_%');
+ $this->Conn->Query($sql);
+ }
- foreach ($variables as $variable_name => $value_list) {
- $ret = Array ();
- $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+ /**
+ * Makes configuration values dropdowns use "||" as separator
+ *
+ */
+ function _replaceConfigurationValueSeparator()
+ {
+ $custom_field_helper =& $this->Application->recallObject('InpCustomFieldsHelper');
+ /* @var $custom_field_helper InpCustomFieldsHelper */
- foreach ($options as $option_key => $option_title) {
- if (substr($option_key, 0, 3) == 'SQL') {
- $ret[] = $option_title;
- }
- else {
- $ret[] = $option_key . '=' . $option_title;
- }
+ $sql = 'SELECT ValueList, VariableName
+ FROM ' . TABLE_PREFIX . 'ConfigurationAdmin
+ WHERE ValueList LIKE "%,%"';
+ $variables = $this->Conn->GetCol($sql, 'VariableName');
+
+ foreach ($variables as $variable_name => $value_list) {
+ $ret = Array ();
+ $options = $custom_field_helper->GetValuesHash($value_list, ',', false);
+
+ foreach ($options as $option_key => $option_title) {
+ if (substr($option_key, 0, 3) == 'SQL') {
+ $ret[] = $option_title;
}
+ else {
+ $ret[] = $option_key . '=' . $option_title;
+ }
+ }
+ $fields_hash = Array (
+ 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ );
+
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ }
+ }
+
+ /**
+ * Transforms "FromUserId" into Sender* and Recipients columns
+ *
+ */
+ function _transformEmailRecipients()
+ {
+ $sql = 'SELECT FromUserId, Type, EventId
+ FROM ' . TABLE_PREFIX . 'Events
+ WHERE FromUserId IS NOT NULL AND (FromUserId <> ' . USER_ROOT . ')';
+ $events = $this->Conn->Query($sql, 'EventId');
+
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ foreach ($events as $event_id => $event_data) {
+ $sql = 'SELECT Login
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE PortalUserId = ' . $event_data['FromUserId'];
+ $username = $this->Conn->GetOne($sql);
+
+ if (!$username) {
+ continue;
+ }
+
+ if ($event_data['Type'] == EVENT_TYPE_FRONTEND) {
+ // from user
$fields_hash = Array (
- 'ValueList' => implode(VALUE_LIST_SEPARATOR, $ret),
+ 'CustomSender' => 1,
+ 'SenderAddressType' => ADDRESS_TYPE_USER,
+ 'SenderAddress' => $username
);
+ }
- $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'ConfigurationAdmin', 'VariableName = ' . $this->Conn->qstr($variable_name));
+ if ($event_data['Type'] == EVENT_TYPE_ADMIN) {
+ // to user
+ $records = Array (
+ Array (
+ 'RecipientType' => RECIPIENT_TYPE_TO,
+ 'RecipientName' => '',
+ 'RecipientAddressType' => ADDRESS_TYPE_USER,
+ 'RecipientAddress' => $username
+ )
+ );
+
+ $fields_hash = Array (
+ 'CustomRecipient' => 1,
+ 'Recipients' => $minput_helper->prepareMInputXML($records, array_keys( reset($records) ))
+ );
}
- // save "config.php" in php format, not ini format as before
- $this->_toolkit->SaveConfig();
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'Events', 'EventId = ' . $event_id);
}
+
+ $this->Conn->Query('ALTER TABLE ' . TABLE_PREFIX . 'Events DROP FromUserId');
}
}
\ No newline at end of file
Index: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql (revision 13614)
+++ core/install/upgrades.sql (working copy)
@@ -1866,6 +1866,28 @@
KEY Priority (Priority)
);
+ALTER TABLE Events
+ ADD AllowChangingSender TINYINT NOT NULL DEFAULT '0' AFTER ReplacementTags ,
+ ADD CustomSender TINYINT NOT NULL DEFAULT '0' AFTER AllowChangingSender ,
+ ADD SenderName VARCHAR(255) NOT NULL DEFAULT '' AFTER CustomSender ,
+ ADD SenderAddressType TINYINT NOT NULL DEFAULT '0' AFTER SenderName ,
+ ADD SenderAddress VARCHAR(255) NOT NULL DEFAULT '' AFTER SenderAddressType ,
+ ADD AllowChangingRecipient TINYINT NOT NULL DEFAULT '0' AFTER SenderAddress ,
+ ADD CustomRecipient TINYINT NOT NULL DEFAULT '0' AFTER AllowChangingRecipient ,
+ ADD Recipients TEXT AFTER CustomRecipient,
+ ADD INDEX (AllowChangingSender),
+ ADD INDEX (CustomSender),
+ ADD INDEX (SenderAddressType),
+ ADD INDEX (AllowChangingRecipient),
+ ADD INDEX (CustomRecipient);
+
+UPDATE Events SET AllowChangingSender = 1, AllowChangingRecipient = 1;
+UPDATE Events SET Module = 'Core' WHERE Module LIKE 'Core:%';
+
+DELETE FROM Permissions WHERE Permission LIKE 'in-portal:configuration_email%';
+DELETE FROM Permissions WHERE Permission LIKE 'in-portal:user_email%';
+DELETE FROM Phrase WHERE Phrase IN ('la_fld_FromToUser', 'la_col_FromToUser');
+
DELETE FROM Phrase WHERE Phrase = 'la_config_time_server';
DELETE FROM ConfigurationValues WHERE VariableName = 'Config_Server_Time';
UPDATE ConfigurationValues SET ValueList = NULL, DisplayOrder = 20.02 WHERE VariableName = 'Config_Site_Time';
Index: core/kernel/application.php
===================================================================
--- core/kernel/application.php (revision 13613)
+++ core/kernel/application.php (working copy)
@@ -2847,11 +2847,12 @@
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEventAdmin($email_event_name, $to_user_id = null, $send_params = false)
+ function &EmailEventAdmin($email_event_name, $to_user_id = null, $send_params = Array ())
{
- $event =& $this->EmailEvent($email_event_name, 1, $to_user_id, $send_params);
+ $event =& $this->EmailEvent($email_event_name, EVENT_TYPE_ADMIN, $to_user_id, $send_params);
+
return $event;
}
@@ -2861,11 +2862,12 @@
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEventUser($email_event_name, $to_user_id = null, $send_params = false)
+ function &EmailEventUser($email_event_name, $to_user_id = null, $send_params = Array ())
{
- $event =& $this->EmailEvent($email_event_name, 0, $to_user_id, $send_params);
+ $event =& $this->EmailEvent($email_event_name, EVENT_TYPE_FRONTEND, $to_user_id, $send_params);
+
return $event;
}
@@ -2873,23 +2875,28 @@
* Triggers general email event
*
* @param string $email_event_name
- * @param int $email_event_type ( 0 for User, 1 for Admin)
+ * @param int $email_event_type (0 for User, 1 for Admin)
* @param int $to_user_id
* @param array $send_params associative array of direct send params,
* possible keys: to_email, to_name, from_email, from_name, message, message_text
- * @return unknown
+ * @return kEvent
*/
- function &EmailEvent($email_event_name, $email_event_type, $to_user_id = -1, $send_params = false)
+ function &EmailEvent($email_event_name, $email_event_type, $to_user_id = null, $send_params = Array ())
{
- $params = array(
+ $params = Array (
'EmailEventName' => $email_event_name,
'EmailEventToUserId' => $to_user_id,
'EmailEventType' => $email_event_type,
+ 'DirectSendParams' => $send_params,
);
- if ($send_params) {
- $params['DirectSendParams'] = $send_params;
+
+ if (array_key_exists('use_special', $send_params)) {
+ $event_str = 'emailevents.' . $send_params['use_special'] . ':OnEmailEvent';
}
- $event_str = isset($send_params['use_special']) ? 'emailevents.'.$send_params['use_special'].':OnEmailEvent' : 'emailevents:OnEmailEvent';
+ else {
+ $event_str = 'emailevents:OnEmailEvent';
+ }
+
$this->HandleEvent($event, $event_str, $params);
return $event;
Index: core/kernel/constants.php
===================================================================
--- core/kernel/constants.php (revision 13581)
+++ core/kernel/constants.php (working copy)
@@ -84,10 +84,7 @@
define('clUPDATE', 2);
define('clDELETE', 3);
- /**
- * Separator for ValueList fields
- *
- */
+ // Separator for ValueList fields
define('VALUE_LIST_SEPARATOR', '||');
// template editing modes
@@ -117,10 +114,7 @@
define('SMS_MODE_AUTO', 1);
define('SMS_MODE_FORCE', 2);
- /**
- * Means, that actual category Template field value should inherited from parent category
- *
- */
+ // Means, that actual category Template field value should inherited from parent category
define('CATEGORY_TEMPLATE_INHERIT', '#inherit#');
define('REWRITE_MODE_BUILD', 1);
@@ -168,5 +162,14 @@
define('SITE_DOMAIN_REDIRECT_CURRENT', 1);
define('SITE_DOMAIN_REDIRECT_EXTERNAL', 2);
+ // email event address types
+ define('ADDRESS_TYPE_EMAIL', 1);
+ define('ADDRESS_TYPE_USER', 2);
+ define('ADDRESS_TYPE_GROUP', 3);
+
+ define('RECIPIENT_TYPE_TO', 1);
+ define('RECIPIENT_TYPE_CC', 2);
+ define('RECIPIENT_TYPE_BCC', 3);
+
define ('KG_TO_POUND', 2.20462262);
define ('POUND_TO_KG', 0.45359237);
\ No newline at end of file
Index: core/units/categories/categories_config.php
===================================================================
--- core/units/categories/categories_config.php (revision 13581)
+++ core/units/categories/categories_config.php (working copy)
@@ -216,7 +216,7 @@
'PermItemPrefix' => 'CATEGORY',
- 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'email' => 'in-portal:configuration_email', 'custom' => 'in-portal:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'custom' => 'in-portal:configuration_custom'),
'Sections' => Array (
'in-portal:configure_categories' => Array (
@@ -239,23 +239,13 @@
'type' => stTREE,
),
- 'in-portal:configuration_email' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'module' => 'Core:Category', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 11.3,
- 'type' => stTREE,
- ),
-
'in-portal:configuration_custom' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
- 'priority' => 11.4,
+ 'priority' => 11.3,
'type' => stTREE,
),
),
Index: core/units/email_events/email_event_tp.php
===================================================================
--- core/units/email_events/email_event_tp.php (revision 13557)
+++ core/units/email_events/email_event_tp.php (working copy)
@@ -21,4 +21,54 @@
$this->Application->setUnitOption($this->Prefix, 'Grids', $grids);
}
}
+
+ /**
+ * Checks, that field can be edited
+ *
+ * @param Array $params
+ * @return string
+ */
+ function IsEditable($params)
+ {
+ if ($this->Application->isDebugMode()) {
+ return true;
+ }
+
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ return $object->GetDBField($params['check_field']);
+ }
+
+ /**
+ * Removes "To" options from possible options in "RecipientType" field
+ *
+ * @param Array $params
+ */
+ function RemoveToRecipientType($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $field_options = $object->GetFieldOptions('RecipientType');
+ unset($field_options['options'][RECIPIENT_TYPE_TO]);
+ $object->SetFieldOptions('RecipientType', $field_options);
+ }
+
+ /**
+ * Restores "To" option in possible option list in "RecipientType" field
+ *
+ * @param Array $params
+ */
+ function RestoreRecipientType($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $field_options = $object->GetFieldOptions('RecipientType');
+ $virtual_fields = $this->Application->getUnitOption($this->Prefix, 'VirtualFields');
+ $field_options['options'] = $virtual_fields['RecipientType']['options'];
+ $object->SetFieldOptions('RecipientType', $field_options);
+ }
+
}
\ No newline at end of file
Index: core/units/email_events/email_events_config.php
===================================================================
--- core/units/email_events/email_events_config.php (revision 13557)
+++ core/units/email_events/email_events_config.php (working copy)
@@ -38,30 +38,28 @@
'TitlePresets' => 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!'),
@@ -69,6 +67,13 @@
'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
Index: core/units/email_events/email_events_event_handler.php
===================================================================
--- core/units/email_events/email_events_event_handler.php (revision 13557)
+++ core/units/email_events/email_events_event_handler.php (working copy)
@@ -23,12 +23,23 @@
function mapPermissions()
{
parent::mapPermissions();
- $permissions = Array(
- 'OnFrontOnly' => Array('self' => 'edit'),
- 'OnSaveSelected' => Array('self' => 'view'),
- 'OnProcessEmailQueue' => Array('self' => 'add|edit'),
+ $permissions = Array (
+ 'OnFrontOnly' => Array ('self' => 'edit'),
+ 'OnSaveSelected' => Array ('self' => 'view'),
+ 'OnProcessEmailQueue' => Array ('self' => 'add|edit'),
+
+ 'OnSuggestAddress' => Array ('self' => 'add|edit'),
+
+ // events only for developers
+ 'OnPreCreate' => Array ('self' => 'debug'),
+ 'OnDelete' => Array ('self' => 'debug'),
+ 'OnDeleteAll' => Array ('self' => 'debug'),
+ 'OnMassDelete' => Array ('self' => 'debug'),
+ 'OnMassApprove' => Array ('self' => 'debug'),
+ 'OnMassDecline' => Array ('self' => 'debug'),
);
+
$this->permMapping = array_merge($this->permMapping, $permissions);
}
@@ -201,76 +212,259 @@
}
/**
- * Returns sender & recipients ids plus event_id (as parameter by reference)
+ * Processes email sender
*
* @param kEvent $event
- *
- * @return mixed
+ * @param Array $direct_params
*/
- function GetMessageRecipients(&$event)
+ function _processSender(&$event, $direct_params = Array ())
{
+ $this->Application->removeObject('u.email-from');
+
$object =& $this->_getEmailEvent($event);
/* @var $object kDBItem */
- // initial values
- $to_user_id = $event->getEventParam('EmailEventToUserId');
- if ( !is_numeric($to_user_id) ) {
- $to_user_id = -1; // when not specified, then send to "root"
- }
- $from_user_id = $object->GetDBField('FromUserId');
+ $email = $name = '';
- if ($object->GetDBField('Type') == EVENT_TYPE_ADMIN) {
- // For type "Admin" recipient is a user from field FromUserId which means From/To user in Email events list
- if ($to_user_id == -1) {
- $to_user_id = $from_user_id;
+ // set defaults from event
+ if ($object->GetDBField('CustomSender')) {
+ $address = $object->GetDBField('SenderAddress');
+ $address_type = $object->GetDBField('SenderAddressType');
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $email = $address;
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT FirstName, LastName, Email, PortalUserId
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ // user still exists
+ $email = $user_info['Email'];
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $user =& $this->Application->recallObject('u.email-from', null, Array('skip_autoload' => true));
+ /* @var $user UsersItem */
+
+ $user->Load($user_info['PortalUserId']);
+ }
+ break;
}
- $from_user_id = -1;
+
+ if ($object->GetDBField('SenderName')) {
+ $name = $object->GetDBField('SenderName');
+ }
}
- return Array ($from_user_id, $to_user_id);
+ // update with custom data given during event execution
+ if (array_key_exists('from_email', $direct_params)) {
+ $email = $direct_params['from_email'];
+ }
+
+ if (array_key_exists('from_name', $direct_params)) {
+ $name = $direct_params['from_name'];
+ }
+
+ // still nothing, set defaults
+ if (!$email) {
+ $email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+ }
+
+ if (!$name) {
+ $name = strip_tags( $this->Application->ConfigValue('Site_Name') );
+ }
+
+ $esender =& $this->Application->recallObject('EmailSender');
+ /* @var $esender kEmailSendingHelper */
+
+ $esender->SetFrom($email, $name);
+
+ return Array ($email, $name);
}
/**
- * Returns user name, email by id, or ones, that specified in $direct_params
+ * Processes email recipients
*
- * @param int $user_id
- * @param string $user_type type of user = {to,from}
+ * @param kEvent $event
* @param Array $direct_params
- * @return Array
*/
- function GetRecipientInfo($user_id, $user_type, $direct_params = null)
+ function _processRecipients(&$event, $direct_params = Array ())
{
- // load user, because it can be addressed from email template tags
- $user =& $this->Application->recallObject('u.email-'.$user_type, null, Array('skip_autoload' => true));
- /* @var $user UsersItem */
+ $this->Application->removeObject('u.email-to');
- $email = $name = '';
- $result = $user_id > 0 ? $user->Load( (int)$user_id ) : $user->Clear();
- if ($user->IsLoaded()) {
- $email = $user->GetDBField('Email');
- $name = trim($user->GetDBField('FirstName').' '.$user->GetDBField('LastName'));
- }
+ $object =& $this->_getEmailEvent($event);
+ /* @var $object kDBItem */
- if (is_array($direct_params)) {
- if (isset($direct_params[$user_type.'_email'])) {
- $email = $direct_params[$user_type.'_email'];
+ $to_email = $to_name = '';
+ $all_recipients = Array ();
+ $recipients_xml = $object->GetDBField('Recipients');
+
+ if ($recipients_xml) {
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ // group recipients by type
+ $records = $minput_helper->parseMInputXML($recipients_xml);
+
+ foreach ($records as $record) {
+ $recipient_type = $record['RecipientType'];
+
+ if (!array_key_exists($recipient_type, $all_recipients)) {
+ $all_recipients[$recipient_type] = Array ();
+ }
+
+ $all_recipients[$recipient_type][] = $record;
}
+ }
- if (isset($direct_params[$user_type.'_name'])) {
- $name = $direct_params[$user_type.'_name'];
+ if (!array_key_exists(RECIPIENT_TYPE_TO, $all_recipients)) {
+ $all_recipients[RECIPIENT_TYPE_TO] = Array ();
+ }
+
+ // remove all "To" recipients, when not allowed
+ $overwrite_to_email = array_key_exists('overwrite_to_email', $direct_params) ? $direct_params['overwrite_to_email'] : false;
+
+ if (!$object->GetDBField('CustomRecipient') || $overwrite_to_email) {
+ $all_recipients[RECIPIENT_TYPE_TO] = Array ();
+ }
+
+ // update with custom data given during event execution (user_id)
+ $to_user_id = $event->getEventParam('EmailEventToUserId');
+
+ if ($to_user_id > 0) {
+ $sql = 'SELECT FirstName, LastName, Email
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE PortalUserId = ' . $to_user_id;
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ $add_recipient = Array (
+ 'RecipientAddressType' => ADDRESS_TYPE_EMAIL,
+ 'RecipientAddress' => $user_info['Email'],
+ 'RecipientName' => trim($user_info['FirstName'] . ' ' . $user_info['LastName']),
+ );
+
+ array_unshift($all_recipients[RECIPIENT_TYPE_TO], $add_recipient);
+
+ $user =& $this->Application->recallObject('u.email-to', null, Array('skip_autoload' => true));
+ /* @var $user UsersItem */
+
+ $user->Load($to_user_id);
}
}
- if (!$email) {
- // if email is empty, then use admins email
- $email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+ // update with custom data given during event execution (email + name)
+ $add_recipient = Array ();
+
+ if (array_key_exists('to_email', $direct_params)) {
+ $add_recipient['RecipientName'] = '';
+ $add_recipient['RecipientAddressType'] = ADDRESS_TYPE_EMAIL;
+ $add_recipient['RecipientAddress'] = $direct_params['to_email'];
}
- if (!$name) {
- $name = $user_type == 'from' ? strip_tags($this->Application->ConfigValue('Site_Name')) : $email;
+ if (array_key_exists('to_name', $direct_params)) {
+ $add_recipient['RecipientName'] = $direct_params['to_name'];
}
- return Array ($email, $name);
+ if ($add_recipient) {
+ array_unshift($all_recipients[RECIPIENT_TYPE_TO], $add_recipient);
+ }
+
+ if (($object->GetDBField('Type') == EVENT_TYPE_ADMIN) && !$all_recipients[RECIPIENT_TYPE_TO]) {
+ // admin email event without direct recipient -> send to admin
+ $all_recipients[RECIPIENT_TYPE_TO][] = Array (
+ 'RecipientName' => $this->Application->ConfigValue('Smtp_AdminMailFrom'),
+ 'RecipientAddressType' => ADDRESS_TYPE_EMAIL,
+ 'RecipientAddress' => $this->Application->ConfigValue('Smtp_AdminMailFrom'),
+ );
+ }
+
+ $esender =& $this->Application->recallObject('EmailSender');
+ /* @var $esender kEmailSendingHelper */
+
+ $header_mapping = Array (
+ RECIPIENT_TYPE_TO => 'To',
+ RECIPIENT_TYPE_CC => 'Cc',
+ RECIPIENT_TYPE_BCC => 'Bcc',
+ );
+
+ $default_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
+
+ foreach ($all_recipients as $recipient_type => $recipients) {
+ // add recipients to email
+ $pairs = Array ();
+
+ foreach ($recipients as $recipient) {
+ $address = $recipient['RecipientAddress'];
+ $address_type = $recipient['RecipientAddressType'];
+ $repipient_name = $recipient['RecipientName'];
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $pairs[] = Array ('email' => $address, 'name' => $repipient_name);
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT FirstName, LastName, Email
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ $user_info = $this->Conn->GetRow($sql);
+
+ if ($user_info) {
+ // user still exists
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $pairs[] = Array (
+ 'email' => $user_info['Email'],
+ 'name' => $name ? $name : $repipient_name,
+ );
+ }
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $sql = 'SELECT u.FirstName, u.LastName, u.Email
+ FROM ' . TABLE_PREFIX . 'PortalGroup g
+ JOIN ' . TABLE_PREFIX . 'UserGroup ug ON ug.GroupId = g.GroupId
+ JOIN ' . TABLE_PREFIX . 'PortalUser u ON u.PortalUserId = ug.PortalUserId
+ WHERE g.Name = ' . $this->Conn->qstr($address);
+ $users = $this->Conn->Query($sql);
+
+ foreach ($users as $user) {
+ $name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
+
+ $pairs[] = Array (
+ 'email' => $user_info['Email'],
+ 'name' => $name ? $name : $repipient_name,
+ );
+ }
+ break;
+ }
+ }
+
+ if (!$pairs) {
+ continue;
+ }
+
+ if ($recipient_type == RECIPIENT_TYPE_TO) {
+ $to_email = $pairs[0]['email'] ? $pairs[0]['email'] : $default_email;
+ $to_name = $pairs[0]['name'] ? $pairs[0]['name'] : $to_email;
+ }
+
+ $header_name = $header_mapping[$recipient_type];
+
+ foreach ($pairs as $pair) {
+ $email = $pair['email'] ? $pair['email'] : $default_email;
+ $name = $pair['name'] ? $pair['name'] : $email;
+
+ $esender->AddRecipient($header_name, $email, $name);
+ }
+ }
+
+ return Array ($to_email, $to_name);
}
/**
@@ -279,7 +473,7 @@
* @param kEvent $event
* @param int $language_id
*/
- function GetMessageBody(&$event, $language_id = null)
+ function _getMessageBody(&$event, $language_id = null)
{
if (!isset($language_id)) {
$language_id = $this->Application->GetVar('m_lang');
@@ -399,7 +593,7 @@
* @param Array $direct_params
* @return Array
*/
- function ParseMessageBody($message, $direct_params = null)
+ function ParseMessageBody($message, $direct_params = Array ())
{
$message_language = $this->_getSendLanguage($direct_params);
$this->_changeLanguage($message_language);
@@ -463,15 +657,12 @@
$send_params = $event->getEventParam('DirectSendParams');
// 1. get information about message sender and recipient
- $recipients = $this->GetMessageRecipients($event);
+ list ($from_email, $from_name) = $this->_processSender($event, $send_params);
+ list ($to_email, $to_name) = $this->_processRecipients($event, $send_params);
- list ($from_id, $to_id) = $recipients;
- list ($from_email, $from_name) = $this->GetRecipientInfo($from_id, 'from', $send_params);
- list ($to_email, $to_name) = $this->GetRecipientInfo($to_id, 'to', $send_params);
-
// 2. prepare message to be sent
$message_language = $this->_getSendLanguage($send_params);
- $message_template = $this->GetMessageBody($event, $message_language);
+ $message_template = $this->_getMessageBody($event, $message_language);
if (!trim($message_template)) {
trigger_error('Message template is empty', E_USER_WARNING);
return false;
@@ -487,15 +678,12 @@
$esender =& $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
- $esender->SetFrom($from_email, $from_name);
- $esender->AddTo($to_email, $to_name);
-
$message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
$esender->SetSubject($message_subject);
if ($this->Application->isDebugMode()) {
// set special header with event name, so it will be easier to determite what's actually was received
- $message_headers['X-Event-Name'] = $email_event_name . ' - ' . ($event->getEventParam('EmailEventType') == EVENT_TYPE_ADMIN ? 'ADMIN' : 'USER');
+ $message_headers['X-Event-Name'] = $email_event_name . ' - ' . ($object->GetDBField('Type') == EVENT_TYPE_ADMIN ? 'ADMIN' : 'USER');
}
foreach ($message_headers as $header_name => $header_value) {
@@ -524,14 +712,11 @@
$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'EmailLog');
}
-
- $this->Application->removeObject('u.email-from');
- $this->Application->removeObject('u.email-to');
}
function _getSendLanguage($send_params)
{
- if ($send_params && array_key_exists('language_id', $send_params)) {
+ if (array_key_exists('language_id', $send_params)) {
return $send_params['language_id'];
}
@@ -634,10 +819,10 @@
{
parent::OnAfterConfigRead($event);
- $options = Array ('Core:Users' => 'Core - Users', 'Core:Category' => 'Core - Categories');
+ $options = Array ();
foreach ($this->Application->ModuleInfo as $module_name => $module_info) {
- if (($module_name == 'In-Portal') || ($module_name == 'Core')) {
+ if ($module_name == 'In-Portal') {
continue;
}
@@ -666,4 +851,221 @@
// use language from grid, instead of primary language used by default
$event->SetRedirectParam('m_lang', $this->Application->GetVar('m_lang'));
}
+
+ /**
+ * Fixes default recipient type
+ *
+ * @param kEvent $event
+ */
+ function OnAfterItemLoad(&$event)
+ {
+ parent::OnAfterItemLoad($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if (!$this->Application->isDebugMode(false)) {
+ if ($object->GetDBField('AllowChangingRecipient')) {
+ $object->SetDBField('RecipientType', RECIPIENT_TYPE_TO);
+ }
+ else {
+ $object->SetDBField('RecipientType', RECIPIENT_TYPE_CC);
+ }
+ }
+
+ // process replacement tags
+ $records = Array ();
+ $replacement_tags = $object->GetDBField('ReplacementTags');
+ $replacement_tags = $replacement_tags ? unserialize($replacement_tags) : Array ();
+
+ foreach ($replacement_tags as $tag => $replacement) {
+ $records[] = Array ('Tag' => $tag, 'Replacement' => $replacement);
+ }
+
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ $xml = $minput_helper->prepareMInputXML($records, Array ('Tag', 'Replacement'));
+ $object->SetDBField('ReplacementTagsXML', $xml);
+ }
+
+ /**
+ * Performs custom validation + keep read-only fields
+ *
+ * @param kEvent $event
+ */
+ function _itemChanged(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ($object->GetDBField('CustomSender')) {
+ $this->_validateAddress($event, 'Sender');
+ }
+
+ $this->_validateAddress($event, 'Recipient');
+
+ if (!$this->Application->isDebugMode(false)) {
+ // only allow to enable/disable event while in debug mode
+ $to_restore = Array ('Enabled', 'AllowChangingSender', 'AllowChangingRecipient');
+
+ if (!$object->GetOriginalField('AllowChangingSender')) {
+ $to_restore = array_merge($to_restore, Array ('CustomSender', 'SenderName', 'SenderAddressType', 'SenderAddress'));
+ }
+
+ if (!$object->GetOriginalField('AllowChangingRecipient')) {
+ $to_restore = array_merge($to_restore, Array ('CustomRecipient'/*, 'Recipients'*/));
+ }
+
+ // prevent specific fields from editing
+ foreach ($to_restore as $restore_field) {
+ $original_value = $object->GetOriginalField($restore_field);
+
+ if ($object->GetDBField($restore_field) != $original_value) {
+ $object->SetDBField($restore_field, $original_value);
+ }
+ }
+ }
+
+ // process replacement tags
+ $minput_helper =& $this->Application->recallObject('MInputHelper');
+ /* @var $minput_helper MInputHelper */
+
+ $replacement_tags = Array ();
+ $records = $minput_helper->parseMInputXML( $object->GetDBField('ReplacementTagsXML') );
+
+ foreach ($records as $record) {
+ $replacement_tags[ trim($record['Tag']) ] = trim($record['Replacement']);
+ }
+
+ $object->SetDBField('ReplacementTags', $replacement_tags ? serialize($replacement_tags) : NULL);
+ }
+
+ /**
+ * Validates address using given field prefix
+ *
+ * @param kEvent $event
+ * @param string $field_prefix
+ */
+ function _validateAddress(&$event, $field_prefix)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $address_type = $object->GetDBField($field_prefix . 'AddressType');
+ $object->setRequired($field_prefix . 'Address', $address_type > 0);
+ $address = $object->GetDBField($field_prefix . 'Address');
+
+ if (!$address) {
+ // don't validate against empty address
+ return ;
+ }
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ if (!preg_match('/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', $address)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_email');
+ }
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $sql = 'SELECT PortalUserId
+ FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE Login = ' . $this->Conn->qstr($address);
+ if (!$this->Conn->GetOne($sql)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_user');
+ }
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $sql = 'SELECT GroupId
+ FROM ' . TABLE_PREFIX . 'PortalGroup
+ WHERE Name = ' . $this->Conn->qstr($address);
+ if (!$this->Conn->GetOne($sql)) {
+ $object->SetError($field_prefix . 'Address', 'invalid_group');
+ }
+ break;
+ }
+ }
+
+ /**
+ * Don't allow to enable/disable events in non-debug mode
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ parent::OnBeforeItemCreate($event);
+
+ $this->_itemChanged($event);
+ }
+
+ /**
+ * Don't allow to enable/disable events in non-debug mode
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+
+ $this->_itemChanged($event);
+ }
+
+ /**
+ * Suggest address based on typed address and selected address type
+ *
+ * @param kEvent $event
+ */
+ function OnSuggestAddress(&$event)
+ {
+ $event->status = erSTOP;
+
+ $address_type = $this->Application->GetVar('type');
+ $address = $this->Application->GetVar('value');
+ $limit = $this->Application->GetVar('limit');
+
+ if (!$limit) {
+ $limit = 20;
+ }
+
+ switch ($address_type) {
+ case ADDRESS_TYPE_EMAIL:
+ $field = 'Email';
+ $table_name = TABLE_PREFIX . 'PortalUser';
+ break;
+
+ case ADDRESS_TYPE_USER:
+ $field = 'Login';
+ $table_name = TABLE_PREFIX . 'PortalUser';
+ break;
+
+ case ADDRESS_TYPE_GROUP:
+ $field = 'Name';
+ $table_name = TABLE_PREFIX . 'PortalGroup';
+ break;
+ }
+
+ if (isset($field)) {
+ $sql = 'SELECT DISTINCT ' . $field . '
+ FROM ' . $table_name . '
+ WHERE ' . $field . ' LIKE ' . $this->Conn->qstr($address . '%') . '
+ ORDER BY ' . $field . ' ASC
+ LIMIT 0,' . $limit;
+ $data = $this->Conn->GetCol($sql);
+ }
+ else {
+ $data = Array ();
+ }
+
+ $this->Application->XMLHeader();
+
+ echo '<suggestions>';
+
+ foreach ($data as $item) {
+ echo '<item>' . htmlspecialchars($item) . '</item>';
+ }
+
+ echo '</suggestions>';
+ }
}
\ No newline at end of file
Index: core/units/users/users_config.php
===================================================================
--- core/units/users/users_config.php (revision 13557)
+++ core/units/users/users_config.php (working copy)
@@ -225,7 +225,7 @@
),
),
- 'PermSection' => Array('main' => 'in-portal:user_list', 'email' => 'in-portal:user_email', 'custom' => 'in-portal:user_custom'),
+ 'PermSection' => Array('main' => 'in-portal:user_list', 'custom' => 'in-portal:user_custom'),
'Sections' => Array (
'in-portal:user_list' => Array (
@@ -272,23 +272,13 @@
'type' => stTREE,
),
- 'in-portal:user_email' => Array (
- 'parent' => 'in-portal:user_setting_folder',
- 'icon' => 'conf_email',
- 'label' => 'la_tab_ConfigE-mail',
- 'url' => Array ('t' => 'config/config_email', 'module' => 'Core:Users', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 2,
- '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' => 3,
+ 'priority' => 2,
'type' => stTREE,
),
),
|