* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * 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: TODO: To be written. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ require_once 'modules/Opportunities/OpportunityFormBase.php'; $opportunityForm = new OpportunityFormBase(); $opportunityForm->handleSave('', true, false);
$Related['Class'] = 'evenListRow'; $Related['FORMBODY'] = $selectAccountButton . "<h5 class='dataLabel'><input class='checkbox' type='checkbox' name='newaccount' onclick='document.forms[\"ConvertLead\"].selectedAccount.value=\"\";document.forms[\"ConvertLead\"].display_account_name.value=\"\";toggleDisplay(\"newaccountdiv\");'> " . $mod_strings['LNK_NEW_ACCOUNT'] . "</h5><div id='newaccountdiv' style='display:none'>" . $accountForm->getWideFormBody('Accounts', 'Accounts', 'ConvertLead', $lead); //$Related['FORMFOOTER']=get_form_footer(); require_once 'modules/Notes/NoteFormBase.php'; $noteForm = new NoteFormBase(); $postform = "<h5 class='dataLabel'><input class='checkbox' type='checkbox' name='newaccountnote' onclick='toggleDisplay(\"accountnote\");'> {$mod_strings['LNK_NEW_NOTE']}</h5>"; $postform .= '<div id="accountnote" style="display:none">' . $noteForm->getFormBody('AccountNotes', 'Notes', 'ConvertLead', 85) . '</div><br>'; if (!empty($lead->account_name)) { $postform .= '<script>document.forms["ConvertLead"].newaccount.checked=true;toggleDisplay("newaccountdiv");</script>'; } $Related['POSTFORM'] = $postform; array_push($Relateds, $Related); //OPPORTUNITTY $Related['FORMHEADER'] = get_form_header($mod_strings['LNK_NEW_OPPORTUNITY'], '', ''); require_once 'modules/Opportunities/OpportunityFormBase.php'; $oppForm = new OpportunityFormBase(); $Related['CLASS'] = 'evenListRow'; $Related['FORMBODY'] = "<h5 class='dataLabel'><input class='checkbox' type='checkbox' name='newopportunity' onclick='toggleDisplay(\"newoppdiv\");'> " . $mod_strings['LNK_NEW_OPPORTUNITY'] . "</h5><div id='newoppdiv' style='display:none'>" . $oppForm->getWideFormBody('Opportunities', 'Opportunities', 'ConvertLead', $lead, false); //$Related['FORMFOOTER']=get_form_footer(); require_once 'modules/Notes/NoteFormBase.php'; $noteForm = new NoteFormBase(); $postform = "<h5 class='dataLabel'><input class='checkbox' type='checkbox' name='newoppnote' onclick='toggleDisplay(\"oppnote\");'> {$mod_strings['LNK_NEW_NOTE']}</h5>"; $postform .= '<div id="oppnote" style="display:none">' . $noteForm->getFormBody('OpportunityNotes', 'Notes', 'ConvertLead', 85) . '</div><br>'; $Related['POSTFORM'] = $postform; array_push($Relateds, $Related); //Appointment require_once 'modules/Calls/CallFormBase.php'; $callForm = new CallFormBase(); $Related['FORMBODY'] = "<h5 class='dataLabel'><input class='checkbox' type='checkbox' name='newmeeting' onclick='toggleDisplay(\"newmeetingdiv\");'> " . $mod_strings['LNK_NEW_APPOINTMENT'] . "</h5><div id='newmeetingdiv' style='display:none'>" . $callForm->getWideFormBody('Appointments', 'Calls', 'ConvertLead') . "</div><br>"; //Related['FORMFOOTER']=get_form_footer(); $Related['POSTFORM'] = '';
$selectAccountButton .= "<div id='newaccountdivlink' style='display:inline' class='dataLabel'>{$mod_strings['LNK_SELECT_ACCOUNT']}: <input class='sqsEnabled' name='display_account_name' id='display_account_name' type=\"text\" value=\"\"><input name='selectedAccount' id='selectedAccount' type=\"hidden\" value=''> <input type='button' title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1 LANGUAGE=javascript onclick='open_popup(\"Accounts\", 600, 400, \"\", true, false, {$encoded_contact_popup_request_data});'/> <input type='button' title=\"{$app_strings['LBL_CLEAR_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_CLEAR_BUTTON_KEY']}\" type=\"button\" class=\"button\" value='{$app_strings['LBL_CLEAR_BUTTON_LABEL']}' name=btn1 LANGUAGE=javascript onclick='document.forms[\"BusinessCard\"].selectedAccount.value=\"\";document.forms[\"BusinessCard\"].display_account_name.value=\"\"; '><br><b>{$app_strings['LBL_OR']}</b></div><br><br>"; $xtpl->assign('FORMHEADER', get_form_header($mod_strings['LNK_NEW_ACCOUNT'], '', '')); require_once 'modules/Accounts/AccountFormBase.php'; $accountForm = new AccountFormBase(); $xtpl->assign('CLASS', 'evenListRow'); $xtpl->assign('FORMBODY', $selectAccountButton . "<slot class='dataLabel'><input class='checkbox' type='checkbox' name='newaccount' onclick='document.forms[\"BusinessCard\"].selectedAccount.value=\"\";document.forms[\"BusinessCard\"].display_account_name.value=\"\";toggleDisplay(\"newaccountdiv\");'> " . $mod_strings['LNK_NEW_ACCOUNT'] . "</slot> <div id='newaccountdiv' style='display:none'>" . $accountForm->getWideFormBody('Accounts', 'Accounts', 'BusinessCard', '')); require_once 'modules/Notes/NoteFormBase.php'; $noteForm = new NoteFormBase(); $postform = "<div id='accountnotelink'><p><a href='javascript:toggleDisplay(\"accountnote\");'>{$mod_strings['LNK_NEW_NOTE']}</a></p></div>"; $postform .= '<div id="accountnote" style="display:none">' . $noteForm->getFormBody('AccountNotes', 'Notes', 'BusinessCard', 85) . '</div>'; $xtpl->assign('POSTFORM', $postform); $xtpl->parse("main.headlessform"); //OPPORTUNITTY $xtpl->assign('FORMHEADER', get_form_header($mod_strings['LNK_NEW_OPPORTUNITY'], '', '')); require_once 'modules/Opportunities/OpportunityFormBase.php'; $oppForm = new OpportunityFormBase(); $xtpl->assign('CLASS', 'evenListRow'); $xtpl->assign('FORMBODY', "<slot class='dataLabel'><input class='checkbox' type='checkbox' name='newopportunity' onclick='toggleDisplay(\"newoppdiv\");'> " . $mod_strings['LNK_NEW_OPPORTUNITY'] . "</slot><div id='newoppdiv' style='display:none'>" . $oppForm->getWideFormBody('Opportunities', 'Opportunities', 'BusinessCard', '', false)); require_once 'modules/Notes/NoteFormBase.php'; $noteForm = new NoteFormBase(); $postform = "<div id='oppnotelink'><a href='javascript:toggleDisplay(\"oppnote\");'>{$mod_strings['LNK_NEW_NOTE']}</a></div>"; $postform .= '<div id="oppnote" style="display:none">' . $noteForm->getFormBody('OpportunityNotes', 'Notes', 'BusinessCard', 85) . '</div><br>'; $xtpl->assign('POSTFORM', $postform); $xtpl->parse("main.headlessform"); //Appointment $xtpl->assign('FORMHEADER', $mod_strings['LNK_NEW_APPOINTMENT']); require_once 'modules/Calls/CallFormBase.php'; $callForm = new CallFormBase(); $xtpl->assign('FORMBODY', "<input class='checkbox' type='checkbox' name='newappointment' onclick='toggleDisplay(\"newappointmentdiv\");'> " . $mod_strings['LNK_NEW_APPOINTMENT'] . "<div id='newappointmentdiv' style='display:none'>" . $callForm->getWideFormBody('Appointments', 'Calls', 85)); $xtpl->assign('POSTFORM', ''); $xtpl->parse("main.headlessform");
/** * Create HTML form to enter a new record with the minimum necessary fields. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. */ function get_new_record_form() { require_once 'modules/Opportunities/OpportunityFormBase.php'; $oppForm = new OpportunityFormBase(); return $oppForm->getForm(''); }