protected function getInput() { // Base name of the HTML control. $ctrl = $this->name; $value = $this->value; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if (isset($this->element['size'])) { $attribs .= 'size="' . (int) $this->element['size'] . '"'; } if (isset($this->element['class'])) { $attribs .= 'class="' . (string) $this->element['class'] . '"'; } else { $attribs .= 'class="inputbox"'; } if (isset($this->element['multiple'])) { $attribs .= ' '; } $novalue = new stdClass(); $novalue->value = '0'; $novalue->text = JText::_('RST_DEPARTMENTS_NO_VALUE'); $novalue->disabled = ''; $options = RSTicketsProHelper::getDepartments(); array_unshift($options, $novalue); // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $this->name); }
function fetchElement($name, $value, &$node, $control_name) { // Base name of the HTML control. $ctrl = $control_name . '[' . $name . ']'; // Construct an array of the HTML OPTION statements. $options = array(); // Construct the various argument calls that are supported. $attribs = ' '; if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= ''; $ctrl .= ''; } $novalue = new stdClass(); $novalue->value = '0'; $novalue->text = JText::_('RST_DEPARTMENTS_NO_VALUE'); $novalue->disabled = ''; $options = RSTicketsProHelper::getDepartments(); array_unshift($options, $novalue); // Render the HTML SELECT list. return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $control_name . $name); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if (!$mainframe->isAdmin()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $data = $this->get('data'); $this->assignRef('data', $data); $this->assignRef('custom_fields', $this->get('customfields')); $user = JFactory::getUser(); $this->assign('is_logged', !$user->get('guest')); $this->assign('is_staff', RSTicketsProHelper::isStaff()); $this->assign('permissions', RSTicketsProHelper::getCurrentPermissions()); $this->assignRef('user', $user); $this->assign('use_editor', RSTicketsProHelper::getConfig('allow_rich_editor')); $this->assignRef('editor', JFactory::getEditor()); $show_please_select = true; $lists['priorities'] = JHTML::_('select.genericlist', RSTicketsProHelper::getPriorities($show_please_select), 'priority_id', '', 'value', 'text', @$data['priority_id'], 'submit_priority'); $lists['departments'] = JHTML::_('select.genericlist', RSTicketsProHelper::getDepartments($show_please_select), 'department_id', 'onchange="rst_show_custom_fields(this.value); rst_show_priority(this.value); rst_show_upload(this.value); rst_show_subject(this.value);"', 'value', 'text', @$data['department_id']); $lists['subject'] = JHTML::_('select.genericlist', RSTicketsProHelper::getSubjects(@$data['department_id'], $show_please_select), 'subject', '', 'value', 'text', @$data['subject'], 'submit_subject'); $this->assignRef('lists', $lists); $this->assignRef('departments', $this->get('departments')); $this->assign('can_upload', $this->get('canupload')); $this->assign('use_captcha', $this->get('usecaptcha')); $this->assign('use_builtin', $this->get('usebuiltin')); $this->assign('use_recaptcha', $this->get('userecaptcha')); if ($this->get('userecaptcha') && $mainframe->isSite()) { $this->assign('show_recaptcha', JReCAPTCHA::getHTML($this->get('recaptchaerror'))); } $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); $this->assign('use_predefined_subjects', RSTicketsProHelper::getConfig('allow_predefined_subjects')); if ($mainframe->isAdmin()) { $this->assign('checked_create_new_user', JRequest::getVar('submit_type', 1) == 1); $this->assign('checked_existing_user', JRequest::getVar('submit_type', 1) == 2); } 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(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $departments = RSTicketsProHelper::getDepartments(); $lists['departments'] = JHTML::_('select.genericlist', $departments, 'department_id[]', 'size="5" multiple="multiple"', 'value', 'text', $departments); $lists['statuses'] = JHTML::_('select.genericlist', RSTicketsProHelper::getStatuses(), 'status_id[]', 'size="5" multiple="multiple"', 'value', 'text', RSTicketsProHelper::getStatuses()); $lists['priorities'] = JHTML::_('select.genericlist', RSTicketsProHelper::getPriorities(), 'priority_id[]', 'size="5" multiple="multiple"', 'value', 'text', RSTicketsProHelper::getPriorities()); $ordering = array(); $ordering[] = JHTML::_('select.option', 'date', JText::_('Default')); $ordering[] = JHTML::_('select.option', 'last_reply', JText::_('RST_TICKET_LAST_REPLY')); $ordering[] = JHTML::_('select.option', 'subject', JText::_('RST_TICKET_SUBJECT')); $ordering[] = JHTML::_('select.option', 'status', JText::_('RST_TICKET_STATUS')); $ordering[] = JHTML::_('select.option', 'priority', JText::_('RST_TICKET_PRIORITY')); $ordering[] = JHTML::_('select.option', 'replies', JText::_('RST_TICKET_REPLIES')); $lists['ordering'] = JHTML::_('select.genericlist', $ordering, 'filter_order', '', 'value', 'text'); $ordering_dir = array(); $ordering_dir[] = JHTML::_('select.option', 'DESC', JText::_('DESC')); $ordering_dir[] = JHTML::_('select.option', 'ASC', JText::_('ASC')); $lists['ordering_dir'] = JHTML::_('select.genericlist', $ordering_dir, 'filter_order_Dir', '', 'value', 'text'); $this->assign('is_staff', RSTicketsProHelper::isStaff()); $this->assign('permissions', RSTicketsProHelper::getCurrentPermissions()); $this->assign('is_advanced', JRequest::getVar('advanced', false)); $this->assignRef('lists', $lists); $this->assign('itemid', $this->get('itemid')); $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(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $row = $this->get('ticket'); $this->assignRef('row', $row); $this->assign('date_format', RSTicketsProHelper::getConfig('date_format')); $this->assign('show_ticket_info', RSTicketsProHelper::getConfig('show_ticket_info')); $this->assign('show_ticket_voting', RSTicketsProHelper::getConfig('show_ticket_voting')); $this->assign('what', RSTicketsProHelper::getConfig('show_user_info')); $this->assign('avatar', RSTicketsProHelper::getConfig('avatars')); $this->assign('show_email_link', RSTicketsProHelper::getConfig('show_email_link')); $this->assign('show_signature', RSTicketsProHelper::getConfig('show_signature')); $this->assign('show_kb_search', RSTicketsProHelper::getConfig('show_kb_search')); $this->assign('show_time_spent', RSTicketsProHelper::getConfig('enable_time_spent')); $this->assign('time_spent_unit', JText::_('RST_TIME_UNIT_' . strtoupper(RSTicketsProHelper::getConfig('time_spent_unit')))); $this->assign('permissions', $this->get('permissions')); $is_staff = RSTicketsProHelper::isStaff(); $this->assign('is_staff', $is_staff); $this->assign('can_upload', $this->get('canupload')); $this->assign('can_update', $this->get('canupdate')); $this->assign('can_update_custom_fields', $this->get('canupdatecustomfields')); $this->assign('data', $this->get('data')); $this->assign('use_editor', RSTicketsProHelper::getConfig('allow_rich_editor')); $this->assignRef('editor', JFactory::getEditor()); $editor_javascript = "document.getElementById('message').innerHTML = content.replace(/<(.*?)>/g, '');"; if ($this->use_editor) { // fix for JCE if ($this->editor->get('_name') == 'jce') { $editor_javascript = str_replace("'content'", 'content', $this->editor->setContent('message', 'content')); } elseif ($this->editor->get('_name') == 'jckeditor') { $editor_javascript = str_replace(array('(!oEditor) ', "'content'"), array('(!oEditor) ? ', 'content'), $this->editor->setContent('message', 'content')) . "\n"; } else { $editor_javascript = $this->editor->setContent('message', 'content'); } } else { $editor_javascript = str_replace('innerHTML', 'value', $editor_javascript); } $this->assign('editor_javascript', $editor_javascript); $this->assign('show_footer', $this->get('showfooter')); $this->assign('footer', $this->get('footer')); $this->assign('do_print', JRequest::getInt('print', 0)); $this->assignRef('department', $this->get('department')); if ($is_staff) { $status = RSTicketsProHelper::getStatuses(); $lists['status'] = JHTML::_('select.genericlist', $status, 'status_id', '', 'value', 'text', $row->status_id); $priority = RSTicketsProHelper::getPriorities(); $lists['priority'] = JHTML::_('select.genericlist', $priority, 'priority_id', '', 'value', 'text', $row->priority_id); $department = RSTicketsProHelper::getDepartments(); $lists['department'] = JHTML::_('select.genericlist', $department, 'department_id', '', 'value', 'text', $row->department_id); $staff = RSTicketsProHelper::getStaff(); $unassigned[] = JHTML::_('select.option', 0, JText::_('RST_UNASSIGNED')); $staff = array_merge($unassigned, $staff); $lists['staff'] = JHTML::_('select.genericlist', $staff, 'staff_id', '', 'value', 'text', $row->staff_id); $this->assignRef('lists', $lists); $this->assign('history_tickets', $this->get('HistoryTickets')); } $ticket_view = RSTicketsProHelper::getConfig('ticket_view'); $this->assign('ticket_view', $ticket_view); if ($ticket_view == 'tabbed') { jimport('joomla.html.pane'); $tabparams = array(); $tabparams['startOffset'] = JRequest::getInt('tabposition', 0); $tabs =& JPane::getInstance('Tabs', $tabparams, true); $this->assignRef('tabs', $tabs); } $model = $this->getModel(); $model->addViewingHistory(); parent::display(); }