modx->lexicon('fred.elements.create'); } public function loadCustomCssJs() { $this->addJavascript($this->fred->getOption('jsUrl') . 'utils/utils.js'); $this->addJavascript($this->fred->getOption('jsUrl') . 'utils/combos.js'); $this->addJavascript($this->fred->getOption('jsUrl') . 'home/widgets/element_option_set.window.js'); $this->addJavascript($this->fred->getOption('jsUrl') . 'element/panel.js'); $this->addLastJavascript($this->fred->getOption('jsUrl') . 'element/page.js'); $this->addHtml(' '); $this->modx->invokeEvent('FredElementFormRender'); } public function getTemplateFile() { return $this->fred->getOption('templatesPath') . 'element.tpl'; } public function checkPermissions() { if (!$this->modx->hasPermission('fred_element_save')) { return false; } return parent::checkPermissions(); } }