function _displayModal($tpl) { JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PERSON_ASSIGN_DESCR')); // Do not allow cache JResponse::allowCache(false); $document = JFactory::getDocument(); $prjid = array(); $prjid = JRequest::getVar('prjid', array(0), 'post', 'array'); $proj_id = (int) $prjid[0]; //build the html select list for projects $projects[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PROJECT'), 'id', 'name'); if ($res = JoomleagueHelper::getProjects()) { $projects = array_merge($projects, $res); } $lists['projects'] = JHtmlSelect::genericlist($projects, 'prjid[]', 'class="inputbox" onChange="this.form.submit();" style="width:170px"', 'id', 'name', $proj_id); unset($projects); $projectteams[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'), 'value', 'text'); // if a project is active we show the teams select list if ($proj_id > 0) { if ($res = JoomleagueHelper::getProjectteams($proj_id)) { $projectteams = array_merge($projectteams, $res); } $lists['projectteams'] = JHtmlSelect::genericlist($projectteams, 'xtid[]', 'class="inputbox" style="width:170px"', 'value', 'text'); unset($projectteams); } $this->lists = $lists; $this->project_id = $proj_id; parent::display($tpl); }
/** * * Enter description here ... * @param unknown_type $tpl */ function _displayCopy($tpl) { $document = JFactory::getDocument(); $option = JRequest::getCmd('option'); $mainframe = JFactory::getApplication(); $project_id = $mainframe->getUserState($option . 'project'); $uri = JFactory::getURI(); $ptids = JRequest::getVar('cid', array(), 'post', 'array'); $model = $this->getModel(); $lists = array(); //build the html select list for all teams $options = JoomleagueHelper::getProjects(); $lists['projects'] = JHTML::_('select.genericlist', $options, 'dest', '', 'id', 'name'); JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PROJECTTEAMS_COPY_DEST'), 'Teams'); JLToolBarHelper::apply('projectteam.copy'); JToolBarHelper::back(); $this->assignRef('ptids', $ptids); $this->assignRef('lists', $lists); $this->assignRef('request_url', $uri->toString()); parent::display($tpl); }
/** * * Enter description here ... * @param unknown_type $tpl */ function _displayCopy($tpl) { $document = JFactory::getDocument(); $app = JFactory::getApplication(); $jinput = $app->input; $option = $jinput->getCmd('option'); $project_id = $app->getUserState($option . 'project'); $uri = JFactory::getURI(); $ptids = JRequest::getVar('cid', array(), 'post', 'array'); $model = $this->getModel(); $lists = array(); // build the html select list for all Projects $ignoreId = $project_id; $options = JoomleagueHelper::getProjects($ignoreId); $lists['projects'] = JHtml::_('select.genericlist', $options, 'dest', '', 'id', 'name'); JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PROJECTTEAMS_COPY_DEST'), 'Teams'); JLToolBarHelper::apply('projectteam.copy'); JToolBarHelper::back(); $this->ptids = $ptids; $this->lists = $lists; $this->request_url = $uri->toString(); parent::display($tpl); }