예제 #1
0
    require_once 'include/QuickSearchDefaults.php';
    $qsd = QuickSearchDefaults::getQuickSearchDefaults();
    $qsd->setFormName('BusinessCard');
    $sqs_objects = array('BusinessCard_display_account_name' => $qsd->getQSParent());
    $sqs_objects['BusinessCard_display_account_name']['populate_list'] = array('display_account_name', 'selectedAccount');
    $quicksearch_js = '<script type="text/javascript" language="javascript">
                       sqs_objects = ' . $json->encode($sqs_objects) . ';
				       addToValidateBinaryDependency(\'BusinessCard\', \'display_account_name\', \'alpha\', false, \'' . $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ACCOUNT'] . '\', \'selectedAccount\' );
				   </script>';
    $selectAccountButton = $quicksearch_js;
    $selectAccountButton .= "<div id='newaccountdivlink' style='display:inline' class='dataLabel'>{$mod_strings['LNK_SELECT_ACCOUNT']}:&nbsp;<input class='sqsEnabled' name='display_account_name' id='display_account_name' type=\"text\" value=\"\"><input name='selectedAccount' id='selectedAccount' type=\"hidden\" value=''>&nbsp;<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\");'>&nbsp;" . $mod_strings['LNK_NEW_ACCOUNT'] . "</slot>&nbsp;<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\");'>&nbsp;" . $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>";
예제 #2
0
 $Related = array();
 //Account
 ///////////////////////////////////////
 ///
 /// SETUP PARENT POPUP
 $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'ConvertLead', 'field_to_name_array' => array('id' => 'selectedAccount', 'name' => 'display_account_name'));
 $json = getJSONobj();
 $encoded_popup_request_data = $json->encode($popup_request_data);
 //
 ///////////////////////////////////////
 $selectAccountButton = "<div id='newaccountdivlink' style='display:inline'><b>{$mod_strings['LNK_SELECT_ACCOUNT']}</b>&nbsp;<input readonly='readonly' name='display_account_name' id='display_account_name' type=\"text\" value=\"\"><input name='selectedAccount' id='selectedAccount' type=\"hidden\" value=''>&nbsp;<input type='button' title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\" accessKey=\"{$app_strings['LBL_SELECT_BUTTON_KEY']}\" type=\"button\"  class=\"button\" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1 onclick='open_popup(\"Accounts\", 600, 400, \"\", true, false, {$encoded_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[\"ConvertLead\"].selectedAccount.value=\"\";document.forms[\"ConvertLead\"].display_account_name.value=\"\"; '><br><b>{$app_strings['LBL_OR']}</b></div>";
 $Related['FORMHEADER'] = get_form_header($mod_strings['LNK_NEW_ACCOUNT'], '', '');
 require_once 'modules/Accounts/AccountFormBase.php';
 $accountForm = new AccountFormBase();
 $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';