/** * Method to get the field input markup * * @return string * * @throws Exception */ protected function getInput() { // Setup variables for display if ($this->value) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('r.name')->from('#__tracks_projects_rounds AS pr')->join('INNER', '#__tracks_rounds AS r ON r.id = pr.round_id')->where('pr.id = ' . (int) $this->value); $db->setQuery($query); $title = $db->loadResult(); if (!($title = $db->loadResult())) { throw new Exception($db->getErrorMsg(), 500); } } if (empty($title)) { $title = JText::_('COM_TRACKS_Select_a_project_round'); } $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The active id field if (0 == (int) $this->value) { $value = ''; } else { $value = (int) $this->value; } $class = ''; if ($this->required) { $class = ' class="required modal-value"'; } return RLayoutHelper::render('form.field.projectround', array('id' => $this->id, 'name' => $this->name, 'title' => $title, 'value' => $this->value, 'required' => $this->required), '', array('component' => 'com_tracks')); }
/** * Method to get the user field input markup. * * @return string The field input markup. * * @since 1.0 */ protected function getInput() { $html = array(); $groups = $this->getGroups(); $excluded = $this->getExcluded(); $link = 'index.php?option=com_users&view=users&layout=modal&tmpl=component&field=' . $this->id . (isset($groups) ? '&groups=' . base64_encode(json_encode($groups)) : '') . (isset($excluded) ? '&excluded=' . base64_encode(json_encode($excluded)) : '') . '&redcore=true'; // Initialize some field attributes. if (isset($this->element['required']) && $this->element['required'] == 'true') { $this->addAttribute('required', 'required'); } // Automatically insert any other attribute inserted if ($elementAttribs = $this->element->attributes()) { foreach ($elementAttribs as $name => $value) { if (!in_array($name, $this->forbiddenAttributes)) { $this->addAttribute($name, $value); } } } $modalTitle = isset($this->element['modal_title']) ? JText::_($this->element['modal_title']) : JText::_('JLIB_FORM_SELECT_USER'); $modalId = 'modal-' . $this->id; // Build the script. $script = array(); $script[] = ' function jSelectUser_' . $this->id . '(id, title) {'; $script[] = ' var old_id = document.getElementById("' . $this->id . '_id").value;'; $script[] = ' if (old_id != id) {'; $script[] = ' document.getElementById("' . $this->id . '_id").value = id;'; $script[] = ' document.getElementById("' . $this->id . '").value = title;'; $script[] = ' document.getElementById("' . $this->id . '").className = document.getElementById("' . $this->id . '").className.replace(" invalid" , "");'; $script[] = ' ' . (string) $this->element['onchange']; $script[] = ' }'; $script[] = ' jQuery("#' . $modalId . '").modal("hide")'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Create the modal object $modal = RModal::getInstance(array('attribs' => array('id' => $modalId, 'class' => 'modal hide', 'style' => 'width: 800px; height: 500px;'), 'params' => array('showHeader' => true, 'showFooter' => false, 'showHeaderClose' => true, 'title' => $modalTitle, 'link' => $link)), $modalId); $html[] = RLayoutHelper::render('modal', $modal); // Load the current username if available. $table = JTable::getInstance('user'); if ($this->value) { $table->load($this->value); } else { $table->username = JText::_('JLIB_FORM_SELECT_USER'); } $attr = $this->parseAttributes(); // Create a dummy text field with the user name. $html[] = '<div class="input-append">'; $html[] = ' <input type="text" id="' . $this->id . '" value="' . htmlspecialchars($table->name, ENT_COMPAT, 'UTF-8') . '"' . ' readonly="readonly"' . $attr . ' />'; // Create the user select button. if ($this->element['readonly'] != 'true') { $html[] = ' <a class="btn btn-primary modalAjax" data-toggle="modal" title="' . JText::_('JLIB_FORM_CHANGE_USER') . '" href="#' . $modalId . '"' . ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">'; $html[] = '<i class="icon-user"></i></a>'; } $html[] = '</div>'; // Create the real field, hidden, that stored the user id. $html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . (int) $this->value . '" />'; return implode("\n", $html); }
/** * Method to get the field input markup for OAuth2 Scope Lists. * * @return string The field input markup. */ protected function getInput() { // ShowCheckAll attribute process $showCheckAll = false; if ($this->getAttribute('showCheckAll', false) == true) { $showCheckAll = true; } return RLayoutHelper::render('webservice.scopes', array('view' => $this, 'options' => array('scopes' => $this->getOptions(), 'id' => $this->id, 'name' => $this->name, 'label' => $this->label, 'value' => $this->value, 'showCheckAll' => $showCheckAll))); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. */ public function display($tpl = null) { $render = RLayoutHelper::render($this->componentLayout, array('view' => $this, 'tpl' => $tpl, 'component_title' => $this->componentTitle)); if ($render instanceof Exception) { return $render; } echo $render; return true; }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. */ public function display($tpl = null) { $render = RLayoutHelper::render('component', array('view' => $this, 'tpl' => $tpl, 'component_title' => $this->componentTitle, 'sidebar_display' => $this->displaySidebar, 'sidebar_layout' => $this->sidebarLayout, 'sidebar_data' => $this->sidebarData, 'topbar_display' => $this->displayTopBar, 'topbar_layout' => $this->topBarLayout, 'topbar_inner_layout_display' => $this->displayTopBarInnerLayout, 'topbar_inner_layout' => $this->topBarInnerLayout, 'topbar_inner_layout_data' => $this->topBarInnerLayoutData, 'display_joomla_menu' => $this->displayJoomlaMenu)); if ($render instanceof Exception) { return $render; } echo $render; return true; }
/** * Method to get the field input markup for a generic list. * Use the multiple attribute to enable multiselect. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $app = JFactory::getApplication(); $listType = !empty($this->element['listType']) ? $this->element['listType'] : RBootstrap::getConfig('payment_list_payments_type', 'radio'); $extensionName = !empty($this->element['extensionName']) ? $this->element['extensionName'] : $app->input->get->getString('option', ''); $ownerName = !empty($this->element['ownerName']) ? $this->element['ownerName'] : ''; // Get the field options. $options = $this->getOptions(); return RLayoutHelper::render('redpayment.list.' . strtolower($listType), array('options' => array('payments' => $options, 'extensionName' => $extensionName, 'ownerName' => $ownerName, 'name' => $this->name, 'value' => $this->value, 'id' => $this->id, 'attributes' => $this->getAttributes()))); }
/** * Method to get the field input markup. * * @return string The field input markup. */ protected function getInput() { $id = isset($this->element['id']) ? $this->element['id'] : null; $this->cssId = '#' . $this->getId($id, $this->element['name']); if (isset($this->element['inline']) && $this->element['inline'] == 'true') { $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $this->fieldHtml = '<div id="' . $this->getId($id, $this->element['name']) . '" ' . $class . '></div>'; } else { $this->fieldHtml = parent::getInput(); } $this->datepickerOptions = $this->getDatepickerOptions(); return RLayoutHelper::render('fields.rdatepicker', $this); }
/** * Renders the error stack and returns the results as a string * * @param string $name Not used. * @param array $params Associative array of values * @param string $content Not used. * * @return string The output of the script * * @since 11.1 */ public function render($name, $params = array(), $content = null) { $msgList = $this->getData(); $displayData = array('msgList' => $msgList, 'name' => $name, 'params' => $params, 'content' => $content); $app = JFactory::getApplication(); $chromePath = JPATH_THEMES . '/' . $app->getTemplate() . '/html/message.php'; if (file_exists($chromePath)) { include_once $chromePath; } if (function_exists('renderMessage')) { JLog::add('renderMessage() is deprecated. Override system message rendering with layouts instead.', JLog::WARNING, 'deprecated'); return renderMessage($msgList); } return RLayoutHelper::render('joomla.system.message', $displayData); }
/** * Method to get the user field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { $html = array(); $groups = $this->getGroups(); $excluded = $this->getExcluded(); $link = 'index.php?option=com_users&view=users&layout=modal&tmpl=component&field=' . $this->id . (isset($groups) ? '&groups=' . base64_encode(json_encode($groups)) : '') . (isset($excluded) ? '&excluded=' . base64_encode(json_encode($excluded)) : ''); // Initialize some field attributes. $attr = !empty($this->class) ? ' class="' . $this->class . '"' : ''; $attr .= !empty($this->size) ? ' size="' . $this->size . '"' : ''; $attr .= $this->required ? ' required' : ''; // Build the script. $script = array(); $script[] = ' function jSelectUser_' . $this->id . '(id, title) {'; $script[] = ' var old_id = document.getElementById("' . $this->id . '_id").value;'; $script[] = ' if (old_id != id) {'; $script[] = ' document.getElementById("' . $this->id . '_id").value = id;'; $script[] = ' document.getElementById("' . $this->id . '").value = title;'; $script[] = ' document.getElementById("' . $this->id . '").className = document.getElementById("' . $this->id . '").className.replace(" invalid" , "");'; $script[] = ' ' . $this->onchange; $script[] = ' }'; $script[] = ' jQuery("#modalContainer_modalButton_' . $this->id . '").modal("hide");'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Load the current username if available. $table = JTable::getInstance('user'); if (is_numeric($this->value)) { $table->load($this->value); } elseif (strtoupper($this->value) == 'CURRENT') { // 'CURRENT' is not a reasonable value to be placed in the html $this->value = JFactory::getUser()->id; $table->load($this->value); } else { $table->name = JText::_('JLIB_FORM_SELECT_USER'); } // Create a dummy text field with the user name. $html[] = '<div class="input-append">'; $html[] = ' <input type="text" id="' . $this->id . '" value="' . htmlspecialchars($table->name, ENT_COMPAT, 'UTF-8') . '"' . ' readonly' . $attr . ' />'; // Create the user select button. if ($this->readonly === false) { $html[] = RLayoutHelper::render('modal.iframe', array('view' => $this, 'options' => array('id' => $this->id, 'header' => JText::_('JLIB_FORM_CHANGE_USER'), 'linkName' => '<i class="icon-user"></i>', 'link' => $link, 'linkClass' => 'btn btn-primary'))); } $html[] = '</div>'; // Create the real field, hidden, that stored the user id. $html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . $this->value . '" />'; return implode("\n", $html); }
/** * Ajax call to get logs tab content. * * @return void */ public function ajaxlogs() { $app = JFactory::getApplication(); $input = $app->input; $paymentId = $input->getInt('id'); if ($paymentId) { /** @var RedcoreModelPayment_Logs $logsModel */ $logsModel = RModelAdmin::getAdminInstance('Payment_Logs', array(), 'com_redcore'); $state = $logsModel->getState(); $logsModel->setState('filter.payment_id', $paymentId); $app->setUserState('log.payment_id', $paymentId); $formName = 'logsForm'; $pagination = $logsModel->getPagination(); $pagination->set('formName', $formName); echo RLayoutHelper::render('payment.logs', array('state' => $state, 'items' => $logsModel->getItems(), 'pagination' => $pagination, 'filterForm' => $logsModel->getForm(), 'activeFilters' => $logsModel->getActiveFilters(), 'formName' => $formName, 'showToolbar' => true, 'action' => RRoute::_('index.php?option=com_redcore&view=payment&model=payment_logs'), 'return' => base64_encode('index.php?option=com_redcore&view=payment&layout=edit&id=' . $paymentId . '&tab=logs&from_payment=1'))); } $app->close(); }
<?php /** * @package Redcore * @subpackage Layouts * * @copyright Copyright (C) 2008 - 2015 redCOMPONENT.com. All rights reserved. * @license GNU General Public License version 2 or later, see LICENSE. */ defined('JPATH_REDCORE') or die; $data = (object) $displayData; $options = !empty($data->field->ajaxchildOptions) ? $data->field->ajaxchildOptions : array(); // We won't load anything if it's not going to work if (!empty($options['ajaxUrl'])) { $options['childSelector'] = isset($options['childSelector']) ? $options['childSelector'] : '.js-childlist-child'; JHtml::_('rjquery.childlist', $options['childSelector'], $options); } // Render the standard select echo RLayoutHelper::render('redcore.field.list', $data);
foreach ($modules as $module) { ?> <?php echo JModuleHelper::renderModule($module, array('style' => 'standard')); ?> <?php } ?> <?php } ?> <?php if ($displayTopbarInnerLayout) { ?> <?php echo RLayoutHelper::render($topbarInnerLayout, $topbarInnerLayoutData); ?> <?php } ?> </div> <ul class="nav nav-user navbar-right"> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle"> <span class="icon-user"></span> <b class="caret"></b> </a> <ul class="dropdown-menu"> <li class=""> <a href="index.php?option=com_admin&task=profile.edit&id=<?php echo $userId;
/** * Render the toolbar. * * @return string The rendered toolbar. */ public function render() { return RLayoutHelper::render('toolbar.toolbar', array('toolbar' => $this)); }
/** * Execute the Api Documentation operation. * * @return mixed RApi object with information on success, boolean false on failure. * * @since 1.2 */ public function apiDocumentation() { $currentConfiguration = $this->configuration; $documentationNone = false; if ($this->operationConfiguration['source'] == 'url') { if (!empty($this->operationConfiguration['url'])) { JFactory::getApplication()->redirect($this->operationConfiguration['url']); JFactory::getApplication()->close(); } $documentationNone = true; } if ($this->operationConfiguration['source'] == 'none' || $documentationNone) { $currentConfiguration = null; } $dataGet = $this->options->get('dataGet', array()); $this->documentation = RLayoutHelper::render('webservice.documentation', array('view' => $this, 'options' => array('xml' => $currentConfiguration, 'soapEnabled' => RBootstrap::getConfig('enable_soap', 0), 'print' => isset($dataGet->print)))); return $this; }
<?php /** * @package Redcore.Admin * @subpackage Templates * * @copyright Copyright (C) 2008 - 2015 redCOMPONENT.com. All rights reserved. * @license GNU General Public License version 2 or later, see LICENSE. */ defined('_JEXEC') or die; echo RLayoutHelper::render('webservice.operation', array('view' => $this, 'options' => array('operation' => 'update', 'form' => $this->form, 'tabActive' => ' active in ', 'fieldList' => array('defaultValue', 'isRequiredField', 'isPrimaryField'))));
submitbutton(pressbutton); } submitbutton = function (pressbutton) { var form = document.adminForm; if (pressbutton) { form.task.value = pressbutton; } form.submit(); } </script> <form action="index.php?option=com_tracks&view=projectroundelement&tmpl=component" class="admin" id="adminForm" method="post" name="adminForm"> <?php echo RLayoutHelper::render('searchtools.default', array('view' => $this, 'options' => array('searchField' => 'search', 'searchFieldSelector' => '#filter_search', 'limitFieldSelector' => '#list_fields_limit', 'activeOrder' => $listOrder, 'activeDirection' => $listDirn))); ?> <hr /> <?php if (empty($this->items)) { ?> <div class="alert alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <div class="pagination-centered"> <h3><?php echo JText::_('COM_TRACKS_NOTHING_TO_DISPLAY'); ?> </h3> </div> </div> <?php
/** * Method to get the field input markup for a media selector. * Use attributes to identify specific created_by and asset_id fields * * @return string The field input markup. * * @todo Create a layout and put all the output HTML there! */ protected function getInput() { $assetField = $this->element['asset_field'] ? (string) $this->element['asset_field'] : 'asset_id'; $authorField = $this->element['created_by_field'] ? (string) $this->element['created_by_field'] : 'created_by'; $asset = $this->form->getValue($assetField) ? $this->form->getValue($assetField) : (string) $this->element['asset_id']; if ($asset == '') { $asset = JFactory::getApplication()->input->get('option'); } $link = (string) $this->element['link']; $modalTitle = isset($this->element['modal_title']) ? JText::_($this->element['modal_title']) : JText::_('LIB_REDCORE_MEDIA_MANAGER'); $modalId = 'modal-' . $this->id; if (!self::$initialised) { // Build the script. $script = array(); $script[] = ' function jInsertFieldValue(value, id) {'; $script[] = ' var old_value = document.id(id).value;'; $script[] = ' if (old_value != value) {'; $script[] = ' var elem = document.id(id);'; $script[] = ' elem.value = value;'; $script[] = ' elem.fireEvent("change");'; $script[] = ' if (typeof(elem.onchange) === "function") {'; $script[] = ' elem.onchange();'; $script[] = ' }'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' };'; $script[] = ' jQuery("#' . $modalId . '").modal("hide");'; $script[] = ' }'; $script[] = ' function jMediaRefreshPreview(id) {'; $script[] = ' var value = document.id(id).value;'; $script[] = ' var img = document.id(id + "_preview");'; $script[] = ' if (img) {'; $script[] = ' if (value) {'; $script[] = ' img.src = "' . JUri::root() . '" + value;'; $script[] = ' document.id(id + "_preview_empty").setStyle("display", "none");'; $script[] = ' document.id(id + "_preview_img").setStyle("display", "");'; $script[] = ' } else { '; $script[] = ' img.src = ""'; $script[] = ' document.id(id + "_preview_empty").setStyle("display", "");'; $script[] = ' document.id(id + "_preview_img").setStyle("display", "none");'; $script[] = ' } '; $script[] = ' } '; $script[] = ' }'; $script[] = ' function jMediaRefreshPreviewTip(tip)'; $script[] = ' {'; $script[] = ' var img = tip.getElement("img.media-preview");'; $script[] = ' tip.getElement("div.tip").setStyle("max-width", "none");'; $script[] = ' var id = img.getProperty("id");'; $script[] = ' id = id.substring(0, id.length - "_preview".length);'; $script[] = ' jMediaRefreshPreview(id);'; $script[] = ' tip.setStyle("display", "block");'; $script[] = ' }'; $script[] = ' function jSetIframeHeight(iframe)'; $script[] = ' {'; $script[] = ' var newheight;'; $script[] = ' if(iframe) {'; $script[] = ' newheight = iframe.contentWindow.document.body.scrollHeight;'; $script[] = ' iframe.height= (newheight) + "px";'; $script[] = ' iframe.setStyle("max-height", iframe.height);'; $script[] = ' }'; $script[] = ' }'; $script[] = "\n\t\t\t\tfunction closeModal(fieldId)\n\t\t\t\t{\n\t\t\t\t\tjQuery('#modal-' + fieldId).modal('hide');\n\t\t\t\t}\n\t\t\t"; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); self::$initialised = true; } $html = array(); $attr = ''; // Initialize some field attributes. $attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; // The text field. $html[] = '<div class="input-prepend input-append input-group">'; // The Preview. $preview = (string) $this->element['preview']; $showPreview = true; $showAsTooltip = false; switch ($preview) { case 'no': // Deprecated parameter value // Deprecated parameter value case 'false': case 'none': $showPreview = false; break; case 'yes': // Deprecated parameter value // Deprecated parameter value case 'true': case 'show': break; case 'tooltip': default: $showAsTooltip = true; $options = array('onShow' => 'jMediaRefreshPreviewTip'); JHtml::_('rbootstrap.tooltip', '.hasTipPreview', $options); break; } if ($showPreview) { if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $src = JUri::root() . $this->value; } else { $src = ''; } $width = isset($this->element['preview_width']) ? (int) $this->element['preview_width'] : 300; $height = isset($this->element['preview_height']) ? (int) $this->element['preview_height'] : 200; $style = ''; $style .= $width > 0 ? 'max-width:' . $width . 'px;' : ''; $style .= $height > 0 ? 'max-height:' . $height . 'px;' : ''; $imgattr = array('id' => $this->id . '_preview', 'class' => 'media-preview', 'style' => $style); $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr); $previewImg = '<div id="' . $this->id . '_preview_img"' . ($src ? '' : ' style="display:none"') . '>' . $img . '</div>'; $previewImgEmpty = '<div id="' . $this->id . '_preview_empty"' . ($src ? ' style="display:none"' : '') . '>' . JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY') . '</div>'; if ($showAsTooltip) { $html[] = '<div class="media-preview add-on input-group-addon">'; $tooltip = $previewImgEmpty . $previewImg; $options = array('title' => JText::_('JLIB_FORM_MEDIA_PREVIEW_SELECTED_IMAGE'), 'text' => '<i class="icon-eye-open"></i>', 'class' => 'hasTipPreview'); $html[] = RHtml::tooltip($tooltip, $options); $html[] = '</div>'; } else { $html[] = '<div class="media-preview add-on input-group-addon" style="height:auto">'; $html[] = ' ' . $previewImgEmpty; $html[] = ' ' . $previewImg; $html[] = '</div>'; } } $html[] = ' <input type="text" class="input-small input-sm" name="' . $this->name . '" id="' . $this->id . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '" readonly="readonly"' . $attr . ' />'; $directory = (string) $this->element['directory']; if ($this->value && file_exists(JPATH_ROOT . '/' . $this->value)) { $folder = explode('/', $this->value); $folder = array_diff_assoc($folder, explode('/', JComponentHelper::getParams('com_media')->get('image_path', 'images'))); array_pop($folder); $folder = implode('/', $folder); } elseif (file_exists(JPATH_ROOT . '/' . JComponentHelper::getParams('com_media')->get('image_path', 'images') . '/' . $directory)) { $folder = $directory; } else { $folder = ''; } $link = ($link ? $link : 'index.php?option=com_media&view=images&layout=modal&tmpl=component&asset=' . $asset . '&author=' . $this->form->getValue($authorField)) . '&fieldid=' . $this->id . '&folder=' . $folder . '&redcore=true'; // Create the modal object $modal = RModal::getInstance(array('attribs' => array('id' => $modalId, 'class' => 'modal hide', 'style' => 'width: 820px; height: 500px; margin-left: -410px; top: 50%; margin-top: -250px;'), 'params' => array('showHeader' => true, 'showFooter' => false, 'showHeaderClose' => true, 'title' => $modalTitle, 'link' => $link, 'events' => array('onload' => 'jSetIframeHeight'))), $modalId); $html[] = RLayoutHelper::render('fields.rmedia', array('modal' => $modal, 'field' => $this)); $html[] = '</div>'; return implode("\n", $html); }
/** * Render the button. * * @param boolean $isOption Is menu option? * * @return string The rendered button. */ public function render($isOption = false) { return RLayoutHelper::render('toolbar.button.standard', array('button' => $this, 'isOption' => $isOption)); }
<div class="control-label"> <?php echo $this->form->getLabel('params'); ?> </div> <div class="controls"> <?php echo $this->form->getInput('params'); ?> </div> </div> <?php $element = new RTranslationContentElement('com_plugins', ''); $element->name = 'plugins'; $column = array('name' => 'params', 'formname' => 'plugin'); echo RLayoutHelper::render('translation.params', array('form' => RTranslationHelper::loadParamsForm($column, $element, $this->item, 'plugin'), 'column' => $column, 'translationForm' => true)); ?> </div> </div> <!-- hidden fields --> <input type="hidden" name="option" value="com_redcore"> <input type="hidden" name="id" value="<?php echo $this->item->id; ?> "> <input type="hidden" name="task" value=""> <?php echo JHTML::_('form.token'); ?> </form>
</li> <?php $firstTabActive = false; ?> <?php } ?> <?php } ?> </ul> </div> <div class="tab-content"> <?php foreach ($this->formData as $operation => $operationData) { ?> <?php if (substr($operation, 0, strlen('read-')) === 'read-') { $fieldList = array('defaultValue', 'isRequiredField', 'isPrimaryField'); if ($operation == 'read-list') { $fieldList = array_merge($fieldList, array('isFilterField', 'isSearchableField')); } echo RLayoutHelper::render('webservice.operation', array('view' => $this, 'options' => array('operation' => $operation, 'form' => $this->form, 'tabActive' => $firstContentActive ? ' active in ' : '', 'fieldList' => $fieldList))); $firstContentActive = false; } ?> <?php } ?> </div>
?> "></a> <?php echo RLayoutHelper::render('webservice.documentationoperation', array('view' => $view, 'options' => array('xml' => $xml, 'operationXml' => $task, 'operationName' => $operationName . ' ' . $taskName, 'taskName' => $taskName, 'soapEnabled' => $soapEnabled))); ?> <br /> <?php } } else { ?> <a name="<?php echo $operationName; ?> "></a> <?php echo RLayoutHelper::render('webservice.documentationoperation', array('view' => $view, 'options' => array('xml' => $xml, 'operationXml' => $operation, 'operationName' => $operationName, 'soapEnabled' => $soapEnabled))); ?> <br /> <?php } ?> <?php } ?> <?php } ?> <?php } ?> </div>
/** * Method to get the field input markup. * * @return string The field input markup. */ protected function getInput() { $class = $this->element['class'] ? $this->element['class'] : ''; return RLayoutHelper::render('fields.timepicker', array('field' => $this, 'class' => $class, 'id' => $this->id, 'required' => $this->required, 'name' => $this->name, 'value' => $this->value)); }
.string { color: green; } .number { color: darkorange; } .boolean { color: blue; } .null { color: magenta; } .key { color: red; } .modal.large { width: 80%; margin-left:-40%; } </style> <form action="<?php echo $action; ?> " id="adminForm" method="post" name="adminForm" autocomplete="off" class="adminForm form-validate form-horizontal" enctype="multipart/form-data"> <?php echo RLayoutHelper::render('searchtools.default', array('view' => $this, 'options' => array('filtersHidden' => false, 'searchField' => 'search_webservices', 'searchFieldSelector' => '#filter_search_webservicess', 'limitFieldSelector' => '#list_webservices_limit', 'activeOrder' => $listOrder, 'activeDirection' => $listDirn))); ?> <hr/> <div class="modal fade" id="webservicePreview" tabindex="-1" role="dialog" aria-labelledby="webservicePreview" aria-hidden="true"> <div class="modal-dialog modal-lg modal-dialog-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title"><?php echo JText::_('COM_REDCORE_WEBSERVICES_WEBSERVICE_PREVIEW'); ?>
<?php if ($displayTopbar) { ?> <?php echo RLayoutHelper::render($topbarLayout, $topbarData); ?> <?php } ?> <div class="row-fluid"> <?php if ($displaySidebar) { ?> <div class="span2 sidebar"> <?php echo RLayoutHelper::render($sidebarLayout, $sidebarData); ?> </div> <div class="span10 content"> <?php } else { ?> <div class="span12 content"> <?php } ?> <section id="component"> <div class="row-fluid"> <h1><?php echo $view->getTitle(); ?>
<?php /** * @package Redcore * @subpackage Layouts * * @copyright Copyright (C) 2012 - 2013 redCOMPONENT.com. All rights reserved. * @license GNU General Public License version 2 or later, see LICENSE. */ defined('JPATH_REDCORE') or die; $data = (object) $displayData; $options = !empty($data->field->ajaxchildOptions) ? $data->field->ajaxchildOptions : array(); // We won't load anything if it's not going to work if (!empty($options['ajaxUrl'])) { $options['childSelector'] = isset($options['childSelector']) ? $options['childSelector'] : '.js-childlist-child'; JHtml::_('rjquery.childlist', $options['childSelector'], $options); } // Render the standard select echo RLayoutHelper::render('fields.rlist', $data);
/** * Method to create an inactive pagination string * * @param RPaginationObject $item The item to be processed * * @return string * * @since 1.0 */ protected function _item_inactive(RPaginationObject $item) { return RLayoutHelper::render('pagination.item.inactive', $item); }
/** * Method to sort a column in a grid * * @param string $title The link title * @param string $order The order field for the column * @param string $direction The current direction * @param mixed $selected The selected ordering * @param string $task An optional task override * @param string $new_direction An optional direction for the new column * @param string $tip An optional text shown as tooltip title instead of $title * @param string $icon Icon to show * @param string $formId The form id * * @return string */ public static function sort($title, $order, $direction = 'asc', $selected = 0, $task = null, $new_direction = 'asc', $tip = '', $icon = null, $formId = 'adminForm') { JHtml::_('rbootstrap.tooltip'); static::main(); $direction = strtolower($direction); $orderIcons = array('icon-chevron-up', 'icon-chevron-down'); $index = (int) ($direction == 'desc'); if ($order != $selected) { $direction = $new_direction; } else { $direction = $direction == 'desc' ? 'asc' : 'desc'; } // Create an object to pass it to the layouts $data = new stdClass(); $data->order = $order; $data->direction = $direction; $data->metatitle = RHtml::tooltipText(JText::_($tip ? $tip : $title), JText::_('JGLOBAL_CLICK_TO_SORT_THIS_COLUMN'), 0); $data->selected = $selected; $data->task = $task; $data->tip = $tip; $data->title = $title; $data->orderIcon = $orderIcons[$index]; $data->icon = $icon; $data->form = $formId; return RLayoutHelper::render('grid.sort', $data); }
/** * Close the current tab content panel * * @return string HTML to close the pane */ public static function endTab() { $html = RLayoutHelper::render('libraries.cms.html.bootstrap.endtab'); return $html; }
JHtml::_('rjquery.chosen', 'select'); // Required objects $doc = JFactory::getDocument(); $user = JFactory::getUser(); $action = JRoute::_('index.php?option=com_redsource&view=contents'); $listOrder = $this->state->get('list.ordering'); $listDirn = $this->state->get('list.direction'); $saveOrder = $listOrder == 'ordering'; ?> <form action="<?php echo $action; ?> " name="adminForm" class="adminForm" id="adminForm" method="post"> <div class="row-fluid"> <?php echo RLayoutHelper::render('search', array('view' => $this)); ?> <hr/> <table class="table table-striped table-hover" id="companyList"> <thead> <tr> <th class="span1" class="hidden-phone"></th> <th class="span1" class="nowrap center"> <?php echo $this->filterForm->getInput('filter_state'); ?> </th> <th class="span1 hidden-phone"></th> <th class="span1 hidden-phone"></th> <th class="span3"></th> <th class="span2 hidden-phone"></th>
<?php } ?> <?php } ?> <?php echo $output; ?> <?php } ?> <?php echo RLayoutHelper::render('pagination.link', $pages['next']); echo RLayoutHelper::render('pagination.link', $pages['end']); ?> </ul> <?php } ?> <?php if ($showLimitStart) { ?> <input type="hidden" name="<?php echo $list['prefix']; ?> limitstart" value="<?php echo $list['limitstart']; ?> " />