45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||
|
|
|
||
|
|
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||
|
|
|
||
|
|
require_once('modules/EcmCalls/EcmCall.php');
|
||
|
|
require_once('modules/EcmCalls/Forms.php');
|
||
|
|
require_once ('include/time.php');
|
||
|
|
require_once('include/json_config.php');
|
||
|
|
|
||
|
|
$json_config = new json_config();
|
||
|
|
$json = getJSONobj();
|
||
|
|
$OPT = array();
|
||
|
|
|
||
|
|
$focus = new EcmCall();
|
||
|
|
|
||
|
|
if(isset($_REQUEST['record'])) {
|
||
|
|
$focus->retrieve($_REQUEST['record']);
|
||
|
|
}
|
||
|
|
else {}
|
||
|
|
|
||
|
|
if($_REQUEST['isDuplicate'] == 'true') {
|
||
|
|
$_POST['isDuplicate'] = true;
|
||
|
|
$focus->id = '';
|
||
|
|
$OPT['isDuplicate'] = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
$scriptOpt = '<script language="javascript">
|
||
|
|
var OPT = '.$json->encode($OPT).';
|
||
|
|
</script>';
|
||
|
|
echo $scriptOpt;
|
||
|
|
|
||
|
|
|
||
|
|
require_once('include/MVC/View/SugarView.php');
|
||
|
|
require_once('include/MVC/View/views/view.edit.php');
|
||
|
|
$edit = new ViewEdit();
|
||
|
|
$edit->bean = $focus;
|
||
|
|
|
||
|
|
|
||
|
|
$edit->preDisplay();
|
||
|
|
|
||
|
|
echo $edit->display();
|
||
|
|
|
||
|
|
?>
|