コード例 #1
0
/**
 * 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()
{
    if (!isset($_REQUEST['view']) || $_REQUEST['view'] == 'day') {
        $output = '';
        //Appointment
        require_once 'modules/Calls/CallFormBase.php';
        global $mod_strings;
        $callForm = new CallFormBase();
        $output .= $callForm->getFormHeader('', 'Calls', $mod_strings['LNK_NEW_APPOINTMENT']);
        $output .= $callForm->getWideFormBody('', 'Calls', 'CallSave', false) . "<br>";
        $output .= $callForm->getFormFooter('', 'Calls', 'CallSave') . "<br>";
        return $output;
    }
}
コード例 #2
0
ファイル: Bug60114Test.php プロジェクト: delkyd/sugarcrm_dev
 public function testOrganizerDefaultAcceptance()
 {
     global $current_user;
     global $db;
     $_POST['user_invitees'] = $current_user->id;
     $_POST['module'] = 'Calls';
     $_POST['action'] = 'Save';
     $_POST['assigned_user_id'] = $current_user->id;
     $formBase = new CallFormBase();
     $call = $formBase->handleSave('', false, false);
     $sql = "SELECT accept_status FROM calls_users WHERE call_id='{$call->id}' AND user_id='{$current_user->id}'";
     $result = $db->query($sql);
     if ($row = $db->fetchByAssoc($result)) {
         $this->assertEquals('accept', $row['accept_status'], 'Should be accepted for the organizer.');
     }
 }
コード例 #3
0
function template_cal_vertical_slice($args)
{
    global $timedate;
    ?>
<th width="1%" id="bodytime">
<?php 
    template_echo_slice_date($args);
    ?>

</td>
<td width="99%" id="bodyitem">

<div style="display:none;" id='<?php 
    echo template_echo_daily_view_24_hour($args);
    ?>
_appt'> <?php 
    require_once 'modules/Calls/CallFormBase.php';
    $callForm = new CallFormBase();
    echo $callForm->getFormBody('', 'Calls', 'inlineCal' . template_echo_daily_view_24_hour($args) . 'CallSave', $timedate->to_display_date($args['calendar']->date_time->get_mysql_date(), false), $timedate->to_display_time(template_echo_daily_view_24_hour($args) . ':00:00', true, false)) . "<br>";
    ?>
</div>

<?php 
    template_echo_slice_activities($args);
    ?>
</td>
<?php 
}
コード例 #4
0
ファイル: BusinessCard.php プロジェクト: jglaine/sugar761-ent
    $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>";
    $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\");'>&nbsp;" . $mod_strings['LNK_NEW_APPOINTMENT'] . "<div id='newappointmentdiv' style='display:none'>" . $callForm->getWideFormBody('Appointments', 'Calls', 85));
    $xtpl->assign('POSTFORM', '');
    $xtpl->parse("main.headlessform");
    $xtpl->parse("main.saveend");
    $xtpl->parse("main.endform");
    $xtpl->parse("main");
    $xtpl->out("main");
}
コード例 #5
0
ファイル: Save.php プロジェクト: omusico/sugar_work
 * 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:  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/Calls/CallFormBase.php';
$formBase = new CallFormBase();
$formBase->handleSave('', true, false);
コード例 #6
0
ファイル: ConvertLead.php プロジェクト: klr2003/sourceread
    $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'] = '';
    array_push($Relateds, $Related);
    $sugar_smarty->assign('Related_records', $Relateds);
    echo $sugar_smarty->fetch('modules/Leads/ConvertLead.tpl');
}
コード例 #7
0
ファイル: Save.php プロジェクト: jglaine/sugar761-ent
<?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/Calls/CallFormBase.php';
$formBase = new CallFormBase();
if ($formBase->prepareRecurring()) {
    if ($limit = $formBase->checkRecurringLimitExceeded()) {
        echo str_replace('$limit', $limit, $GLOBALS['mod_strings']['LBL_RECURRING_LIMIT_ERROR']);
        sugar_cleanup(true);
    }
}
$formBase->handleSave('', true, false);
コード例 #8
0
/**
 * 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/Calls/CallFormBase.php';
    $callForm = new CallFormBase();
    return $callForm->getForm('', 'Calls');
}