function display($tpl = null) { $mainframe =& JFactory::getApplication(); $params = JComponentHelper::getParams('com_redevent'); // Load pane behavior jimport('joomla.html.pane'); JHTML::_('behavior.framework'); //initialise variables $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $pane =& JPane::getInstance('sliders'); $tabs =& JPane::getInstance('tabs'); $user =& JFactory::getUser(); $settings = JComponentHelper::getParams('com_redevent'); //get vars $cid = JRequest::getVar('cid'); $url = JURI::root(); $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_EDITVENUE')); //add css and js to document $document->addScript('../includes/js/joomla/popup.js'); $document->addStyleSheet('../includes/js/joomla/popup.css'); $document->addStyleSheet('components/com_redevent/assets/css/redeventbackend.css'); $document->addScript($url . '/components/com_redevent/assets/js/attachments.js'); $document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";'); // Get data from the model $model =& $this->getModel(); $row =& $this->get('Data'); // fail if checked out not by 'me' if ($row->id) { if ($model->isCheckedOut($user->get('id'))) { JError::raiseWarning('REDEVENT_GENERIC_ERROR', $row->venue . ' ' . JText::_('COM_REDEVENT_EDITED_BY_ANOTHER_ADMIN')); $mainframe->redirect('index.php?option=com_redevent&view=venues'); } } $task = JRequest::getVar('task'); //create the toolbar if ($task == 'copy') { JToolBarHelper::title(JText::_('COM_REDEVENT_COPY_VENUE'), 'venuesedit'); } elseif ($cid) { JToolBarHelper::title(JText::_('COM_REDEVENT_EDIT_VENUE'), 'venuesedit'); //makes data safe JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'locdescription'); } else { JToolBarHelper::title(JText::_('COM_REDEVENT_ADD_VENUE'), 'venuesedit'); //set the submenu JSubMenuHelper::addEntry(JText::_('COM_REDEVENT'), 'index.php?option=com_redevent'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_EVENTS'), 'index.php?option=com_redevent&view=events'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_VENUES'), 'index.php?option=com_redevent&view=venues'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_CATEGORIES'), 'index.php?option=com_redevent&view=categories'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_ARCHIVESCREEN'), 'index.php?option=com_redevent&view=archive'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_GROUPS'), 'index.php?option=com_redevent&view=groups'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_HELP'), 'index.php?option=com_redevent&view=help'); } JToolBarHelper::apply(); JToolBarHelper::spacer(); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); //JToolBarHelper::help( 'el.editvenues', true ); $lists = array(); // categories selector $selected = array(); foreach ((array) $row->categories as $cat) { $selected[] = $cat; } $lists['categories'] = JHTML::_('select.genericlist', (array) $this->get('Categories'), 'categories[]', 'class="inputbox" multiple="multiple" size="10"', 'value', 'text', $selected); $countries = array(); $countries[] = JHTML::_('select.option', '', JText::_('COM_REDEVENT_Select_country')); $countries = array_merge($countries, redEVENTHelperCountries::getCountryOptions()); $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox"', 'value', 'text', $row->country); unset($countries); $pinpointicon = REOutput::pinpointicon($row); if ($task == 'copy') { $row->id = null; $row->venue .= ' ' . JText::_('COM_REDEVENT_copy'); $row->alias = ''; } //assign data to template $this->assignRef('row', $row); $this->assignRef('pane', $pane); $this->assignRef('tabs', $tabs); $this->assignRef('editor', $editor); $this->assignRef('settings', $settings); $this->assignRef('params', $params); $this->assignRef('lists', $lists); $this->assignRef('imageselect', $imageselect); $this->assignRef('pinpointicon', $pinpointicon); $this->assignRef('access', redEVENTHelper::getAccesslevelOptions()); $this->assignRef('form', $this->get('form')); parent::display($tpl); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); //Load pane behavior jimport('joomla.html.pane'); //initialise variables $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $user =& JFactory::getUser(); $pane =& JPane::getInstance('sliders'); $tabs =& JPane::getInstance('tabs'); //get vars $cid = JRequest::getVar('cid'); $url = JURI::root(); $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_EDITCATEGORY')); //add css to document $document->addStyleSheet($url . '/administrator/components/com_redevent/assets/css/redeventbackend.css'); $document->addScript($url . '/components/com_redevent/assets/js/attachments.js'); $document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";'); // js color picker $document->addStyleSheet($url . '/administrator/components/com_redevent/assets/css/colorpicker.css'); $document->addScript($url . '/administrator/components/com_redevent/assets/js/colorpicker.js'); //create the toolbar if ($cid) { JToolBarHelper::title(JText::_('COM_REDEVENT_EDIT_CATEGORY'), 'categoriesedit'); } else { JToolBarHelper::title(JText::_('COM_REDEVENT_ADD_CATEGORY'), 'categoriesedit'); //set the submenu JSubMenuHelper::addEntry(JText::_('COM_REDEVENT'), 'index.php?option=com_redevent'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_EVENTS'), 'index.php?option=com_redevent&view=events'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_VENUES'), 'index.php?option=com_redevent&view=venues'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_CATEGORIES'), 'index.php?option=com_redevent&view=categories'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_ARCHIVESCREEN'), 'index.php?option=com_redevent&view=archive'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_GROUPS'), 'index.php?option=com_redevent&view=groups'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_HELP'), 'index.php?option=com_redevent&view=help'); } JToolBarHelper::apply(); JToolBarHelper::spacer(); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::media_manager(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); //JToolBarHelper::help( 'el.editcategories', true ); //Get data from the model $model =& $this->getModel(); $row =& $this->get('Data'); $form =& $this->get('Form'); $groups =& $this->get('Groups'); // fail if checked out not by 'me' if ($row->id) { if ($model->isCheckedOut($user->get('id'))) { JError::raiseWarning('REDEVENT_GENERIC_ERROR', $row->catname . ' ' . JText::_('COM_REDEVENT_EDITED_BY_ANOTHER_ADMIN')); $mainframe->redirect('index.php?option=com_redevent&view=categories'); } } //clean data JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'catdescription'); /* Initiate the Lists array */ $lists = array(); /* Build a select list for categories */ $lists['categories'] = $this->get('Categories'); //build selectlists $lists['access'] = JHTML::_('list.accesslevel', $row); //build grouplist $grouplist = array(); $grouplist[] = JHTML::_('select.option', '0', JText::_('COM_REDEVENT_NO_GROUP')); $grouplist = array_merge($grouplist, $groups); $lists['groups'] = JHTML::_('select.genericlist', $grouplist, 'groupid', 'size="1" class="inputbox"', 'value', 'text', $row->groupid); $lists['access'] = JHTML::_('list.accesslevel', $row); //assign data to template $this->assignRef('lists', $lists); $this->assignRef('row', $row); $this->assignRef('form', $form); $this->assignRef('editor', $editor); $this->assignRef('pane', $pane); $this->assignRef('tabs', $tabs); $this->assignRef('access', redEVENTHelper::getAccesslevelOptions()); JHTML::_('behavior.tooltip'); parent::display($tpl); }
/** * Creates the output for venue submissions * * @since 0.5 * @param int $tpl */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $elsettings =& redEVENTHelper::config(); $params =& $mainframe->getParams(); $acl = UserAcl::getInstance(); // Get requests $id = JRequest::getInt('id'); if ($id && !$acl->canEditVenue($id)) { echo JText::_('COM_REDEVENT_USER_NOT_ALLOWED_TO_EDIT_THIS_VENUE'); return; } else { if (!$id && !$acl->canAddVenue()) { echo JText::_('COM_REDEVENT_USER_NOT_ALLOWED_TO_ADD_VENUE'); return; } } //Get Data from the model $row = $this->Get('Venue'); JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'locdescription'); JHTML::_('behavior.formvalidation'); JHTML::_('behavior.tooltip'); JHTML::_('behavior.mootools'); //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); $document->addScript('components/com_redevent/assets/js/attachments.js'); $document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";'); // Get the menu object of the active menu item $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $mainframe->getParams('com_redevent'); $id ? $title = JText::_('COM_REDEVENT_EDIT_VENUE') : ($title = JText::_('COM_REDEVENT_ADD_VENUE')); //pathway $pathway =& $mainframe->getPathWay(); $pathway->addItem($title, ''); //Set Title $document->setTitle($title); //editor user // $editoruser = ELUser::editoruser(); $editoruser = true; //transform <br /> and <br> back to \r\n for non editorusers if (!$editoruser) { $row->locdescription = redEVENTHelper::br2break($row->locdescription); } //Get image $limage = redEVENTImage::flyercreator($row->locimage); //Set the info image $infoimage = JHTML::_('image', 'components/com_redevent/assets/images/icon-16-hint.png', JText::_('COM_REDEVENT_NOTES')); $lists = array(); // categories selector $selected = array(); foreach ((array) $row->categories as $cat) { $selected[] = $cat; } $options = (array) $this->get('CategoryOptions'); $lists['categories'] = JHTML::_('select.genericlist', $options, 'categories[]', 'class="inputbox validate-categories" multiple="multiple" size="' . min(3, max(10, count($options))) . '"', 'value', 'text', $selected); // country $options = redEVENTHelperCountries::getCountryOptions('value', 'text', true); $lists['country'] = JHTML::_('select.genericlist', $options, 'country', '', 'value', 'text', $row->country); // published state selector $canpublish = $acl->canPublishVenue($id); $published = array(JHTML::_('select.option', '1', JText::_('COM_REDEVENT_PUBLISHED')), JHTML::_('select.option', '0', JText::_('COM_REDEVENT_UNPUBLISHED'))); $lists['published'] = JHTML::_('select.radiolist', $published, 'published', '', 'value', 'text', $row->published); $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('lists', $lists); $this->assignRef('item', $item); $this->assignRef('params', $params); $this->assignRef('canpublish', $canpublish); $this->assignRef('access', redEVENTHelper::getAccesslevelOptions()); parent::display($tpl); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($this->getLayout() == 'editxref') { $this->_displayeditxref($tpl); return; } else { if ($this->getLayout() == 'closexref') { $this->_displayclosexref($tpl); return; } } //Load behavior jimport('joomla.html.pane'); JHTML::_('behavior.tooltip'); JHTML::_('behavior.formvalidation'); JHTML::_('behavior.mootools'); require_once JPATH_COMPONENT_SITE . DS . 'helpers' . DS . 'helper.php'; require_once JPATH_COMPONENT_SITE . DS . 'classes' . DS . 'output.class.php'; //initialise variables $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $pane =& JPane::getInstance('tabs'); $user =& JFactory::getUser(); $params = JComponentHelper::getParams('com_redevent'); //get vars $cid = JRequest::getVar('cid'); $task = JRequest::getVar('task'); $url = JURI::root(); $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_EDITEVENT')); //add the custom stylesheet and the seo javascript $document->addStyleSheet($url . 'administrator/components/com_redevent/assets/css/redeventbackend.css'); $document->addScript($url . 'administrator/components/com_redevent/assets/js/seo.js'); $document->addScript($url . 'administrator/components/com_redevent/assets/js/xrefedit.js'); $document->addScript($url . 'administrator/components/com_redevent/assets/js/editevent.js'); $document->addScript($url . 'components/com_redevent/assets/js/attachments.js'); $document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";'); //get data from model $form = $this->get('form'); $model =& $this->getModel(); if ($task == 'add') { $model->setId($params->get('default_content')); } $row =& $this->get('Data'); if ($task == 'copy') { $row->id = null; $row->title .= ' ' . JText::_('COM_REDEVENT_copy'); $row->alias = ''; } if ($task == 'add') { $row->id = null; $row->title = ''; $row->alias = ''; } $customfields =& $this->get('Customfields'); /* Check if we have a redFORM id */ if (empty($row->redform_id)) { $row->redform_id = $params->get('defaultredformid', 1); } // fail if checked out not by 'me' if ($row->id) { if ($model->isCheckedOut($user->get('id'))) { JError::raiseWarning('REDEVENT_GENERIC_ERROR', $row->titel . ' ' . JText::_('COM_REDEVENT_EDITED_BY_ANOTHER_ADMIN')); $mainframe->redirect('index.php?option=com_redevent&view=events'); } } //make data safe JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'datdescription'); //Create category list $lists = array(); $lists['category'] = $model->getCategories(); /* Create venue selection tab */ $venueslist = $this->get('Venues'); $xrefs = $this->get('xrefs'); // categories selector $selected = array(); foreach ((array) $row->categories_ids as $cat) { $selected[] = $cat; } $lists['categories'] = JHTML::_('select.genericlist', (array) $this->get('Categories'), 'categories[]', 'class="inputbox required validate-categories" multiple="multiple" size="10"', 'value', 'text', $selected); // event layout $options = array(JHTML::_('select.option', 0, JText::_('COM_REDEVENT_DEFAULT')), JHTML::_('select.option', 1, JText::_('COM_REDEVENT_EVENT_LAYOUT_TAGS')), JHTML::_('select.option', 2, JText::_('COM_REDEVENT_EVENT_LAYOUT_FIXED'))); $lists['details_layout'] = JHTML::_('select.genericlist', $options, 'details_layout', '', 'value', 'text', $row->details_layout); // enable ical button $options = array(JHTML::_('select.option', 0, JText::_('COM_REDEVENT_DEFAULT')), JHTML::_('select.option', 1, JText::_('COM_REDEVENT_Yes')), JHTML::_('select.option', 2, JText::_('COM_REDEVENT_No'))); $lists['enable_ical'] = JHTML::_('select.genericlist', $options, 'enable_ical', '', 'value', 'text', $row->enable_ical); /* Create submission types */ $submission_types = explode(',', $row->submission_types); /* Check if redFORM is installed */ $redform_install = $this->get('CheckredFORM'); $hasattendees = $model->hasAttendees(); if ($redform_install) { /* Get a list of redFORM forms */ $redforms = $this->get('RedForms'); if ($redforms) { if ($hasattendees) { // can't reassign the form in that case ! foreach ($redforms as $aform) { if ($aform->id == $row->redform_id) { $lists['redforms'] = $aform->formname . '<input type="hidden" name="redform_id" value="' . $row->redform_id . '"/>'; break; } } } else { $lists['redforms'] = JHTML::_('select.genericlist', $redforms, 'redform_id', '', 'id', 'formname', $row->redform_id); } } else { $lists['redforms'] = ''; } /* Check if a redform ID exists, if so, get the fields */ if (isset($row->redform_id) && $row->redform_id > 0) { $formfields = $this->get('formfields'); if (!$formfields) { $formfields = array(); } } } else { $lists['redforms'] = ''; $formfields = ''; } JHTML::script('modal.js'); JHTML::stylesheet('modal.css'); //build toolbar if ($task == 'copy') { JToolBarHelper::title(JText::_('COM_REDEVENT_COPY_EVENT'), 'eventedit'); } elseif ($cid) { JToolBarHelper::title(JText::_('COM_REDEVENT_EDIT_EVENT') . ' - ' . $row->title, 'eventedit'); } else { JToolBarHelper::title(JText::_('COM_REDEVENT_ADD_EVENT'), 'eventedit'); //set the submenu JSubMenuHelper::addEntry(JText::_('COM_REDEVENT'), 'index.php?option=com_redevent'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_EVENTS'), 'index.php?option=com_redevent&view=events'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_VENUES'), 'index.php?option=com_redevent&view=venues'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_CATEGORIES'), 'index.php?option=com_redevent&view=categories'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_ARCHIVESCREEN'), 'index.php?option=com_redevent&view=archive'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_GROUPS'), 'index.php?option=com_redevent&view=groups'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_HELP'), 'index.php?option=com_redevent&view=help'); if ($user->get('gid') > 24) { JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_SETTINGS'), 'index.php?option=com_redevent&controller=settings&task=edit'); } } JToolBarHelper::apply(); JToolBarHelper::spacer(); JToolBarHelper::save(); if (JPluginHelper::isEnabled('system', 'autotweetredevent')) { //If the AutoTweet NG Component is installed // Ignore warnings because component may not be installed $warnHandlers = JERROR::getErrorHandling(E_WARNING); JERROR::setErrorHandling(E_WARNING, 'ignore'); if (JComponentHelper::isEnabled('com_autotweet', true) && !$row->id) { JToolBarHelper::save('saveAndTwit', 'Save & twit'); } // Reset the warning handler(s) foreach ($warnHandlers as $mode) { JERROR::setErrorHandling(E_WARNING, $mode); } } JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); //JToolBarHelper::help( 'el.editevents', true ); //assign vars to the template $this->assignRef('lists', $lists); $this->assignRef('row', $row); $this->assignRef('formfields', $formfields); $this->assignRef('imageselect', $imageselect); $this->assignRef('submission_types', $submission_types); $this->assignRef('editor', $editor); $this->assignRef('pane', $pane); $this->assignRef('task', $task); $this->assignRef('params', $params); $this->assignRef('formfields', $formfields); $this->assignRef('venueslist', $venueslist); $this->assignRef('redform_install', $redform_install); $this->assignRef('customfields', $customfields); $this->assignRef('access', redEVENTHelper::getAccesslevelOptions()); $this->assignRef('xrefs', $xrefs); $this->assignRef('form', $form); if (!$row->id) { $this->_prepareSessionTab(); } parent::display($tpl); }
/** * Creates the output for event submissions * * @since 0.4 * */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $user =& JFactory::getUser(); if (!$user->get('id')) { echo JText::_('COM_REDEVENT_LOGIN_TO_SUBMIT_EVENT'); return; } if ($this->getLayout() == 'selectvenue') { $this->_displayselectvenue($tpl); return; } else { if ($this->getLayout() == 'eventdate') { $this->_displayEventdate($tpl); return; } } $useracl =& UserAcl::getInstance(); if (!$useracl->canAddEvent()) { echo JText::_('COM_REDEVENT_EDIT_EVENT_NOT_ALLOWED'); return; } // Initialize variables $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $elsettings =& redEVENTHelper::config(); $params =& $mainframe->getParams(); //Get Data from the model $row =& $this->get('Event'); $customs =& $this->get('Customfields'); $xcustoms =& $this->get('XrefCustomfields'); $roles =& $this->get('SessionRoles'); $prices =& $this->get('SessionPrices'); //Get requests $id = JRequest::getInt('id'); //Clean output JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'datdescription'); JHTML::_('behavior.formvalidation'); JHTML::_('behavior.tooltip'); JHTML::_('behavior.modal', 'a.vmodal'); //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/editevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); $document->addScript('components/com_redevent/assets/js/attachments.js'); $document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";'); $document->addScript('components/com_redevent/assets/js/xref_roles.js'); $document->addScriptDeclaration('var txt_remove = "' . JText::_('COM_REDEVENT_REMOVE') . '";'); $document->addScript('components/com_redevent/assets/js/xref_prices.js'); //Set page title $id ? $title = $row->title . ' - ' . JText::_('COM_REDEVENT_EDIT_EVENT') : ($title = JText::_('COM_REDEVENT_ADD_EVENT')); $document->setTitle($title); // Get the menu object of the active menu item $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $mainframe->getParams('com_redevent'); //pathway $pathway =& $mainframe->getPathWay(); $pathway->addItem($title, ''); //Has the user access to the editor and the add venue screen $editoruser = $params->get('edit_description_allow_editor', 0) || ELUser::editoruser(); $canpublish = $useracl->canPublishEvent($id); //transform <br /> and <br> back to \r\n for non editorusers if (!$editoruser) { $row->datdescription = redEVENTHelper::br2break($row->datdescription); } //Get image information $dimage = redEVENTImage::flyercreator($row->datimage); //Set the info image $infoimage = JHTML::_('image', 'components/com_redevent/assets/images/icon-16-hint.png', JText::_('COM_REDEVENT_NOTES')); //Create the stuff required for the venueselect functionality $url = JURI::root(); $js = "\n\t\tfunction reSelectVenue(id, venue) {\n\t\t\tdocument.getElementById('a_id').value = id;\n\t\t\tdocument.getElementById('a_name').value = venue;\n\t\t\tSqueezeBox.close();\n\t\t}"; $document->addScriptDeclaration($js); // categories selector $selected = array(); foreach ((array) $row->categories as $cat) { $selected[] = $cat->id; } $catoptions = $this->get('CategoryOptions'); if (!$catoptions) { echo JText::_('COM_REDEVENT_EDITEVENT_FORBIDDEN_NO_CATEGORY_AVAILABLE'); return; } $lists['categories'] = JHTML::_('select.genericlist', $catoptions, 'categories[]', 'class="inputbox required validate-categories" multiple="multiple" size="10"', 'value', 'text', $selected); if ($params->get('edit_recurrence', 0)) { $document->addScript('components/com_redevent/assets/js/xref_recurrence.js'); // Recurrence selector $recur_type = array(JHTML::_('select.option', 'NONE', JText::_('COM_REDEVENT_NO_REPEAT')), JHTML::_('select.option', 'DAILY', JText::_('COM_REDEVENT_DAILY')), JHTML::_('select.option', 'WEEKLY', JText::_('COM_REDEVENT_WEEKLY')), JHTML::_('select.option', 'MONTHLY', JText::_('COM_REDEVENT_MONTHLY')), JHTML::_('select.option', 'YEARLY', JText::_('COM_REDEVENT_YEARLY'))); $lists['recurrence_type'] = JHTML::_('select.radiolist', $recur_type, 'recurrence_type', '', 'value', 'text', $row->rrules->type ? $row->rrules->type : 'NONE'); } // published state selector $published = array(JHTML::_('select.option', '1', JText::_('COM_REDEVENT_PUBLISHED')), JHTML::_('select.option', '0', JText::_('COM_REDEVENT_UNPUBLISHED'))); $lists['published'] = JHTML::_('select.radiolist', $published, 'published', '', 'value', 'text', $row->published); $rolesoptions = array(JHTML::_('select.option', 0, JText::_('COM_REDEVENT_Select_role'))); $rolesoptions = array_merge($rolesoptions, $this->get('RolesOptions')); $pricegroupsoptions = array(JHTML::_('select.option', 0, JText::_('COM_REDEVENT_PRICEGROUPS_SELECT_PRICEGROUP'))); $pricegroupsoptions = array_merge($pricegroupsoptions, $this->get('PricegroupsOptions')); $this->assignRef('row', $row); $this->assignRef('customs', $customs); $this->assignRef('xcustoms', $xcustoms); $this->assignRef('categories', $categories); $this->assignRef('editor', $editor); $this->assignRef('dimage', $dimage); $this->assignRef('infoimage', $infoimage); $this->assignRef('editoruser', $editoruser); $this->assignRef('elsettings', $elsettings); $this->assignRef('item', $item); $this->assignRef('params', $params); $this->assignRef('lists', $lists); $this->assignRef('canpublish', $canpublish); $this->assignRef('referer', JRequest::getWord('referer')); $this->assign('title', $title); $this->assignRef('access', redEVENTHelper::getAccesslevelOptions()); $this->assignRef('roles', $roles); $this->assignRef('rolesoptions', $rolesoptions); $this->assignRef('prices', $prices); $this->assignRef('pricegroupsoptions', $pricegroupsoptions); parent::display($tpl); }