1 /*********************************************************************************
2 * SugarCRM Community Edition is a customer relationship management program developed by
3 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Affero General Public License version 3 as published by the
7 * Free Software Foundation with the addition of the following permission added
8 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
9 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
10 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17 * You should have received a copy of the GNU Affero General Public License along with
18 * this program; if not, see http://www.gnu.org/licenses or write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
23 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25 * The interactive user interfaces in modified source and object code versions
26 * of this program must display Appropriate Legal Notices, as required under
27 * Section 5 of the GNU Affero General Public License version 3.
29 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
30 * these Appropriate Legal Notices must retain the display of the "Powered by
31 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
32 * technical reasons, the Appropriate Legal Notices must display the words
33 * "Powered by SugarCRM".
34 ********************************************************************************/
36 SUGAR.email2.templates['compose'] = '<div id="composeLayout{idx}" class="ylayout-inactive-content"></div>' +
37 '<div id="composeOverFrame{idx}" style="height:100%;width:100%">' +
38 ' <form id="emailCompose{idx}" name="ComposeEditView{idx}" action="index.php" method="POST">' +
39 ' <input type="hidden" id="email_id{idx}" name="email_id" value="">' +
40 ' <input type="hidden" id="uid{idx}" name="uid" value="">' +
41 ' <input type="hidden" id="ieId{idx}" name="ieId" value="">' +
42 ' <input type="hidden" id="mbox{idx}" name="mbox" value="">' +
43 ' <input type="hidden" id="type{idx}" name="type" value="">' +
44 ' <input type="hidden" id="composeLayoutId" name="composeLayoutId" value="shouldNotSeeMe">' +
45 ' <input type="hidden" id="composeType" name="composeType">' +
46 ' <input type="hidden" id="fromAccount" name="fromAccount">' +
47 ' <input type="hidden" id="sendSubject" name="sendSubject">' +
48 ' <input type="hidden" id="sendDescription" name="sendDescription">' +
49 ' <input type="hidden" id="sendTo" name="sendTo">' +
50 ' <input type="hidden" id="sendBcc" name="sendBcc">' +
51 ' <input type="hidden" id="sendCc" name="sendCc">' +
52 ' <input type="hidden" id="setEditor" name="setEditor">' +
53 ' <input type="hidden" id="saveToSugar" name="saveToSugar">' +
54 ' <input type="hidden" id="parent_id" name="parent_id">' +
55 ' <input type="hidden" id="parent_type" name="parent_type">' +
56 ' <input type="hidden" id="attachments" name="attachments">' +
57 ' <input type="hidden" id="documents" name="documents">' +
58 ' <input type="hidden" id="outbound_email{idx}" name="outbound_email">' +
59 ' <input type="hidden" id="templateAttachments" name="templateAttachments">' +
60 ' <input type="hidden" id="templateAttachmentsRemove{idx}" name="templateAttachmentsRemove">' +
61 ' <table id="composeHeaderTable{idx}" cellpadding="0" cellspacing="0" border="0" width="100%" class="list">' +
63 ' <th><table cellpadding="0" cellspacing="0" border="0"><tbody><tr ><td style="padding: 0px !important;margin:0px; !important" >' +
64 ' <button type="button" class="button" onclick="SUGAR.email2.composeLayout.sendEmail({idx}, false);"><img src="index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=icon_email_send.gif" align="absmiddle" border="0"> {app_strings.LBL_EMAIL_SEND}</button>' +
65 ' <button type="button" class="button" onclick="SUGAR.email2.composeLayout.saveDraft({idx}, false);"><img src="index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=icon_email_save.gif" align="absmiddle" border="0"> {app_strings.LBL_EMAIL_SAVE_DRAFT}</button>' +
66 ' <button type="button" class="button" onclick="SUGAR.email2.composeLayout.showAttachmentPanel({idx}, false);"><img src="index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=icon_email_attach.gif" align="absmiddle" border="0"> {app_strings.LBL_EMAIL_ATTACHMENT}</button>' +
67 ' <button type="button" class="button" onclick="SUGAR.email2.composeLayout.showOptionsPanel({idx}, false);"><img src="index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=icon_email_options.gif" align="absmiddle" border="0"> {app_strings.LBL_EMAIL_OPTIONS}</button>' +
68 '</td><td style="padding: 0px !important;margin:0px; !important"> {mod_strings.LBL_EMAIL_RELATE}: <select class="select" id="data_parent_type{idx}" onchange="document.getElementById(\'data_parent_name{idx}\').value=\'\';document.getElementById(\'data_parent_id{idx}\').value=\'\'; SUGAR.email2.composeLayout.enableQuickSearchRelate(\'{idx}\');" name="data_parent_type{idx}">{linkbeans_options}</select>' +
69 ' </td><td style="padding: 0px !important;margin:0px; !important"><input id="data_parent_id{idx}" name="data_parent_id{idx}" type="hidden" value="">' +
70 '<input class="sqsEnabled" id="data_parent_name{idx}" name="data_parent_name{idx}" type="text" value=""> <button type="button" class="button" onclick="SUGAR.email2.composeLayout.callopenpopupForEmail2({idx});"><img src="index.php?entryPoint=getImage&themeName=default&imageName=id-ff-select.png" align="absmiddle" border="0"></button>' +
71 ' </td></tr></tbody></table></th>' +
75 ' <div style="margin:5px;">' +
76 ' <table cellpadding="4" cellspacing="0" border="0" width="100%">' +
78 ' <td class="emailUILabel" NOWRAP >' +
79 ' {app_strings.LBL_EMAIL_FROM}:' +
81 ' <td class="emailUIField" NOWRAP>' +
83 ' <select style="width: 500px;" class="ac_input" id="addressFrom{idx}" name="addressFrom{idx}"></select>' +
88 ' <td class="emailUILabel" NOWRAP>' +
89 ' <button class="button" type="button" onclick="SUGAR.email2.addressBook.selectContactsDialogue(\'addressTO{idx}\')">' +
90 ' {app_strings.LBL_EMAIL_TO}:' +
93 ' <td class="emailUIField" NOWRAP>' +
94 ' <div class="ac_autocomplete">' +
95 ' <input class="ac_input" type="text" size="96" id="addressTO{idx}" name="addressTO{idx}" onkeyup="SE.composeLayout.showAddressDetails(this);">' +
96 ' <span class="rolloverEmail"> <a id="MoreaddressTO{idx}" href="#" style="display: none;">+<span id="DetailaddressTO{idx}"> </span></a> </span>' +
97 ' <div class="ac_container" id="addressToAC{idx}"></div>' +
101 ' <tr id="add_addr_options_tr{idx}">' +
102 ' <td class="emailUILabel" NOWRAP> </td><td class="emailUIField" valign="top" NOWRAP> <span id="cc_span{idx}"><a href="#" onclick="SE.composeLayout.showHiddenAddress(\'cc\',\'{idx}\');">{mod_strings.LBL_ADD_CC}</a></span><span id="bcc_cc_sep{idx}"> {mod_strings.LBL_ADD_CC_BCC_SEP} </span><span id="bcc_span{idx}"><a href="#" onclick="SE.composeLayout.showHiddenAddress(\'bcc\',\'{idx}\');">{mod_strings.LBL_ADD_BCC}</a></span></td>'+
104 ' <tr class="yui-hidden" id="cc_tr{idx}">' +
105 ' <td class="emailUILabel" NOWRAP>' +
106 ' <button class="button" type="button" onclick="SUGAR.email2.addressBook.selectContactsDialogue(\'addressCC{idx}\')">' +
107 ' {app_strings.LBL_EMAIL_CC}:' +
110 ' <td class="emailUIField" NOWRAP>' +
111 ' <div class="ac_autocomplete">' +
112 ' <input class="ac_input" type="text" size="96" id="addressCC{idx}" name="addressCC{idx}" onkeyup="SE.composeLayout.showAddressDetails(this);">' +
113 ' <span class="rolloverEmail"> <a id="MoreaddressCC{idx}" href="#" style="display: none;">+<span id="DetailaddressCC{idx}"> </span></a> </span>' +
114 ' <div class="ac_container" id="addressCcAC{idx}"></div>' +
118 ' <tr class="yui-hidden" id="bcc_tr{idx}">' +
119 ' <td class="emailUILabel" NOWRAP>' +
120 ' <button class="button" type="button" onclick="SUGAR.email2.addressBook.selectContactsDialogue(\'addressBCC{idx}\')">' +
121 ' {app_strings.LBL_EMAIL_BCC}:' +
124 ' <td class="emailUIField" NOWRAP>' +
125 ' <div class="ac_autocomplete">' +
126 ' <input class="ac_input" type="text" size="96" id="addressBCC{idx}" name="addressBCC{idx}" onkeyup="SE.composeLayout.showAddressDetails(this);">' +
127 ' <span class="rolloverEmail"> <a id="MoreaddressBCC{idx}" href="#" style="display: none;">+<span id="DetailaddressBCC{idx}"> </span></a> </span>' +
128 ' <div class="ac_container" id="addressBccAC{idx}"></div>' +
133 ' <td class="emailUILabel" NOWRAP width="1%">' +
134 ' {app_strings.LBL_EMAIL_SUBJECT}:' +
136 ' <td class="emailUIField" NOWRAP width="99%">' +
137 ' <div class="ac_autocomplete">' +
138 ' <input class="ac_input" type="text" size="96" id="emailSubject{idx}" name="subject{idx}" value="">' +
147 ' <textarea id="htmleditor{idx}" name="htmleditor{idx}" style="width:100%; height: 100px;"></textarea>' +
148 ' <div id="divAttachments{idx}" class="ylayout-inactive-content">' +
149 ' <div style="padding:5px;">' +
150 ' <table cellpadding="2" cellspacing="0" border="0">' +
153 ' <b>{app_strings.LBL_EMAIL_ATTACHMENTS}</b>' +
160 ' <input type="button" name="add_file_button" onclick="SUGAR.email2.composeLayout.addFileField();" value="{mod_strings.LBL_ADD_FILE}" class="button" />' +
161 ' <div id="addedFiles{idx}" name="addedFiles{idx}"></div>' +
173 ' <b>{app_strings.LBL_EMAIL_ATTACHMENTS2}</b>' +
180 ' <input type="button" name="add_document_button" onclick="SUGAR.email2.composeLayout.addDocumentField({idx});" value="{mod_strings.LBL_ADD_DOCUMENT}" class="button" />' +
181 ' <div id="addedDocuments{idx}"></div>' + //<input name="document{idx}0" id="document{idx}0" type="hidden" /><input name="documentId{idx}0" id="documentId{idx}0" type="hidden" /><input name="documentName{idx}0" id="documentName{idx}0" disabled size="30" type="text" /><input type="button" id="documentSelect{idx}0" onclick="SUGAR.email2.selectDocument({idx}0, this);" class="button" value="{app_strings.LBL_EMAIL_SELECT}" /><input type="button" id="documentRemove{idx}0" onclick="SUGAR.email2.deleteDocumentField({idx}0, this);" class="button" value="{app_strings.LBL_EMAIL_REMOVE}" /><br /></div>' +
193 ' <div id="templateAttachmentsTitle{idx}" style="display:none"><b>{app_strings.LBL_EMAIL_ATTACHMENTS3}</b></div>' +
200 ' <div id="addedTemplateAttachments{idx}"></div>' +
207 ' <div id="divOptions{idx}" class="ylayout-inactive-content"' +
208 ' <div style="padding:5px;">' +
209 ' <form name="composeOptionsForm{idx}" id="composeOptionsForm{idx}">' +
210 ' <table border="0" width="100%">' +
212 ' <td NOWRAP style="padding:2px;">' +
213 ' <b>{app_strings.LBL_EMAIL_TEMPLATES}:</b>' +
217 ' <td NOWRAP style="padding:2px;">' +
218 ' <select name="email_template{idx}" id="email_template{idx}" onchange="SUGAR.email2.composeLayout.applyEmailTemplate(\'{idx}\', this.options[this.selectedIndex].value);"></select>' +
223 ' <table border="0" width="100%">' +
225 ' <td NOWRAP style="padding:2px;">' +
226 ' <b>{app_strings.LBL_EMAIL_SIGNATURES}:</b>' +
230 ' <td NOWRAP style="padding:2px;">' +
231 ' <select name="signatures{idx}" id="signatures{idx}" onchange="SUGAR.email2.composeLayout.setSignature(\'{idx}\');"></select>' +
235 ' <table border="0" width="100%">' +
237 ' <td NOWRAP style="padding:2px;">' +
238 ' <input type="checkbox" id="setEditor{idx}" name="setEditor{idx}" value="1" onclick="SUGAR.email2.composeLayout.renderTinyMCEToolBar(\'{idx}\', this.checked);"/> ' +
239 ' <b>{mod_strings.LBL_SEND_IN_PLAIN_TEXT}</b>' +