/** * display method of Hello view * @return void **/ function display($tpl = null) { $spiel =& $this->get('Data'); $isNew = $spiel->id < 1; $text = $isNew ? JText::_('New') : JText::_('Edit'); JToolBarHelper::title(JText::_('Spiel') . ': <small>[ ' . $text . ' ]</small>'); JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { // for existing items the button is renamed `close` JToolBarHelper::cancel('cancel', 'Close'); } if ($spiel->idMannschaft1 == 0) { // setze Standard Mannschaft $spiel->idMannschaft1 = $this->getStandardMannschaftID(); } if ($spiel->idMannschaft2 == 0) { // setze Standard Mannschaft $spiel->idMannschaft2 = $this->getStandardMannschaftID(); } // Load the JEditor object $editor =& JFactory::getEditor(); $this->assignRef('spiel', $spiel); $this->assignRef('mannschaft1', $this->__getMannschaftSelect($spiel->idMannschaft1, 1)); $this->assignRef('mannschaft2', $this->__getMannschaftSelect($spiel->idMannschaft2, 2)); $this->assignRef('editor', $editor); $this->assignRef('jsSpielerDaten', $this->__getJSSpielerDaten($spiel->id)); $this->assignRef('spieltyp', $this->__getSpieltypSelect($spiel->idSpiel_typ)); parent::display($tpl); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $this->assign('signature', RSTicketsProHelper::getSignature()); $this->assignRef('editor', JFactory::getEditor()); $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); if (RSTicketsProHelper::isJ16() && $mainframe->isSite()) { // Description if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } // Keywords if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } // Robots if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } } parent::display(); }
protected function getInput() { jimport('joomla.application.component.helper'); $icagendaParams = JComponentHelper::getParams('com_icagenda'); $Explode = explode('_', $this->name); $TypeName = $Explode[0] . ']'; $replace = array("jform", "params", "[", "]"); $name = str_replace($replace, "", $TypeName); $Type = JRequest::getVar('type'); $Type_default = $name . '_default'; $Type_article = $name . '_article'; $Type_url = $name . '_url'; $editor = JFactory::getEditor(); $html = array(); $html[] = '<div id="' . $Type_url . '"><fieldset class="span9 iCleft">'; $html[] = '<input type="url" name="' . $this->name . '" value="' . $this->value . '" />'; $html[] = '</fieldset></div>'; if ($Type == '1') { $html[] = '<script type="text/javascript">'; $html[] = 'document.getElementById("' . $Type_article . '").style.display = "block";'; $html[] = 'document.getElementById("' . $Type_url . '").style.display = "none";'; $html[] = '</script>'; } elseif ($Type == '2') { $html[] = '<script type="text/javascript">'; $html[] = 'document.getElementById("' . $Type_article . '").style.display = "none";'; $html[] = 'document.getElementById("' . $Type_url . '").style.display = "block";'; $html[] = '</script>'; } else { $html[] = '<script type="text/javascript">'; $html[] = 'document.getElementById("' . $Type_article . '").style.display = "none";'; $html[] = 'document.getElementById("' . $Type_url . '").style.display = "none";'; $html[] = '</script>'; } return implode("\n", $html); }
/** * Method to get the field input markup. */ protected function getInput() { $icName = $this->name; $icDefault = $this->default; $icValue = $this->value; if (strpos($icValue, '\\n') !== false) { $array_newline = array('\\n', '\\n'); $icValue = str_replace($array_newline, '<br />', $icValue); } $get_period_string = JText::_('COM_ICAGENDA_REGISTRATION_EMAIL_USER_PERIOD_DEFAULT_BODY'); $get_date_string = JText::_('COM_ICAGENDA_REGISTRATION_EMAIL_USER_DATE_DEFAULT_BODY'); if ($icValue == 'COM_ICAGENDA_REGISTRATION_EMAIL_USER_PERIOD_DEFAULT_BODY') { $icBody = $get_period_string; } elseif ($icValue == 'COM_ICAGENDA_REGISTRATION_EMAIL_USER_DATE_DEFAULT_BODY') { $icBody = $get_date_string; } else { $icBody = $icValue; } $editor = JFactory::getEditor(); $html = array(); $html[] = '<div id="' . $this->name . '_ic_editor"><fieldset class="span9 iCleft">'; $html[] = $editor->display($this->name, $icBody, "100%", "300", "300", "20", 1, null, null, null, array('mode' => 'advanced')); $html[] = '</fieldset></div>'; return implode("\n", $html); }
/** * Displays the application output in the canvas. * * @since 1.0 * @access public * @param int The user id that is currently being viewed. */ public function display($uid = null, $docType = null) { $event = FD::event($uid); $editor = JFactory::getEditor(); $guest = $event->getGuest(); // Only allow group admin to create or edit news if (!$guest->isAdmin() && !$this->my->isSiteAdmin()) { FD::info()->set(false, JText::_('COM_EASYSOCIAL_EVENTS_ONLY_GUEST_ARE_ALLOWED'), SOCIAL_MSG_ERROR); return $this->redirect($event->getPermalink(false)); } // Determines if this item is being edited $id = $this->input->get('newsId', 0, 'int'); $news = FD::table('EventNews'); $news->load($id); FD::page()->title(JText::_('APP_EVENT_NEWS_FORM_UPDATE_PAGE_TITLE')); // Determine if this is a new record or not if (!$id) { $news->comments = true; FD::page()->title(JText::_('APP_EVENT_NEWS_FORM_CREATE_PAGE_TITLE')); } // Get app params $params = $this->app->getParams(); $this->set('params', $params); $this->set('news', $news); $this->set('editor', $editor); $this->set('event', $event); echo parent::display('canvas/form'); }
public function display($tpl = null) { $this->form = $this->get('Form'); $this->item = $this->get('Item'); $buttons_plugin = JPluginHelper::getPlugin('editors-xtd'); if ($buttons_plugin) { } $groupModel = JModelLegacy::getInstance('Groups', 'TZ_Portfolio_PlusModel', array('ignore_request' => true)); $groupModel->setState('filter_order', 'name'); $groupModel->setState('filter_order_Dir', 'ASC'); $this->groups = $groupModel->getItems(); $editor = JFactory::getEditor(); $this->assign('editor', $editor); if ($this->item->id == 0) { $this->item->published = 'P'; } else { if ($this->item->published == 1) { $this->item->published = 'P'; } else { $this->item->published = 'U'; } } $this->addToolbar(); parent::display($tpl); }
function Mails() { $current_mail_type = JRequest::getVar('mail_type'); $model = JModel::getInstance('Mailman', 'JTheFactoryModel'); $rows = $model->getMailList(); $current_mail = $rows[0]; $options = array(); foreach ($rows as $row) { $options[] = JHtml::_('select.option', $row->mail_type, JText::_(APP_PREFIX . '_mail_' . $row->mail_type)); if ($row->mail_type == $current_mail_type) { $current_mail = $row; } } $select_html = JHtml::_('select.genericlist', $options, 'mail_type', "onchange='this.form.submit();'", 'value', 'text', $current_mail_type); $title = JText::_(APP_PREFIX . '_mail_' . $current_mail->mail_type); $help = JText::_(APP_PREFIX . '_mail_' . $current_mail->mail_type . '_help'); $editor = JFactory::getEditor(); $view = $this->getView('mails'); $view->assignRef('mail_type', $current_mail_type); $view->assignRef('rows', $rows); $view->assignRef('current_mail', $current_mail); $view->assignRef('title', $title); $view->assignRef('help', $help); $view->assignRef('mailtype_select', $select_html); $view->assignRef('editor', $editor); $view->assign('shortcuts', $model->getShortcuts()); $view->display('mail'); return; }
function defaultTpl($tpl = null) { $this->addToolbar(); $editor = JFactory::getEditor(); $this->assignRef('editor', $editor); parent::display($tpl); }
function config() { jimport('joomla.html.editor'); JHtml::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'htmlelements'); $model = JModel::getInstance('Comission', 'J' . APP_PREFIX . 'PricingModel'); $r = $model->getItemPrices($this->commissionType); JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'thefactory' . DS . 'category' . DS . 'models'); $catModel = JModel::getInstance('Category', 'JTheFactoryModel'); $cattree = $catModel->getCategoryTree(); $pricing = $model->loadPricingObject(); $params = new JParameter($pricing->params); $editor = JFactory::getEditor(); $viewMenu = $this->getView('menu'); $viewMenu->display(); $view = $this->getView('Config'); $view->assign('default_price', $r->default_price); $view->assign('price_powerseller', $r->price_powerseller); $view->assign('price_verified', $r->price_verified); $view->assign('category_pricing_enabled', $r->category_pricing_enabled); $view->assign('category_pricing', $r->category_pricing); $view->assign('category_tree', $cattree); $view->assign('itemname', $this->itemname); $view->assign('editor', $editor); $view->assign('email_text', base64_decode($params->get('email_text'))); $view->display(); }
function display($tpl = null) { $text_name = $this->param1; // param1 is the text name, 'top_text' or 'bottom_text' if ($text_name == 'top_text') { FCP_Admin::make_title('COM_FLEXICONTACT_V_TOP_TEXT', $this->config_data, $this->config_count); } else { FCP_Admin::make_title('COM_FLEXICONTACT_V_BOTTOM_TEXT', $this->config_data, $this->config_count); } JToolBarHelper::apply(); JToolBarHelper::save(); JToolBarHelper::cancel(); // setup the wysiwg editor $editor = JFactory::getEditor(); ?> <form action="index.php" method="post" name="adminForm" id="adminForm" > <input type="hidden" name="option" value="<?php echo LAFC_COMPONENT; ?> " /> <input type="hidden" name="controller" value="menu" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="view" value="config_text" /> <input type="hidden" name="param1" value="<?php echo $text_name; ?> " /> <?php echo $editor->display($text_name, htmlspecialchars($this->config_data->config_data->{$text_name}, ENT_QUOTES), '700', '350', '60', '20', array('pagebreak', 'readmore')); ?> </form> <?php }
/** * Get the editor object. * * @return object */ protected function &_getEditor() { if (empty($this->_editor)) { // editor attribute can be in the form of: // editor="desired|alternative" if ($editorName = trim((string) $this->_element->attributes()->editor)) { $parts = explode('|', $editorName); $db =& JFactory::getDbo(); $query = 'SELECT element' . ' FROM #__extensions' . ' WHERE element = ' . $db->Quote($parts[0]) . ' AND folder = ' . $db->Quote('editors') . ' AND enabled = 1'; $db->setQuery($query); if ($db->loadResult()) { $editorName = trim($parts[0]); } else { if (isset($parts[1])) { $editorName = trim($parts[1]); } else { $editorName = ''; } } $this->_element->attributes()->editor = $editorName; } $this->_editor = JFactory::getEditor($editorName ? $editorName : null); } return $this->_editor; }
/** * Renders the Joomla-HTML widget. * This widget is too specific to render with One_Script and should not be rendered otherwise, * hence this does not use the One_Form_Container_Abstract::parse() function * * @param One_Model $model * @param One_Dom $d * @access protected */ protected function _render($model, One_Dom $d) { $editor = JFactory::getEditor(); JHTML::_('behavior.tooltip'); $width = $this->getParameter('width') ? $this->getParameter('width') : '100%'; $height = $this->getParameter('height') ? $this->getParameter('height') : '550'; //TODO: clean this up, should add a 'save editor' part for each control, multiple controls do not work now ob_start(); ?> <script language="javascript" type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } //save <?php echo $editor->save($this->getFormName()); ?> submitform( pressbutton ); } //--> </script> <?php echo preg_replace('/<div class="button2-left"><div class="translate">(.*?)(<\\/div><\\/div>)/is', '', $editor->display($this->getFormName(), $this->getValue($model), $width, $height, '75', '20')); $edit = ob_get_clean(); if (!is_null($this->getCfg('buttons')) && in_array($this->getCfg('buttons'), array('no', '0', 'false'))) { $edit = preg_replace('/<div class="button2-left">(.*?)(<\\/div><\\/div>)/is', '', $edit); } JHTML::_('behavior.modal'); JHTML::_('behavior.modal', 'a.modal-button'); $dom = One_Repository::createDom(); $dom->add('<span class="OneWidget clearfix">'); // should we show a label? if (!is_null($this->getLabel()) && !$this->getCfg('noLabel')) { $label = '<label class="OneFieldLabel" for="' . $this->getID() . '">' . $this->getLabel() . ($this->isRequired() ? ' *' : '') . '</label>' . "\n"; } // start with label? if ($label && !$this->getCfg('lblLast')) { $dom->add($label); } $app = JFactory::getApplication(); $jDoc = JFactory::getDocument(); $dom->add('<div class="OneWidgetEditor">'); $dom->add($edit); $dom->add('</div>'); // end with label? if ($label && $this->getCfg('lblLast')) { $dom->add($label); } $dom->add('</span>'); $d->addDom($dom); }
/** * Displays the form * @param string $tpl */ public function _displayForm($tpl) { JHtml::_('behavior.formvalidation'); $db = JFactory::getDBO(); $uri = JFactory::getURI(); $user = JFactory::getUser(); $form = $this->get('Form'); $lists = array(); $editor = JFactory::getEditor(); //get the item $item = $this->get('item'); //Get Versions $model = $this->getModel(); $archive = strtolower($item->name); $item->files = $model->getFiles($archive); if (!version_compare(JVERSION, '3.0', 'lt')) { $form->bind(JArrayHelper::fromObject($item)); } else { $form->bind($item); } $isNew = $item->id < 1; // Edit or Create? if ($isNew) { // initialise new record $item->published = 1; } $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $item->published); $this->form = $form; $this->lists = $lists; $this->item = $item; $this->isNew = $isNew; parent::display($tpl); }
/** * Creates the output for venue submissions * * @since 0.5 * @param int $tpl */ function display($tpl = null) { $app =& JFactory::getApplication(); $user =& JFactory::getUser(); if (!$user->id) { $app->redirect(JRoute::_($_SERVER["HTTP_REFERER"]), JText::_('Please login to be able to submit venues'), 'error'); } $editor =& JFactory::getEditor(); $doc =& JFactory::getDocument(); $elsettings =& ELHelper::config(); // Get requests $id = JRequest::getInt('id'); //Get Data from the model $row = $this->Get('Venue'); JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'locdescription'); JHTML::_('behavior.formvalidation'); JHTML::_('behavior.tooltip'); //add css file $doc->addStyleSheet($this->baseurl . '/components/com_eventlist/assets/css/eventlist.css'); $doc->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); // Get the menu object of the active menu item $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $app->getParams('com_eventlist'); $id ? $title = JText::_('EDIT VENUE') : ($title = JText::_('ADD VENUE')); //pathway $pathway =& $app->getPathWay(); $pathway->setItemName(1, $item->name); $pathway->addItem($title, ''); //Set Title $doc->setTitle($title); //editor user $editoruser = ELUser::editoruser(); //transform <br /> and <br> back to \r\n for non editorusers if (!$editoruser) { $row->locdescription = ELHelper::br2break($row->locdescription); } //Get image $limage = ELImage::flyercreator($row->locimage); //Set the info image $infoimage = JHTML::_('image', 'components/com_eventlist/assets/images/icon-16-hint.png', JText::_('NOTES')); // country list $countries = array(); $countries[] = JHTML::_('select.option', '', JText::_('Select country')); $countries = array_merge($countries, ELHelper::getCountryOptions()); $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox"', 'value', 'text', $row->country); unset($countries); $this->assignRef('row', $row); $this->assignRef('editor', $editor); $this->assignRef('editoruser', $editoruser); $this->assignRef('limage', $limage); $this->assignRef('infoimage', $infoimage); $this->assignRef('elsettings', $elsettings); $this->assignRef('item', $item); $this->assignRef('params', $params); $this->assignRef('lists', $lists); $this->assignRef('title', $title); $this->assignRef('mode', JRequest::getVar('mode', '')); parent::display($tpl); }
function fetchElement($name, $value, &$node, $control_name) { $editor = JFactory::getEditor(); /* @var $editor JEditor */ $code = $editor->display($control_name . '[' . $name . ']', $value, 800, 500, 1, 1); return $code; }
function display($tpl = null) { global $option; if ($this->getLayout() == 'form') { $this->_getFormToolBar(); $item = $this->get('item'); $directory = JPATH_SITE . DS . 'images' . DS . 'stories'; $lists = array(); JHTML::_('behavior.modal'); $lists['image'] = '<div class="button2-left"><div class="image">'; $lists['image'] .= "<a rel=\"{handler: 'iframe', size: {x: 570, y: 400}}\" href=\"" . JURI::base() . "index.php?option=com_media&view=images&tmpl=component&e_name=image&folder=" . $directory . "\" title=\"" . JText::_('Image') . "\" class=\"modal\">" . JText::_('Image') . "</a>"; $lists['image'] .= '</div></div>'; $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $item->published); $lists['promote'] = JHTML::_('select.booleanlist', 'is_promotion', 'class="inputbox"', $item->is_promotion); $lists['catid'] = JHTML::_('list.category', 'catid', $option, intval($item->catid)); $editor =& JFactory::getEditor(); $this->assignRef('lists', $lists); $this->assignRef('editor', $editor); $this->assignRef('item', $item); } else { $this->_getListToolBar(); // Get data from the model $items =& $this->get('items'); $this->assignRef('items', $items); } parent::display($tpl); }
function display($tpl = null) { FCP_Admin::make_title('COM_FLEXICONTACT_CONFIG_CONFIRM_NAME', $this->config_data, $this->config_count); JToolBarHelper::apply(); JToolBarHelper::save(); JToolBarHelper::cancel(); // setup the key panel $keypanel = FCP_Admin::make_key_panel($this->config_data->config_data); // setup the wysiwg editor $editor = JFactory::getEditor(); ?> <form action="index.php" method="post" name="adminForm" id="adminForm" > <input type="hidden" name="option" value="<?php echo LAFC_COMPONENT; ?> " /> <input type="hidden" name="controller" value="menu" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="view" value="config_confirm" /> <?php echo "\n" . '<table><tr><td valign="top">' . "\n<table><tr><td>"; echo JText::_('COM_FLEXICONTACT_LINK'); echo '</td><td><input type="text" size="60" name="confirm_link" value="' . $this->config_data->config_data->confirm_link . '" /> '; echo FCP_Admin::make_info(JText::_('COM_FLEXICONTACT_CONFIRM_LINK_DESC')); echo "</td></tr>\n<tr>"; echo '<td valign="top">' . JText::_('COM_FLEXICONTACT_TEXT'); echo '</td><td valign="top">' . $editor->display('confirm_text', htmlspecialchars($this->config_data->config_data->confirm_text, ENT_QUOTES), '700', '350', '60', '20', array('pagebreak', 'readmore')); echo "\n" . '</td></tr></table></td><td valign="top">'; echo $keypanel; echo "\n" . '</td></tr></table>'; ?> </form> <?php }
protected function getInput() { jimport('joomla.application.component.helper'); $icagendaParams = JComponentHelper::getParams('com_icagenda'); $tosContent = $icagendaParams->get('tosContent', ''); $tos_Type = $icagendaParams->get('tos_Type', ''); $editor = JFactory::getEditor(); // $editor = JEditor::getEditor(); $html = array(); $html[] = '<div id="tos_custom"><fieldset class="span9 iCleft">'; $html[] = $editor->display($this->name, $tosContent, "100%", "300", "300", "20", 1, null, null, null, array('mode' => 'advanced')); $html[] = '</fieldset></div>'; if ($tos_Type == '2') { $html[] = '<script type="text/javascript">'; $html[] = 'document.getElementById("ic_default").style.display = "none";'; $html[] = 'document.getElementById("ic_article").style.display = "none";'; $html[] = 'document.getElementById("tos_custom").style.display = "block";'; $html[] = '</script>'; } else { $html[] = '<script type="text/javascript">'; $html[] = 'document.getElementById("tos_custom").style.display = "none";'; $html[] = '</script>'; } return implode("\n", $html); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_REDEVENT_EMAIL_ATTENDEES_TITLE')); $document->addStyleSheet('components/com_redevent/assets/css/redeventbackend.css'); JHTML::_('behavior.tooltip'); $editor =& JFactory::getEditor(); $settings = JComponentHelper::getParams('com_redevent'); $cids = JRequest::getVar('cid', array(), 'post'); JArrayHelper::toInteger($cids); //add toolbar JToolBarHelper::title(JText::_('COM_REDEVENT_EMAIL_ATTENDEES_TITLE'), 'registrations'); JToolBarHelper::custom('sendemail', 'send.png', 'send.png', 'COM_REDEVENT_ATTENDEES_TOOLBAR_EMAIL_SEND', false); JToolBarHelper::cancel('cancelemail'); $model = JModel::getInstance('attendees', 'redeventmodel'); $emails = $model->getEmails($cids); $event = $model->getEvent(); // echo '<pre>';print_r($emails); echo '</pre>';exit; $this->assignRef('editor', $editor); $this->assignRef('cids', $cids); $this->assignRef('emails', $emails); $this->assignRef('event', $event); $this->assignRef('settings', $settings); $this->assignRef('xref', JRequest::getInt('xref')); parent::display($tpl); }
function display($tpl = null) { $model = $this->getModel(); $this->acl = JFactory::getACL(); $this->gtree = array(); $app = JFactory::getApplication(); $task = $app->input->getCmd('task', 'settings'); $this->task = $this->get($task); $confdb = $model->getConf(); $conf = array('general' => array(), 'integration' => array(), 'frontend' => array()); foreach ($confdb as $obj) { $conf[$obj['group']][] = array('optname' => $obj['optname'], 'value' => $obj['value'], 'description' => $obj['description'], 'type' => $obj['type']); } $this->conf = $conf; $editor = JFactory::getEditor(); $this->editor = $editor; $editor_params = array('mode' => 'advanced'); $this->editor_params = $editor_params; JToolBarHelper::title(JText::_('COM_JVARCADE_SETTINGS'), 'jvasettings'); JToolBarHelper::custom('settings', 'save.png', 'save.png', JText::_('COM_JVARCADE_SAVE_SETTINGS'), false, false); jvarcadeToolbarHelper::addSubmenu($this->getName()); $this->addSidebar('settings'); // Comments $db = JFactory::getDbo(); $db->setQuery("SELECT element as `option`, enabled FROM #__extensions WHERE `type` = 'component' AND element IN ('com_comment', 'com_jcomments', 'com_jacomment')"); $this->comment_data = $db->loadAssocList('option'); parent::display($tpl); }
/** * Displays the form * @param string $tpl */ public function _displayForm($tpl) { jimport('joomla.form.formvalidator'); JHTML::stylesheet('fields.css', 'administrator/components/com_szavazasok/assets/'); $db =& JFactory::getDBO(); $uri =& JFactory::getURI(); $user =& JFactory::getUser(); $form = $this->get('Form'); $lists = array(); $editor =& JFactory::getEditor(); //get the item $item =& $this->get('item'); if (!version_compare(JVERSION, '3.0', 'lt')) { $form->bind(JArrayHelper::fromObject($item)); } else { $form->bind($item); } $isNew = $item->id < 1; // Edit or Create? if ($isNew) { // initialise new record $item->published = 1; } $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $item->published); $this->assign('form', $form); $this->assignRef('lists', $lists); $this->assignRef('editor', $editor); $this->assignRef('item', $item); $this->assignRef('isNew', $isNew); parent::display($tpl); }
protected function getInput() { jimport('joomla.application.component.helper'); $icagendaParams = JComponentHelper::getParams('com_icagenda'); $Explode = explode('_', $this->name); $TypeName = $Explode[0] . ']'; $replace = array("jform", "[", "]"); $name = str_replace($replace, "", $TypeName); $icContent = $icagendaParams->get($name . '_Content', ''); $Type = $icagendaParams->get($name, ''); $Type_default = $name . '_default'; $Type_content = $name . '_custom'; $editor = JFactory::getEditor(); $html = array(); $html[] = '<div id="' . $Type_content . '"><fieldset class="span9 iCleft">'; $html[] = $editor->display($this->name, $icContent, "100%", "300", "300", "20", 1, null, null, null, array('mode' => 'advanced')); $html[] = '</fieldset></div>'; if ($Type == '2') { $html[] = '<script type="text/javascript">'; // $html[] = 'document.getElementById("'.$Type_default.'").style.display = "none";'; $html[] = 'document.getElementById("' . $Type_content . '").style.display = "block";'; $html[] = '</script>'; } else { $html[] = '<script type="text/javascript">'; $html[] = 'document.getElementById("' . $Type_content . '").style.display = "none";'; $html[] = '</script>'; } return implode("\n", $html); }
/** * Displays the application output in the canvas. * * @since 1.0 * @access public * @param int The user id that is currently being viewed. */ public function display($uid = null, $docType = null) { $group = FD::group($uid); $editor = JFactory::getEditor(); // Only allow group admin to create or edit news if (!$group->isAdmin() && !$this->my->isSiteAdmin()) { FD::info()->set(false, JText::_('COM_EASYSOCIAL_GROUPS_ONLY_MEMBER_ARE_ALLOWED'), SOCIAL_MSG_ERROR); return $this->redirect($group->getPermalink(false)); } $id = JRequest::getInt('newsId'); $news = FD::table('GroupNews'); $news->load($id); FD::page()->title(JText::_('APP_GROUP_NEWS_FORM_UPDATE_PAGE_TITLE')); // Determine if this is a new record or not if (!$id) { $news->comments = true; FD::page()->title(JText::_('APP_GROUP_NEWS_FORM_CREATE_PAGE_TITLE')); } // Get app params $params = $this->app->getParams(); $this->set('params', $params); $this->set('news', $news); $this->set('editor', $editor); $this->set('group', $group); echo parent::display('canvas/form'); }
function edit($tpl = null) { $term = $this->get('term'); if (isset($term->id)) { JToolBarHelper::title(JText::_('TERM EDIT'), 'tag.png'); } else { JToolBarHelper::title(JText::_('TERM ADD'), 'tag.png'); } $canDo = UsersHelper::getActions(); if ($canDo->get('core.edit')) { JToolBarHelper::custom('autofilldescription', 'new', '', JText::_('Wikipedia: AutoFill Descriptions'), false); JToolBarHelper::spacer(); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); } JToolBarHelper::back(); //get params $params = JComponentHelper::getParams('com_cedtag'); $this->assignRef('params', $params); //get data $this->assignRef('term', $term); $editor = JFactory::getEditor(); $this->assignRef('editor', $editor); parent::display($tpl); }
function display($tpl = null) { global $mainframe; //Load pane behavior jimport('joomla.html.pane'); $pane =& JPane::getInstance('tabs'); //initialise variables $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $user =& JFactory::getUser(); //get vars $cid = JRequest::getVar('cid'); //create the toolbar if ($cid) { JToolBarHelper::title(JText::_('EDIT VIDEO'), 'jomtube-videos'); } else { JToolBarHelper::title(JText::_('ADD VIDEO'), 'jomtube-videos'); } JToolBarHelper::apply(); JToolBarHelper::spacer(); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); $tmplpath = dirname(__FILE__) . DS . 'tmpl'; $this->assignRef('tmplpath', $tmplpath); $this->assignRef('my', $my =& JFactory::getUser()); $this->assignRef('pane', $pane); parent::display($tpl); }
/** * Return the htmlarea in HTML * * @access public * @return string */ function toHtml() { jimport('joomla.html.editor'); $editor =& JFactory::getEditor(); if ($this->_flagFrozen) { return $this->getFrozenHtml(); } else { $name = $this->getAttribute('name'); $html = null; //tinymce and its relatives require 'double-loading' when inside jquery tab if ($editor->_name == 'jce' || $editor->_name == 'tinymce') { if (!empty($this->_value)) { $html .= sprintf('<script type="text/javascript"> //reset the controls if called in jquery tab or via ajax tinyMCE.execCommand( "mceRemoveControl", false,"' . $this->_attributes['id'] . '" ); tinyMCE.execCommand( "mceAddControl" , true, "' . $this->_attributes['id'] . '" ); </script>'); } $html .= sprintf('<style type="text/css"> <!-- #crm-container table.mceLayout td { border: none; } .button2-left { display:none; } --> </style> '); } $html .= $editor->display($name, $this->getValue(), $this->width, $this->height, '94', '20', false); return $html; } }
function renderInput($articleid, $fieldsid, $value, $extras = null) { $required = ""; $boolrequired = fieldattach::isRequired($fieldsid); if ($boolrequired) { $required = "required"; } $tmp = $extras; $lineas = explode(chr(13), $tmp); $height = 300; $str = ""; //Add CSS *********************** $str = '<link rel="stylesheet" href="' . JURI::root() . 'plugins/fieldsattachment/textarea/textarea.css" type="text/css" />'; $app = JFactory::getApplication(); $templateDir = JURI::base() . 'templates/' . $app->getTemplate(); $css = JPATH_SITE . "/administrator/templates/" . $app->getTemplate() . "/html/com_fieldsattach/css/textarea.css"; $pathcss = JURI::root() . "administrator/templates/" . $app->getTemplate() . "/html/com_fieldsattach/css/textarea.css"; if (file_exists($css)) { $str .= '<link rel="stylesheet" href="' . $pathcss . '" type="text/css" />'; } // if($lineas[0] == "RichText") // { $editor =& JFactory::getEditor(); $str .= $editor->display('field_' . $fieldsid . '', $value, '100%', '' . $height . '', '60', '20', true); // }else{ // $str .= '<textarea style="width:100%; height:'.$height.'px;" name="field_'.$fieldsid.'" >'.$value.'</textarea>'; // } //$str .= '<script>window.addEvent("load", function() { $("field_'.$fieldsid.'").addClass("'.$required.'"); } );</script>'; return $str; }
function fetchElement($name, $value, &$node, $control_name) { $label = $node->attributes('label'); $description = $node->attributes('description'); $width = $this->def($node->attributes('width'), '100%'); $height = $this->def($node->attributes('height'), 400); $newline = $node->attributes('newline'); $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); $option = JRequest::getCmd('option', ''); if ($option == 'com_modules') { $name = $control_name . '[' . $name . ']'; } $html = ''; if ($newline) { $html .= JText::_($description); $html .= '</td></tr></table>'; $html .= '</div></div></fieldset></div>'; $html .= '<div class="clr"></div><div><fieldset class="adminform">'; if ($label != '') { $html .= '<legend>' . JText::_($label) . '</legend>'; } $html .= '<div><div><div><table width="100%" class="paramlist admintable" cellspacing="1"><tr><td colspan="2" class="paramlist_value">'; } else { if ($label != '') { $html .= '<b>' . JText::_($label) . '</b><br />'; } if ($description != '') { $html .= JText::_($description) . '<br />'; } } $editor =& JFactory::getEditor(); $html .= $editor->display($name, $value, $width, $height, '60', '20', true); $html .= '<br clear="all" />'; return $html; }
/** * redFORM view display method * @return void **/ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $document = JFactory::getDocument(); $row = $this->get('Data'); $editor =& JFactory::getEditor(); /* Create the published field */ $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published); /* Get the fields */ $fields = $this->get('FieldsOptions'); $lists['fields'] = JHTML::_('select.genericlist', $fields, 'field_id', '', 'value', 'text', $row->field_id); /* Set variabels */ $this->assignRef('row', $row); $this->assignRef('lists', $lists); $this->assignRef('editor', $editor); /* Get the toolbar */ switch (JRequest::getCmd('task')) { case 'add': JToolBarHelper::title(JText::_('COM_REDFORM_Add_Value'), 'redform_plus'); break; case 'ajaxedit': $this->setLayout('ajax'); $this->assign('field_id', JRequest::getInt('fieldid')); break; default: JToolBarHelper::title(JText::_('COM_REDFORM_Edit_Value'), 'redform_plus'); break; } JToolBarHelper::save(); JToolBarHelper::apply(); JToolBarHelper::cancel(); /* Display the page */ parent::display($tpl); }
function display($tpl = null) { $mainframe = JFactory::getApplication(); $option = JRequest::getCmd('option'); // get doc info to view $doc =& $this->get('data'); $this->assignRef('doc', $doc); //get all topics, create select and assign to view $alltopics = JHTML::_('select.genericlist', $this->get('alltopics'), 'topic', '', $key = 'id', $text = 'topic'); $this->assignRef('alltopics', $alltopics); //get and assign document topics to view $topics =& $this->get('topics'); $this->assignRef('topics', $topics); // get types, create select and assign to view $type = JHTML::_('select.genericlist', $this->get('alltypes'), 'type', '', $key = 'id', $text = 'type', $this->doc->type_id); $this->assignRef('type', $type); // get formats, create select and assign to view $format = JHTML::_('select.genericlist', $this->get('allformats'), 'format', '', $key = 'id', $text = 'format', $this->doc->format_id); $this->assignRef('format', $format); //if $this->doc->id is not zero, use the actual published state, otherwise (new doc) set to published $this->assignRef('published', JHTML::_('select.booleanlist', 'published', '', $this->doc->id ? $this->doc->published : 1, 'Yes', 'No')); $this->assignRef('date', JHTML::_('calendar', $this->doc->date, 'date', 'date')); $this->assignRef('editor', JFactory::getEditor()); parent::display($tpl); }