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 .= ' multiple="multiple"'; } $options = RSTicketsProHelper::getPriorities(); if (empty($value)) { $value = $options; } // 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('size')) { $attribs .= 'size="' . $v . '"'; } if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= ' multiple="multiple"'; $ctrl .= '[]'; } $options = RSTicketsProHelper::getPriorities(); if (empty($value)) { $value = $options; } // 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(); JToolBarHelper::title('RSTickets! Pro', 'rsticketspro'); JSubMenuHelper::addEntry(JText::_('RST_MANAGE_TICKETS'), 'index.php?option=com_rsticketspro&view=tickets'); JSubMenuHelper::addEntry(JText::_('RST_DEPARTMENTS'), 'index.php?option=com_rsticketspro&view=departments', true); JSubMenuHelper::addEntry(JText::_('RST_GROUPS'), 'index.php?option=com_rsticketspro&view=groups'); JSubMenuHelper::addEntry(JText::_('RST_STAFF_MEMBERS'), 'index.php?option=com_rsticketspro&view=staff'); JSubMenuHelper::addEntry(JText::_('RST_PRIORITIES'), 'index.php?option=com_rsticketspro&view=priorities'); JSubMenuHelper::addEntry(JText::_('RST_STATUSES'), 'index.php?option=com_rsticketspro&view=statuses'); JSubMenuHelper::addEntry(JText::_('RST_KNOWLEDGEBASE'), 'index.php?option=com_rsticketspro&view=knowledgebase'); JSubMenuHelper::addEntry(JText::_('RST_EMAIL_MESSAGES'), 'index.php?option=com_rsticketspro&view=emails'); JSubMenuHelper::addEntry(JText::_('RST_CONFIGURATION'), 'index.php?option=com_rsticketspro&view=configuration'); $mainframe->triggerEvent('onAfterTicketsMenu'); JSubMenuHelper::addEntry(JText::_('RST_UPDATES'), 'index.php?option=com_rsticketspro&view=updates'); $task = JRequest::getVar('task', ''); if ($task == 'edit') { JToolBarHelper::title('RSTickets! Pro <small>[' . JText::_('RST_EDIT_DEPARTMENT') . ']</small>', 'rsticketspro'); JToolBarHelper::apply(); JToolBarHelper::save(); JToolBarHelper::cancel(); $row = $this->get('department'); $this->assignRef('row', $row); $assignment_type = array(JHTML::_('select.option', '0', JText::_('RST_STATIC')), JHTML::_('select.option', '1', JText::_('RST_AUTOMATIC'))); $lists['assignment_type'] = JHTML::_('select.genericlist', $assignment_type, 'assignment_type', '', 'value', 'text', $row->assignment_type); $generation_rule = array(JHTML::_('select.option', '0', JText::_('RST_SEQUENTIAL')), JHTML::_('select.option', '1', JText::_('RST_RANDOM'))); $lists['generation_rule'] = JHTML::_('select.genericlist', $generation_rule, 'generation_rule', '', 'value', 'text', $row->generation_rule); $priority = RSTicketsProHelper::getPriorities(); $lists['priority'] = JHTML::_('select.genericlist', $priority, 'priority_id', '', 'value', 'text', $row->priority_id); $lists['email_use_global'] = JHTML::_('select.booleanlist', 'email_use_global', 'class="inputbox" onclick="rst_email_enable(this.value)"', $row->email_use_global); $lists['customer_send_email'] = JHTML::_('select.booleanlist', 'customer_send_email', '', $row->customer_send_email); $lists['customer_send_copy_email'] = JHTML::_('select.booleanlist', 'customer_send_copy_email', '', $row->customer_send_copy_email); $lists['customer_attach_email'] = JHTML::_('select.booleanlist', 'customer_attach_email', '', $row->customer_attach_email); $lists['staff_send_email'] = JHTML::_('select.booleanlist', 'staff_send_email', '', $row->staff_send_email); $lists['staff_attach_email'] = JHTML::_('select.booleanlist', 'staff_attach_email', '', $row->staff_attach_email); $disable_uploads = false; $upload_max_filesize = false; $max_file_uploads = false; if (function_exists('ini_get') && is_callable('ini_get')) { if (!ini_get('file_uploads')) { $disable_uploads = true; } $upload_max_filesize = ini_get('upload_max_filesize'); $max_file_uploads = ini_get('max_file_uploads'); } $upload = array(JHTML::_('select.option', '1', JText::_('RST_EVERYONE'), 'value', 'text', $disable_uploads), JHTML::_('select.option', '2', JText::_('RST_REGISTERED'), 'value', 'text', $disable_uploads), JHTML::_('select.option', '0', JText::_('RST_NOBODY'))); $lists['upload'] = JHTML::_('select.genericlist', $upload, 'upload', '', 'value', 'text', $row->upload); $lists['notify_assign'] = JHTML::_('select.booleanlist', 'notify_assign', '', $row->notify_assign); $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published); $this->assignRef('lists', $lists); $params = array(); $params['startOffset'] = JRequest::getInt('tabposition', 0); $tabs =& JPane::getInstance('Tabs', $params, true); $this->assignRef('tabs', $tabs); $this->assignRef('uploads_disabled', $disable_uploads); $this->assignRef('upload_max_filesize', $upload_max_filesize); $this->assignRef('max_file_uploads', $max_file_uploads); } else { JToolBarHelper::addNewX('edit'); JToolBarHelper::editListX('edit'); JToolBarHelper::spacer(); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::spacer(); JToolBarHelper::deleteList('RST_CONFIRM_DELETE_DEPARTMENT'); $filter_state = $mainframe->getUserStateFromRequest('rsticketspro.filter_state', 'filter_state'); $mainframe->setUserState('rsticketspro.filter_state', $filter_state); $lists['state'] = JHTML::_('grid.state', $filter_state); $this->assignRef('lists', $lists); $this->assignRef('sortColumn', JRequest::getVar('filter_order', 'ordering')); $this->assignRef('sortOrder', JRequest::getVar('filter_order_Dir', 'ASC')); $this->assignRef('departments', $this->get('departments')); $this->assignRef('pagination', $this->get('pagination')); $filter_word = JRequest::getCmd('search', ''); $this->assignRef('filter_word', $filter_word); } parent::display($tpl); }
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(); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); if ($mainframe->isSite()) { $params = $mainframe->getParams('com_rsticketspro'); $this->assignRef('params', $params); } $this->assign('date_format', RSTicketsProHelper::getConfig('date_format')); $this->assign('permissions', $this->get('permissions')); $this->assign('is_staff', RSTicketsProHelper::isStaff()); $this->assignRef('tickets', $this->get('tickets')); $this->assignRef('pagination', $this->get('pagination')); $staff = RSTicketsProHelper::getStaff(); $unassigned = array(); $unassigned[] = JHTML::_('select.option', -1, JText::_('RST_UNCHANGED')); $unassigned[] = JHTML::_('select.option', 0, JText::_('RST_UNASSIGNED')); $staff = array_merge($unassigned, $staff); $lists['staff'] = JHTML::_('select.genericlist', $staff, 'bulk_staff_id', '', 'value', 'text'); $priority = RSTicketsProHelper::getPriorities(); $unchanged = array(); $unchanged[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $priority = array_merge($unchanged, $priority); $lists['priority'] = JHTML::_('select.genericlist', $priority, 'bulk_priority_id', '', 'value', 'text'); $status = RSTicketsProHelper::getStatuses(); $unchanged = array(); $unchanged[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $status = array_merge($unchanged, $status); $lists['status'] = JHTML::_('select.genericlist', $status, 'bulk_status_id', '', 'value', 'text'); $delete = array(); $delete[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $delete[] = JHTML::_('select.option', 1, JText::_('RST_DELETE_SELECTED')); $lists['delete'] = JHTML::_('select.genericlist', $delete, 'bulk_delete', 'onchange="rst_disable_bulk(this.value);" onclick="rst_disable_bulk(this.value);"', 'value', 'text', ''); $notify = array(); $notify[] = JHTML::_('select.option', 0, JText::_('RST_UNCHANGED')); $notify[] = JHTML::_('select.option', 1, JText::_('RST_NOTIFY_SELECTED')); $lists['notify'] = JHTML::_('select.genericlist', $notify, 'bulk_notify', '', 'value', 'text', ''); $this->assignRef('lists', $lists); $this->assignRef('sortColumn', $this->get('sortColumn')); $this->assignRef('sortOrder', $this->get('sortOrder')); $this->assignRef('limitstart', JRequest::getInt('limitstart', 0)); $this->assign('is_searching', $this->get('searching')); $searches = $this->get('searches'); $this->assign('searches', $searches); $this->assign('has_searches', !empty($searches)); $this->assign('predefined_search', $this->get('predefinedsearch')); $this->assign('show_footer', RSTicketsProHelper::getConfig('rsticketspro_link')); $this->assign('footer', RSTicketsProHelper::getFooter()); $this->assignRef('priorityColors', $this->get('prioritycolors')); $this->assign('colorWholeTicket', RSTicketsProHelper::getConfig('color_whole_ticket')); 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(); }