2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2012 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 ********************************************************************************/
44 function parent_typechangeQS() {
45 var formName = {/literal}'{$formName}';{literal}
46 var parentFieldName = formName + "_parent_name";
49 new_module = document[formName].parent_type.value;
51 if(typeof(disabledModules[new_module]) != 'undefined') {
52 sqs_objects[parentFieldName]['disable'] = true;
53 document.getElementById('parent_name').readOnly = true;
54 document.getElementById('parent_name').value = mod_strings['LBL_QS_DISABLED'];
57 sqs_objects[parentFieldName]['disable'] = false;
58 document.getElementById('parent_name').readOnly = false;
60 sqs_objects[parentFieldName]['modules'] = new Array(new_module);
61 if (document.getElementById('smartInputFloater')) document.getElementById('smartInputFloater').style.display = 'none';
62 //var newArray = array();
63 QSFieldsArray[parentFieldName].sqs.modules = new Array(new_module);
69 <form name="{$formName}" id="{$formName}">
70 <div id="importDiv" class='edit view'>
71 <table border="0" cellpadding="0" cellspacing="0" width="100%">
74 <input name="module" value="Emails" type="hidden">
75 <input name="record" value="{$emailId}" type="hidden">
76 <input name="isDuplicate" value="false" type="hidden">
77 <input name="action" type="hidden">
78 <input name="return_module" type="hidden">
79 <input name="return_action" type="hidden">
80 <input name="return_id" type="hidden">
83 <table border="0" cellpadding="0" cellspacing="1" width="100%">
87 <td scope="row" nowrap="nowrap" valign="top" width="12%">
88 <script type="text/javascript">addToValidate("{$formName}", "assigned_user_id", "relate", false, "{sugar_translate label="LBL_ASSIGNED_TO_ID"}");</script>
89 <script type="text/javascript">addToValidate("{$formName}", "assigned_user_name", "relate", false, "{sugar_translate label="LBL_ASSIGNED_TO"}");</script>
90 {sugar_translate label="LBL_ASSIGNED_TO"}:
92 <td nowrap="nowrap" width="37%">
93 <input name="assigned_user_name" class="sqsEnabled" tabindex="2" id="assigned_user_name" size="" value="{$userName}" type="text">
94 <input name="assigned_user_id" id="assigned_user_id" value="{$userId}" type="hidden">
95 <input name="btn_assigned_user_name" tabindex="2" title="{$APP.LBL_SELECT_BUTTON_TITLE}" class="button" value="{$APP.LBL_SELECT_BUTTON_LABEL}" onclick='open_popup("Users", 600, 400, "", true, false, {literal}{"call_back_function":"set_return","form_name":"{/literal}{$formName}{literal}","field_to_name_array":{"id":"assigned_user_id","name":"assigned_user_name"}}{/literal}, "single", true);' type="button">
96 <input name="btn_clr_assigned_user_name" tabindex="2" title="{$APP.LBL_CLEAR_BUTTON_TITLE}" class="button" onclick="this.form.assigned_user_name.value = ''; this.form.assigned_user_id.value = '';" value="{$APP.LBL_CLEAR_BUTTON_LABEL}" type="button">
101 <td scope="row" nowrap="nowrap" valign="top" width="12%">
102 {sugar_translate label="LBL_EMAIL_RELATE"}:
104 <td nowrap="nowrap" width="37%"><slot _moz-userdefined="">
106 <select onchange=" document['{$formName}'].parent_name.value=''; checkParentType(document['{$formName}'].parent_type.value, document['{$formName}'].change_parent); parent_typechangeQS();" name="parent_type" id="parent_type" tabindex="2">
107 {$parentOptions}</select>
110 <slot _moz-userdefined="">
111 <input type="hidden" value="" name="parent_id" id="parent_id"/>
112 <input type="text" value="" tabindex="2" name="parent_name" id="parent_name" class="sqsEnabled" autocomplete="OFF"/>
113 <input type="button" onclick='{literal} if(document["{/literal}{$formName}{literal}"].parent_type.value != ""){open_popup(document["{/literal}{$formName}{literal}"].parent_type.value,600,400,"",true,false,{"call_back_function":"set_return","form_name":"{/literal}{$formName}{literal}","field_to_name_array":{"id":"parent_id","name":"parent_name"}});}'{/literal} value="{$APP.LBL_SELECT_BUTTON_LABEL}" title="{$APP.LBL_SELECT_BUTTON_TITLE}" class="button" tabindex="2" name="button" id="change_parent"/>
119 <tr><td scope="row" nowrap="nowrap" valign="top" width="12%">
120 {sugar_translate label="LBL_DELETE_FROM_SERVER"}:
122 <td nowrap="nowrap" width="37%">
123 <input class='ctabEditViewDF' type='checkbox' name='serverDelete'>