/** * redFORM view display method * @return void **/ function display($tpl = null) { /* Get the pagination */ $pagination = $this->get('Pagination'); /* Get the values list */ $values = $this->get('Values'); /* Check if there are any forms */ $fields = $this->get('TotalFields'); /* Get the forms */ $forms = (array) $this->get('FormsOptions'); array_unshift($forms, JHTML::_('select.option', 0, JText::_('COM_REDFORM_All'))); /* Create the dropdown list */ $lists['form_id'] = JHTML::_('select.genericlist', $forms, 'form_id', '', 'value', 'text', JRequest::getVar('form_id', 0)); /* Set variabels */ $this->assignRef('pagination', $pagination); $this->assignRef('values', $values); $this->assignRef('fields', $fields); $this->assignRef('lists', $lists); // set the menu RedformHelper::setMenu(); /* Get the toolbar */ JToolBarHelper::title(JText::_('COM_REDFORM_Values'), 'redform_values'); if ($fields > 0) { JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::spacer(); JToolBarHelper::deleteList(); JToolBarHelper::editListX(); JToolBarHelper::addNew(); } /* Display the page */ parent::display($tpl); }
function display($tpl = null) { $mainframe = JFactory::getApplication(); $option = JRequest::getVar('option'); $user =& JFactory::getUser(); $document =& JFactory::getDocument(); $params = JComponentHelper::getParams('com_redform'); $rows = $this->get('Data'); $pagination = $this->get('Pagination'); $lists = array(); /* Set variabels */ $this->assignRef('rows', $rows); $this->assignRef('pagination', $pagination); $this->assignRef('lists', $lists); $this->assignRef('params', $params); $this->assignRef('key', JRequest::getVar('submit_key')); JToolBarHelper::title(JText::_('COM_REDFORM_PAYMENTS_HISTORY'), 'redform_submitters'); JToolBarHelper::addNew(); JToolBarHelper::editListX(); JToolBarHelper::deleteListX(); JToolBarHelper::custom('back', 'back', 'back', 'back', false); // set the menu RedformHelper::setMenu(); /* Display the page */ parent::display($tpl); }
/** * redFORM view display method * @return void **/ function display($tpl = null) { $option = JRequest::getVar('option'); $mainframe =& JFactory::getApplication(); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.values.filter_order_Dir', 'filter_order_Dir', '', 'word'); $filter_order = $mainframe->getUserStateFromRequest($option . '.values.filter_order', 'filter_order', 'ordering', 'cmd'); $form_id = $mainframe->getUserStateFromRequest($option . '.fields.form_id', 'form_id', 0, 'int'); /* Get the pagination */ $pagination = $this->get('Pagination'); /* Get the fields list */ $fields = $this->get('Fields'); /* Get the forms */ $forms = array(); $forms[] = JHTML::_('select.option', 0, JText::_('COM_REDFORM_All')); $forms = array_merge($forms, $this->get('FormsOptions')); /* Create the dropdown list */ $lists['form_id'] = JHTML::_('select.genericlist', $forms, 'form_id', 'onchange="this.form.submit();"', 'value', 'text', $form_id); // again for batch $lists['batch_form_options'] = JHTML::_('select.options', $this->get('FormsOptions')); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; /* Check if there are any forms */ $countforms = count($forms) > 1; /* Set variabels */ $this->assignRef('pagination', $pagination); $this->assignRef('fields', $fields); $this->assignRef('lists', $lists); $this->assignRef('countforms', $countforms); // set menu RedformHelper::setMenu(); /* Get the toolbar */ JToolBarHelper::title(JText::_('COM_REDFORM_Fields'), 'redform_fields'); /* Only show add if there are forms */ if ($countforms) { JToolBarHelper::custom('sanitize', 'redform_details', 'redform_details', JText::_('COM_REDFORM_SANITIZE'), false); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::spacer(); JToolBarHelper::deleteList(JText::_('COM_REDFORM_COM_REDEVENT_FIELDS_DELETE_WARNING')); JToolBarHelper::editListX(); JToolBarHelper::addNew(); JToolBarHelper::divider(); if (JFactory::getUser()->authorise('core.admin', 'com_redform')) { JToolBarHelper::preferences('com_redform'); } } /* Display the page */ parent::display($tpl); }
function display($tpl = null) { //initialise variables $document =& JFactory::getDocument(); $user =& JFactory::getUser(); //build toolbar JToolBarHelper::title(JText::_('COM_REDFORM_LOG'), 'home'); JToolBarHelper::custom('clearlog', 'delete', 'delete', 'Clear Log', false); //create the toolbar // Get data from the model $log =& $this->get('Data'); // set menu RedformHelper::setMenu(); //assign vars to the template $this->assignRef('log', $log); parent::display($tpl); }
/** * redFORM view display method * @return void **/ function display($tpl = null) { // set the menu RedformHelper::setMenu(); /* Get the competitions list */ $forms = $this->get('Forms'); /* Get the pagination */ $pagination =& $this->get('Pagination'); /* Get the number of contestantst */ $submitters = $this->get('CountSubmitters'); /* Set variabels */ $this->assignRef('pagination', $pagination); $this->assignRef('forms', $forms); $this->assignRef('submitters', $submitters); /* Get the toolbar */ $this->toolbar(); /* Display the page */ parent::display($tpl); }
function display($tpl = null) { $params = JComponentHelper::getParams('com_redform'); /* Get the forms */ $forms = $this->get('FormsOptions'); // set the menu RedformHelper::setMenu(); if (empty($forms)) { echo '<p>' . JText::_('COM_REDFORM_SUBMITTERS_NO_FORM') . '</p>'; return; } // we need to chose a form by default, for the database queries (form table names...) $id = JRequest::getVar('form_id', false); if (!$id && isset($forms[0])) { JRequest::setVar('form_id', $forms[0]->value); } /* Create the dropdown list */ $lists['form_id'] = JHTML::_('select.genericlist', $forms, 'form_id', '', 'value', 'text', JRequest::getVar('form_id')); /* Get the form name, if one is selected */ $form = $this->get('Form'); $this->assignRef('form', $form); /* Get the pagination */ $pagination = $this->get('Pagination'); /* Get the submitters list */ $submitters = $this->get('Submitters'); /* Get the fields list */ $fields = $this->get('Fields'); /* Get the event details if there is an xref value */ if (JRequest::getInt('xref', false)) { // check integration too ! $course = $this->get('Course'); $coursetitle = $course->course_title; } else { $course = null; $coursetitle = null; } /* Set variabels */ $this->assignRef('pagination', $pagination); $this->assignRef('submitters', $submitters); $this->assignRef('lists', $lists); $this->assignRef('fields', $fields); $this->assignRef('coursetitle', $coursetitle); $this->assignRef('course', $course); $this->assignRef('xref', JRequest::getInt('xref', 0)); $this->assignRef('integration', JRequest::getVar('integration', '')); $this->assignRef('params', $params); JToolBarHelper::title(JText::_('COM_REDFORM_Submitters'), 'redform_submitters'); if (JRequest::getVar('xref', false)) { JToolBarHelper::back(); } JToolBarHelper::deleteList(JText::_('COM_REDFORM_SUBMITTERS_DELETE_WARNING')); if ($this->params->get('showintegration', false)) { JToolBarHelper::custom('forcedelete', 'delete', 'delete', JText::_('COM_REDFORM_Force_delete'), true); } //TODO: fix the add/modify submitters from backend JToolBarHelper::editListX(); if (JRequest::getVar('xref', false)) { JToolBarHelper::addNewX(); } JToolBarHelper::divider(); if (JFactory::getUser()->authorise('core.admin', 'com_redform')) { JToolBarHelper::preferences('com_redform'); } /* Display the page */ parent::display($tpl); }