$xtpl->parse('main.formnoborder'); $xtpl->parse('main'); $xtpl->out('main'); return; } } if (!empty($_POST['selectedContact'])) { $contact = BeanFactory::getBean('Contacts', $_POST['selectedContact']); } else { $contact = $contactForm->handleSave('Contacts', false, false); } if (!empty($_POST['selectedAccount'])) { $account = BeanFactory::getBean('Accounts', $_POST['selectedAccount']); } else { if (isset($_POST['newaccount']) && $_POST['newaccount'] == 'on') { $account = $accountForm->handleSave('Accounts', false, false); } } if (isset($_POST['newopportunity']) && $_POST['newopportunity'] == 'on') { if (!empty($_POST['selectedOpportunity'])) { $opportunity = BeanFactory::getBean('Opportunities', $_POST['selectedOpportunity']); } else { if (isset($account)) { $_POST['Opportunitiesaccount_id'] = $account->id; $_POST['Opportunitiesaccount_name'] = $account->name; } if (isset($_POST['Contactslead_source']) && !empty($_POST['Contactslead_source'])) { $_POST['Opportunitieslead_source'] = $_POST['Contactslead_source']; } $opportunity = $oppForm->handleSave('Opportunities', false, false); }
<?php if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ /********************************************************************************* * 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): ______________________________________.. ********************************************************************************/ require_once 'modules/Accounts/AccountFormBase.php'; $accountForm = new AccountFormBase(); $prefix = empty($_REQUEST['dup_checked']) ? '' : 'Accounts'; $accountForm->handleSave($prefix, true, false);
* The contents of this file are subject to the SugarCRM Public License Version * 1.1.3 ("License"); You may not use this file except in compliance with the * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * All copies of the Covered Code must include on each user interface screen: * (i) the "Powered by SugarCRM" logo and * (ii) the SugarCRM copyright notice * in the same form as they appear in the distribution. See full license for * requirements. * * The Original Code is: SugarCRM Open Source * The Initial Developer of the Original Code is SugarCRM, Inc. * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.; * All Rights Reserved. * Contributor(s): ______________________________________. ********************************************************************************/ /********************************************************************************* * 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): ______________________________________.. ********************************************************************************/ require_once 'modules/Accounts/AccountFormBase.php'; $accountForm = new AccountFormBase(); $accountForm->handleSave('', true, false);