2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
37 /*********************************************************************************
39 * Created On: Oct 17, 2005
40 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
41 * All Rights Reserved.
42 * Contributor(s): Chris Nojima
43 ********************************************************************************/
49 <script type="text/javascript" src="modules/InboundEmail/InboundEmail.js"></script>
50 <script type="text/javascript" src="include/javascript/sugar_3.js"></script>
51 <script type="text/javascript" src="include/javascript/sugar_grp1_yui.js"></script>
52 <script type="text/javascript" src="include/SugarFields/Teamset/Teamset.js"></script>
54 <script type="text/javascript" src="include/javascript/sugar_grp1_yui.js?s={$sugar_version}&c={$js_custom_version}"></script>
55 <script type="text/javascript" src="include/javascript/sugar_grp1.js?s={$sugar_version}&c={$js_custom_version}"></script>
56 <script type="text/javascript" language="Javascript">
57 currentFolders = {$group_folder_array};
59 function checkFolderName(newFolder) {
60 var duplicate = false;
61 for (var i in currentFolders) {
62 if (currentFolders[i] == newFolder) {
66 if(newFolder == "" || duplicate) {
67 alert(document.getElementById('errorMessage').value);
73 function checkTeamSetData() {
77 function addNewGroupFolder() {
78 var newFolder = document.getElementById('groupFolderAddName').value;
79 if (checkFolderName(newFolder) && checkTeamSetData()) {
80 document.getElementById('EditView').submit();
84 function editGroupFolder() {
85 var newFolder = document.getElementById('groupFolderAddName').value;
86 if (checkFolderName(newFolder) && checkTeamSetData()) {
87 document.getElementById('EditView').submit();
97 <form action="index.php" method="post" name="EditView" id="EditView">
98 <input type="hidden" name="module" value="InboundEmail">
99 <input type="hidden" name="action" value="SaveGroupFolder">
100 <input type="hidden" id="errorMessage" name="errorMessage" value="{$app_strings.LBL_EMAIL_ERROR_ADD_GROUP_FOLDER}">
101 <input type="hidden" name="record" value="{$ID}">
102 <input type="hidden" name="to_pdf" value="1">
103 <input type="hidden" name="isDuplicate" value=false>
104 <input type="hidden" name="return_module">
105 <input type="hidden" name="return_action">
106 <input type="hidden" name="return_id">
107 <input type="hidden" name="groupFoldersUser" value="">
110 <table width="100%" border="0" align="center" cellspacing="{$GRIDLINE}" cellpadding="0">
112 <td NOWRAP style="padding: 8px;" valign="top">
113 <div style="{$createGroupFolderStyle}">
114 <b>{$app_strings.LBL_EMAIL_SETTINGS_GROUP_FOLDERS_CREATE}:</b>
116 <div style="{$editGroupFolderStyle}">
117 <b>{$app_strings.LBL_EMAIL_SETTINGS_GROUP_FOLDERS_EDIT}:</b>
122 {$app_strings.LBL_EMAIL_FOLDERS_NEW_FOLDER}:
125 <input type="text" value="{$groupFolderName}" name="groupFolderAddName" id="groupFolderAddName">
130 {$app_strings.LBL_EMAIL_FOLDERS_ADD_THIS_TO}:
133 <select name="groupFoldersAdd" id="groupFoldersAdd">{$group_folder_options}</select>
136 <input type="button" style="{$createGroupFolderStyle}" class="button" value=" {$app_strings.LBL_EMAIL_FOLDERS_ADD_NEW_FOLDER} " {literal} onclick="addNewGroupFolder();" {/literal}>
137 <input type="button" style="{$editGroupFolderStyle}" class="button" value=" {$app_strings.LBL_EMAIL_SAVE} " onclick="editGroupFolder();" >
138 <input type="button" class="button" value=" {$app_strings.LBL_EMAIL_CLOSE} " onclick="window.close();">