isConfigurable = true; if(empty($options['title'])) { $this->title = translate('LBL_DASHLET_TITLE', 'Home'); $this->title = translate('LBL_DASHLET_DISCOVER_SUGAR_PRO', 'Home'); } else { $this->title = $options['title']; } if(empty($options['url'])) { $this->url = $this->defaultURL; $this->url = 'http://apps.sugarcrm.com/dashlet/go-pro.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@'; } else { $this->url = $options['url']; } if(empty($options['height']) || (int)$options['height'] < 1 ) { $this->height = 315; } else { $this->height = (int)$options['height']; } } function displayOptions() { global $app_strings; $ss = new Sugar_Smarty(); $ss->assign('titleLBL', translate('LBL_DASHLET_OPT_TITLE', 'Home')); $ss->assign('urlLBL', translate('LBL_DASHLET_OPT_URL', 'Home')); $ss->assign('heightLBL', translate('LBL_DASHLET_OPT_HEIGHT', 'Home')); $ss->assign('title', $this->title); $ss->assign('url', $this->url); $ss->assign('id', $this->id); $ss->assign('height', $this->height); $ss->assign('saveLBL', $app_strings['LBL_SAVE_BUTTON_LABEL']); return $ss->fetch('modules/Home/Dashlets/iFrameDashlet/configure.tpl'); } function saveOptions($req) { $options = array(); if ( isset($req['title']) ) { $options['title'] = $req['title']; } if ( isset($req['url']) ) { $options['url'] = $req['url']; } if ( isset($req['height']) ) { $options['height'] = (int)$req['height']; } return $options; } function display(){ $sugar_edition = 'COM'; $out_url = str_replace( array('@@LANG@@','@@VER@@','@@EDITION@@'), array($GLOBALS['current_language'],$GLOBALS['sugar_config']['sugar_version'],$sugar_edition), $this->url); return parent::display() . ""; } }