Пример #1
0
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
/*********************************************************************************
 * Description:  Saves an Account record and then redirects the browser to the
 * defined return URL.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
$focus = new EmailTemplate();
require_once 'include/formbase.php';
$focus = populateFromPost('', $focus);
require_once 'modules/EmailTemplates/EmailTemplateFormBase.php';
$form = new EmailTemplateFormBase();
sugar_cache_clear('select_array:' . $focus->object_name . 'namebase_module=\'' . $focus->base_module . '\'name');
if (isset($_REQUEST['inpopupwindow']) and $_REQUEST['inpopupwindow'] == true) {
    $focus = $form->handleSave('', false, false);
    //do not redirect.
    $body1 = "\n\t\t<script type='text/javascript'>\n\t\t\tfunction refreshTemplates() {\n\t\t\t\twindow.opener.refresh_email_template_list('{$focus->id}','{$focus->name}')\n\t\t\t\twindow.close();\n\t\t\t}\n\n\t\t\trefreshTemplates();\n\t\t</script>";
    echo $body1;
} else {
    $form->handleSave('', true, false, true, 'download');
}
Пример #2
0
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
/*********************************************************************************
 * Description:  Saves an Account record and then redirects the browser to the
 * defined return URL.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
$focus = new EmailTemplate();
require_once 'include/formbase.php';
$focus = populateFromPost('', $focus);
require_once 'modules/EmailTemplates/EmailTemplateFormBase.php';
$form = new EmailTemplateFormBase();
sugar_cache_clear('select_array:' . $focus->object_name . 'namebase_module=\'' . $focus->base_module . '\'name');
if (isset($_REQUEST['inpopupwindow']) and $_REQUEST['inpopupwindow'] == true) {
    $focus = $form->handleSave('', false, false);
    //do not redirect.
    $body1 = "\n\t\t<script type='text/javascript'>\n\t\t\tfunction refreshTemplates() {\n\t\t\t\twindow.opener.refresh_email_template_list('{$focus->id}','{$focus->name}')\n\t\t\t\twindow.close();\n\t\t\t}\n\n\t\t\trefreshTemplates();\n\t\t</script>";
    echo $body1;
} else {
    $form->handleSave('', true, false);
}