form = $this->get('Form'); $this->ftp = JClientHelper::setCredentialsFromRequest('ftp'); $this->source = $this->get('Source'); $this->state = $this->get('State'); $this->template = $this->get('Template'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $canDo = TemplatesHelper::getActions(); JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_EDIT_FILE'), 'thememanager'); // Can save the item. if ($canDo->get('core.edit')) { JToolbarHelper::apply('source.apply'); JToolbarHelper::save('source.save'); } JToolbarHelper::cancel('source.cancel'); JToolbarHelper::divider(); JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES_EDIT_SOURCE'); } }