Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/fields.zip
Назад
PK �t!]�4yl fields.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <extension version="3.7" type="plugin" group="editors-xtd" method="upgrade"> <name>plg_editors-xtd_fields</name> <author>Joomla! Project</author> <creationDate>February 2017</creationDate> <copyright>(C) 2017 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_EDITORS-XTD_FIELDS_XML_DESCRIPTION</description> <files> <filename plugin="fields">fields.php</filename> </files> <languages> <language tag="en-GB">en-GB.plg_editors-xtd_fields.ini</language> <language tag="en-GB">en-GB.plg_editors-xtd_fields.sys.ini</language> </languages> </extension> PK �t!]��� � fields.phpnu &1i� <?php /** * @package Joomla.Plugin * @subpackage Editors-xtd.fields * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Editor Fields button * * @since 3.7.0 */ class PlgButtonFields extends JPlugin { /** * Load the language file on instantiation. * * @var boolean * @since 3.7.0 */ protected $autoloadLanguage = true; /** * Display the button * * @param string $name The name of the button to add * * @return JObject The button options as JObject * * @since 3.7.0 */ public function onDisplay($name) { // Check if com_fields is enabled if (!JComponentHelper::isEnabled('com_fields')) { return; } // Register FieldsHelper JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); // Guess the field context based on view. $jinput = JFactory::getApplication()->input; $context = $jinput->get('option') . '.' . $jinput->get('view'); // Validate context. $context = implode('.', FieldsHelper::extract($context)); if (!FieldsHelper::getFields($context)) { return; } $link = 'index.php?option=com_fields&view=fields&layout=modal&tmpl=component&context=' . $context . '&editor=' . $name . '&' . JSession::getFormToken() . '=1'; $button = new JObject; $button->modal = true; $button->class = 'btn'; $button->link = $link; $button->text = JText::_('PLG_EDITORS-XTD_FIELDS_BUTTON_FIELD'); $button->name = 'puzzle'; $button->options = "{handler: 'iframe', size: {x: 800, y: 500}}"; return $button; } } PK �t!]g���S S mediajce.xmlnu &1i� <?xml version="1.0" encoding="utf-8"?> <form> <fieldset name="media"> <field name="media_src" type="mediajce" label="PLG_FIELDS_MEDIAJCE_MEDIA_FILE_LABEL" schemes="http,https,ftp,ftps,data,file" validate="url" relative="true" /> <field name="media_text" type="text" label="PLG_FIELDS_MEDIAJCE_MEDIA_TEXT_LABEL" /> </fieldset> </form>PK �t!]l�D�, , mediajce.phpnu &1i� <?php /** * @package JCE * @subpackage Fields.MediaJce * * @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (C) 2020 - 2024 Ryan Demmer. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ \defined('_JEXEC') or die; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Form\Field\MediaField; use Joomla\CMS\Form\Form; use Joomla\CMS\Helper\MediaHelper; /** * Provides a modal media selector field for the JCE File Browser * * @since 2.6.17 */ class JFormFieldMediaJce extends MediaField { /** * The form field type. * * @var string */ protected $type = 'MediaJce'; /** * Layout to render * * @var string * @since 3.5 */ protected $layout = 'joomla.form.field.media'; /** * The mediatype for the form field. * * @var string * @since 2.9.37 */ protected $mediatype = 'images'; /** * Method to attach a JForm object to the field. * * @param SimpleXMLElement $element The SimpleXMLElement object representing the `<field>` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * * @return boolean True on success. * * @see JFormField::setup() */ public function setup(SimpleXMLElement $element, $value, $group = null) { // decode value if it is a string if (is_string($value)) { $json = json_decode($value, true); if ($json) { $value = isset($json['media_src']) ? $json['media_src'] : $value; } } else { $value = (array) $value; $value = isset($value['media_src']) ? $value['media_src'] : ''; } $result = parent::setup($element, $value, $group); if ($result === true) { $this->mediatype = isset($this->element['mediatype']) ? (string) $this->element['mediatype'] : 'images'; if (isset($this->types) && (bool) $this->element['converted'] === false) { if (is_string($this->value)) { $this->value = MediaHelper::getCleanMediaFieldValue($this->value); } } } return $result; } /** * Get the data that is going to be passed to the layout * * @return array */ public function getLayoutData() { // Get the basic field data $data = parent::getLayoutData(); // component must be installed and enabled if (!ComponentHelper::isEnabled('com_jce')) { return $data; } // plugin must be enabled if (!PluginHelper::isEnabled('system', 'jce')) { return $data; } $data['class'] .= ' input-medium wf-media-input'; // not enabled for media field if (!WfBrowserHelper::isMediaFieldEnabled()) { $data['readonly'] = true; $data['link'] = ''; return $data; } $converted = (bool) $this->element['converted']; $config = array( 'element' => $this->id, 'mediatype' => strtolower($this->mediatype), 'converted' => $converted, 'mediafolder' => isset($this->element['media_folder']) ? (string) $this->element['media_folder'] : '', ); // get individual field link $this->link = WfBrowserHelper::getMediaFieldUrl($config); $extraData = array( 'link' => $this->link, 'class' => $data['class'] .= ' wf-media-input-active', ); if ($converted) { $extraData['class'] .= ' wf-media-input-converted';; } // get global field options $options = WfBrowserHelper::getMediaFieldOptions(); if ($options['upload'] == 1) { $extraData['class'] .= ' wf-media-input-upload'; } if ($options['select_button'] == 0) { $extraData['class'] .= ' wf-media-input-no-select-button'; } $extraData['class'] .= ' wf-media-input-core'; return array_merge($data, $extraData); } } PK �t!]��P4t t components.phpnu &1i� <?php /** * @package Joomla.Platform * @subpackage Form * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; use Joomla\Utilities\ArrayHelper; JFormHelper::loadFieldClass('list'); /** * Form Field class for the Joomla Framework. * * @since 3.7.0 */ class JFormFieldComponents extends JFormFieldList { /** * The form field type. * * @var string * @since 3.7.0 */ protected $type = 'Components'; /** * Method to get a list of options for a list input. * * @return array An array of JHtml options. * * @since 2.5.0 */ protected function getOptions() { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('name AS text, element AS value') ->from('#__extensions') ->where('enabled >= 1') ->where('type =' . $db->quote('component')); $items = $db->setQuery($query)->loadObjectList(); if ($items) { $lang = JFactory::getLanguage(); foreach ($items as &$item) { // Load language $extension = $item->value; $lang->load("$extension.sys", JPATH_ADMINISTRATOR, null, false, true) || $lang->load("$extension.sys", JPATH_ADMINISTRATOR . '/components/' . $extension, null, false, true); // Translate component name $item->text = JText::_($item->text); } // Sort by component name $items = ArrayHelper::sortObjects($items, 'text', 1, true, true); } // Merge any additional options in the XML definition. $options = array_merge(parent::getOptions(), $items); return $options; } } PK �t!]P�Lt t consentbox.phpnu &1i� <?php /** * @package Joomla.Plugin * @subpackage Content.confirmconsent * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_PLATFORM') or die; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Associations; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; JFormHelper::loadFieldClass('Checkboxes'); /** * Consentbox Field class for the Confirm Consent Plugin. * * @since 3.9.1 */ class JFormFieldConsentBox extends JFormFieldCheckboxes { /** * The form field type. * * @var string * @since 3.9.1 */ protected $type = 'ConsentBox'; /** * Flag to tell the field to always be in multiple values mode. * * @var boolean * @since 3.9.1 */ protected $forceMultiple = false; /** * The article ID. * * @var integer * @since 3.9.1 */ protected $articleid; /** * Method to set certain otherwise inaccessible properties of the form field object. * * @param string $name The property name for which to set the value. * @param mixed $value The value of the property. * * @return void * * @since 3.9.1 */ public function __set($name, $value) { switch ($name) { case 'articleid': $this->articleid = (int) $value; break; default: parent::__set($name, $value); } } /** * Method to get certain otherwise inaccessible properties from the form field object. * * @param string $name The property name for which to get the value. * * @return mixed The property value or null. * * @since 3.9.1 */ public function __get($name) { switch ($name) { case 'articleid': return $this->$name; } return parent::__get($name); } /** * Method to attach a JForm object to the field. * * @param SimpleXMLElement $element The SimpleXMLElement object representing the `<field>` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * * @return boolean True on success. * * @see JFormField::setup() * @since 3.9.1 */ public function setup(SimpleXMLElement $element, $value, $group = null) { $return = parent::setup($element, $value, $group); if ($return) { $this->articleid = (int) $this->element['articleid']; } return $return; } /** * Method to get the field label markup. * * @return string The field label markup. * * @since 3.9.1 */ protected function getLabel() { if ($this->hidden) { return ''; } $data = $this->getLayoutData(); // Forcing the Alias field to display the tip below $position = $this->element['name'] == 'alias' ? ' data-placement="bottom" ' : ''; // When we have an article let's add the modal and make the title clickable if ($data['articleid']) { $attribs['data-toggle'] = 'modal'; $data['label'] = HTMLHelper::_( 'link', '#modal-' . $this->id, $data['label'], $attribs ); } // Here mainly for B/C with old layouts. This can be done in the layouts directly $extraData = array( 'text' => $data['label'], 'for' => $this->id, 'classes' => explode(' ', $data['labelclass']), 'position' => $position, ); return $this->getRenderer($this->renderLabelLayout)->render(array_merge($data, $extraData)); } /** * Method to get the field input markup. * * @return string The field input markup. * * @since 3.9.2 */ protected function getInput() { $modalHtml = ''; $layoutData = $this->getLayoutData(); if ($this->articleid) { $modalParams['title'] = $layoutData['label']; $modalParams['url'] = $this->getAssignedArticleUrl(); $modalParams['height'] = 800; $modalParams['width'] = '100%'; $modalHtml = HTMLHelper::_('bootstrap.renderModal', 'modal-' . $this->id, $modalParams); } return $modalHtml . parent::getInput(); } /** * Method to get the data to be passed to the layout for rendering. * * @return array * * @since 3.9.1 */ protected function getLayoutData() { $data = parent::getLayoutData(); $extraData = array( 'articleid' => (integer) $this->articleid, ); return array_merge($data, $extraData); } /** * Return the url of the assigned article based on the current user language * * @return string Returns the link to the article * * @since 3.9.1 */ private function getAssignedArticleUrl() { $db = Factory::getDbo(); // Get the info from the article $query = $db->getQuery(true) ->select($db->quoteName(array('id', 'catid', 'language'))) ->from($db->quoteName('#__content')) ->where($db->quoteName('id') . ' = ' . (int) $this->articleid); $db->setQuery($query); try { $article = $db->loadObject(); } catch (JDatabaseExceptionExecuting $e) { // Something at the database layer went wrong return Route::_( 'index.php?option=com_content&view=article&id=' . $this->articleid . '&tmpl=component' ); } if (!is_object($article)) { // We have not found the article object lets show a 404 to the user return Route::_( 'index.php?option=com_content&view=article&id=' . $this->articleid . '&tmpl=component' ); } // Register ContentHelperRoute JLoader::register('ContentHelperRoute', JPATH_BASE . '/components/com_content/helpers/route.php'); if (!Associations::isEnabled()) { return Route::_( ContentHelperRoute::getArticleRoute( $article->id, $article->catid, $article->language ) . '&tmpl=component' ); } $associatedArticles = Associations::getAssociations('com_content', '#__content', 'com_content.item', $article->id); $currentLang = Factory::getLanguage()->getTag(); if (isset($associatedArticles) && $currentLang !== $article->language && array_key_exists($currentLang, $associatedArticles)) { return Route::_( ContentHelperRoute::getArticleRoute( $associatedArticles[$currentLang]->id, $associatedArticles[$currentLang]->catid, $associatedArticles[$currentLang]->language ) . '&tmpl=component' ); } // Association is enabled but this article is not associated return Route::_( 'index.php?option=com_content&view=article&id=' . $article->id . '&catid=' . $article->catid . '&tmpl=component&lang=' . $article->language ); } } PK �|!](�M� render.phpnu &1i� <?php /** * @package Joomla.Site * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Check if we have all the data if (!key_exists('item', $displayData) || !key_exists('context', $displayData)) { return; } // Setting up for display $item = $displayData['item']; if (!$item) { return; } $context = $displayData['context']; if (!$context) { return; } JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); $parts = explode('.', $context); $component = $parts[0]; $fields = null; if (key_exists('fields', $displayData)) { $fields = $displayData['fields']; } else { $fields = $item->jcfields ?: FieldsHelper::getFields($context, $item, true); } if (empty($fields)) { return; } $output = array(); foreach ($fields as $field) { // If the value is empty do nothing if (!isset($field->value) || trim($field->value) === '') { continue; } $class = $field->name . ' ' . $field->params->get('render_class'); $layout = $field->params->get('layout', 'render'); $content = FieldsHelper::render($context, 'field.' . $layout, array('field' => $field)); // If the content is empty do nothing if (trim($content) === '') { continue; } $output[] = '<dd class="field-entry ' . $class . '">' . $content . '</dd>'; } if (empty($output)) { return; } ?> <dl class="fields-container"> <?php echo implode("\n", $output); ?> </dl> PK Ҍ!]|��N web.confignu &1i� <?xml version="1.0"?> <!-- This only works on IIS 7 or later. See https://www.iis.net/configreference/system.webserver/security/requestfiltering/fileextensions --> <configuration> <system.webServer> <security> <requestFiltering> <fileExtensions allowUnlisted="false" > <clear /> <add fileExtension=".html" allowed="true"/> </fileExtensions> </requestFiltering> </security> </system.webServer> </configuration>PK Ҍ!]�J�� � urlencoded.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') || die(); use Joomla\CMS\Form\FormHelper; if (class_exists('JFormFieldUrlencoded')) { return; } FormHelper::loadFieldClass('text'); class JFormFieldUrlencoded extends JFormFieldText { protected function getInput() { $this->value = urlencode($this->value); return parent::getInput(); } } PK Ҍ!]��ѡ� � .htaccessnu &1i� <IfModule !mod_authz_core.c> Order deny,allow Deny from all </IfModule> <IfModule mod_authz_core.c> <RequireAll> Require all denied </RequireAll> </IfModule> PK Ҍ!] �}^ fancyradio.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') || die(); require_once JPATH_LIBRARIES . '/fof40/Html/Fields/fancyradio.php';PK Ҍ!]�s�� � oauth2url.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') || die(); use Joomla\CMS\Form\FormHelper; if (class_exists('JFormFieldNote')) { return; } FormHelper::loadFieldClass('note'); class JFormFieldOauth2url extends JFormFieldNote { protected function getLabel() { return ''; } protected function getInput() { $engine = $this->element['engine'] ?? 'example'; $uri = rtrim(\JUri::base() ,'/'); if (substr($uri, -14) === '/administrator') { $uri = substr($uri, 0, -14); } $text1 = JText::_('COM_AKEEBA_CONFIG_OAUTH2URLFIELD_YOU_WILL_NEED'); $text2 = JText::_('COM_AKEEBA_CONFIG_OAUTH2URLFIELD_CALLBACK_URL'); $text3 = JText::_('COM_AKEEBA_CONFIG_OAUTH2URLFIELD_HELPER_URL'); $text4 = JText::_('COM_AKEEBA_CONFIG_OAUTH2URLFIELD_REFRESH_URL'); return <<< HTML <div class="alert alert-info mx-2 my-2"> <p> $text1 </p> <p> <strong>$text2</strong>: <br/> <code>$uri/index.php?option=com_akeeba&view=oauth2&task=step2&format=raw&engine={$engine}</code> </p> <p> <strong>$text3</strong>: <br/> <code>$uri/index.php?option=com_akeeba&view=oauth2&task=step1&format=raw&engine={$engine}</code> </p> <p> <strong>$text4</strong>: <br/> <code>$uri/index.php?option=com_akeeba&view=oauth2&task=refresh&format=raw&engine={$engine}</code> </p> </div> HTML; } } PK Ҍ!]�r��= = backupprofiles.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') || die(); use Joomla\CMS\Form\FormField; use Joomla\CMS\HTML\HTMLHelper; if (class_exists('JFormFieldBackupprofiles')) { return; } /** * Our main element class, creating a multi-select list out of an SQL statement */ class JFormFieldBackupprofiles extends FormField { /** * Element name * * @var string */ protected $name = 'Backupprofiles'; function getInput() { $db = \Joomla\CMS\Factory::getDBO(); $query = $db->getQuery(true) ->select([ $db->qn('id'), $db->qn('description'), ])->from($db->qn('#__ak_profiles')); $db->setQuery($query); $key = 'id'; $val = 'description'; $objectList = $db->loadObjectList(); if (!is_array($objectList)) { $objectList = []; } foreach ($objectList as $o) { $o->description = "#{$o->id}: {$o->description}"; } $showNone = $this->element['show_none'] ? (string) $this->element['show_none'] : ''; $showNone = in_array(strtolower($showNone), ['yes', '1', 'true', 'on']); if ($showNone) { $defaultItem = (object) [ 'id' => '0', 'description' => \Joomla\CMS\Language\Text::_('COM_AKEEBA_FORMFIELD_BACKUPPROFILES_NONE'), ]; array_unshift($objectList, $defaultItem); } HTMLHelper::_('formbehavior.chosen'); return HTMLHelper::_('select.genericlist', $objectList, $this->name, 'class="inputbox advancedSelect"', $key, $val, $this->value, $this->id); } } PK Ҍ!]7=v3 akencrypted.phpnu &1i� <?php /** * @package akeebabackup * @copyright Copyright (c)2006-2023 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ defined('_JEXEC') || die(); use Joomla\CMS\Form\FormHelper; if (class_exists('JFormFieldUrlencoded')) { return; } FormHelper::loadFieldClass('text'); class JFormFieldAkencrypted extends JFormFieldText { protected function getInput() { $this->value = $this->conditionalDecrypt($this->value); return parent::getInput(); } private function conditionalDecrypt($value) { // If the Factory is not already loaded we have to load the if (!class_exists('Akeeba\Engine\Factory')) { if (!defined('FOF40_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof40/include.php')) { return $value; } $container = \FOF40\Container\Container::getInstance('com_akeeba', [], 'admin'); /** @var \Akeeba\Backup\Admin\Dispatcher\Dispatcher $dispatcher */ $dispatcher = $container->dispatcher; try { $dispatcher->loadAkeebaEngine(); $dispatcher->loadAkeebaEngineConfiguration(); } catch (Exception $e) { return $value; } } $secureSettings = \Akeeba\Engine\Factory::getSecureSettings(); return $secureSettings->decryptSettings($this->value); } } PK �!]oX� � view.html.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Fields View * * @since 3.7.0 */ class FieldsViewFields extends JViewLegacy { /** * @var JForm * * @since 3.7.0 */ public $filterForm; /** * @var array * * @since 3.7.0 */ public $activeFilters; /** * @var array * * @since 3.7.0 */ protected $items; /** * @var JPagination * * @since 3.7.0 */ protected $pagination; /** * @var JObject * * @since 3.7.0 */ protected $state; /** * @var string * * @since 3.7.0 */ protected $sidebar; /** * 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 an Error object. * * @see JViewLegacy::loadTemplate() * @since 3.7.0 */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } // Display a warning if the fields system plugin is disabled if (!JPluginHelper::isEnabled('system', 'fields')) { $link = JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . FieldsHelper::getFieldsPluginId()); JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_FIELDS_SYSTEM_PLUGIN_NOT_ENABLED', $link), 'warning'); } // Only add toolbar when not in modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); FieldsHelper::addSubmenu($this->state->get('filter.context'), 'fields'); $this->sidebar = JHtmlSidebar::render(); } return parent::display($tpl); } /** * Adds the toolbar. * * @return void * * @since 3.7.0 */ protected function addToolbar() { $fieldId = $this->state->get('filter.field_id'); $component = $this->state->get('filter.component'); $section = $this->state->get('filter.section'); $canDo = JHelperContent::getActions($component, 'field', $fieldId); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); // Avoid nonsense situation. if ($component == 'com_fields') { return; } // Load extension language file $lang = JFactory::getLanguage(); $lang->load($component, JPATH_ADMINISTRATOR) || $lang->load($component, JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component)); $title = JText::sprintf('COM_FIELDS_VIEW_FIELDS_TITLE', JText::_(strtoupper($component))); // Prepare the toolbar. JToolbarHelper::title($title, 'puzzle fields ' . substr($component, 4) . ($section ? "-$section" : '') . '-fields'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('field.add'); } if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolbarHelper::editList('field.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('fields.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('fields.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('fields.archive'); } if (JFactory::getUser()->authorise('core.admin')) { JToolbarHelper::checkin('fields.checkin'); } // Add a batch button if ($canDo->get('core.create') && $canDo->get('core.edit') && $canDo->get('core.edit.state')) { $title = JText::_('JTOOLBAR_BATCH'); // Instantiate a new JLayoutFile instance and render the batch button $layout = new JLayoutFile('joomla.toolbar.batch'); $dhtml = $layout->render( array( 'title' => $title, ) ); $bar->appendButton('Custom', $dhtml, 'batch'); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { JToolbarHelper::preferences($component); } if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete', $component)) { JToolbarHelper::deleteList('', 'fields.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('fields.trash'); } JToolbarHelper::help('JHELP_COMPONENTS_FIELDS_FIELDS'); } /** * Returns the sort fields. * * @return array * * @since 3.7.0 */ protected function getSortFields() { return array( 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.state' => JText::_('JSTATUS'), 'a.title' => JText::_('JGLOBAL_TITLE'), 'a.type' => JText::_('COM_FIELDS_FIELD_TYPE_LABEL'), 'a.access' => JText::_('JGRID_HEADING_ACCESS'), 'a.language' => JText::_('JGRID_HEADING_LANGUAGE'), 'a.id' => JText::_('JGRID_HEADING_ID'), ); } } PK �!]�����! �! tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); $app = JFactory::getApplication(); $user = JFactory::getUser(); $userId = $user->get('id'); $context = $this->escape($this->state->get('filter.context')); $component = $this->state->get('filter.component'); $section = $this->state->get('filter.section'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $ordering = ($listOrder == 'a.ordering'); $saveOrder = ($listOrder == 'a.ordering' && strtolower($listDirn) == 'asc'); // The category object of the component $category = JCategories::getInstance(str_replace('com_', '', $component) . '.' . $section); // If there is no category for the component and section, so check the component only if (!$category) { $category = JCategories::getInstance(str_replace('com_', '', $component)); } if ($saveOrder) { $saveOrderingUrl = 'index.php?option=com_fields&task=fields.saveOrderAjax&tmpl=component'; JHtml::_('sortablelist.sortable', 'fieldList', 'adminForm', strtolower($listDirn), $saveOrderingUrl, false, true); } ?> <form action="<?php echo JRoute::_('index.php?option=com_fields&view=fields'); ?>" method="post" name="adminForm" id="adminForm"> <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> <div id="j-main-container" class="span10"> <div id="filter-bar" class="js-stools-container-bar pull-left"> <div class="btn-group pull-left"> <?php echo $this->filterForm->getField('context')->input; ?> </div> </div> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> <?php if (empty($this->items)) : ?> <div class="alert alert-no-items"> <?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> </div> <?php else : ?> <table class="table table-striped" id="fieldList"> <thead> <tr> <th width="1%" class="nowrap center hidden-phone"> <?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?> </th> <th width="1%" class="center"> <?php echo JHtml::_('grid.checkall'); ?> </th> <th width="1%" class="nowrap center"> <?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> </th> <th> <?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> </th> <th> <?php echo JHtml::_('searchtools.sort', 'COM_FIELDS_FIELD_TYPE_LABEL', 'a.type', $listDirn, $listOrder); ?> </th> <th> <?php echo JHtml::_('searchtools.sort', 'COM_FIELDS_FIELD_GROUP_LABEL', 'g.title', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> </th> <th width="5%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?> </th> <th width="1%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="9"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php foreach ($this->items as $i => $item) : ?> <?php $ordering = ($listOrder == 'a.ordering'); ?> <?php $canEdit = $user->authorise('core.edit', $component . '.field.' . $item->id); ?> <?php $canCheckin = $user->authorise('core.admin', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0; ?> <?php $canEditOwn = $user->authorise('core.edit.own', $component . '.field.' . $item->id) && $item->created_user_id == $userId; ?> <?php $canChange = $user->authorise('core.edit.state', $component . '.field.' . $item->id) && $canCheckin; ?> <tr class="row<?php echo $i % 2; ?>" item-id="<?php echo $item->id ?>"> <td class="order nowrap center hidden-phone"> <?php $iconClass = ''; ?> <?php if (!$canChange) : ?> <?php $iconClass = ' inactive'; ?> <?php elseif (!$saveOrder) : ?> <?php $iconClass = ' inactive tip-top hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); ?> <?php endif; ?> <span class="sortable-handler<?php echo $iconClass; ?>"> <span class="icon-menu" aria-hidden="true"></span> </span> <?php if ($canChange && $saveOrder) : ?> <input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" /> <?php endif; ?> </td> <td class="center"> <?php echo JHtml::_('grid.id', $i, $item->id); ?> </td> <td class="center"> <div class="btn-group"> <?php echo JHtml::_('jgrid.published', $item->state, $i, 'fields.', $canChange, 'cb'); ?> <?php // Create dropdown items and render the dropdown list. ?> <?php if ($canChange) : ?> <?php JHtml::_('actionsdropdown.' . ((int) $item->state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'fields'); ?> <?php JHtml::_('actionsdropdown.' . ((int) $item->state === -2 ? 'un' : '') . 'trash', 'cb' . $i, 'fields'); ?> <?php echo JHtml::_('actionsdropdown.render', $this->escape($item->title)); ?> <?php endif; ?> </div> </td> <td> <div class="pull-left break-word"> <?php if ($item->checked_out) : ?> <?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'fields.', $canCheckin); ?> <?php endif; ?> <?php if ($canEdit || $canEditOwn) : ?> <a href="<?php echo JRoute::_('index.php?option=com_fields&task=field.edit&id=' . $item->id . '&context=' . $context); ?>"> <?php echo $this->escape($item->title); ?></a> <?php else : ?> <?php echo $this->escape($item->title); ?> <?php endif; ?> <span class="small break-word"> <?php if (empty($item->note)) : ?> <?php echo JText::sprintf('JGLOBAL_LIST_NAME', $this->escape($item->name)); ?> <?php else : ?> <?php echo JText::sprintf('JGLOBAL_LIST_NAME_NOTE', $this->escape($item->name), $this->escape($item->note)); ?> <?php endif; ?> </span> <div class="small"> <?php if ($category) : ?> <?php echo JText::_('JCATEGORY') . ': '; ?> <?php $categories = FieldsHelper::getAssignedCategoriesTitles($item->id); ?> <?php if ($categories) : ?> <?php echo implode(', ', $categories); ?> <?php else : ?> <?php echo JText::_('JALL'); ?> <?php endif; ?> <?php endif; ?> </div> </div> </td> <td class="small"> <?php echo $this->escape($item->type); ?> </td> <td> <?php echo $this->escape($item->group_title); ?> </td> <td class="small hidden-phone"> <?php echo $this->escape($item->access_level); ?> </td> <td class="small nowrap hidden-phone"> <?php echo JLayoutHelper::render('joomla.content.language', $item); ?> </td> <td class="center hidden-phone"> <span><?php echo (int) $item->id; ?></span> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php //Load the batch processing form. ?> <?php if ($user->authorise('core.create', $component) && $user->authorise('core.edit', $component) && $user->authorise('core.edit.state', $component)) : ?> <?php echo JHtml::_( 'bootstrap.renderModal', 'collapseModal', array( 'title' => JText::_('COM_FIELDS_VIEW_FIELDS_BATCH_OPTIONS'), 'footer' => $this->loadTemplate('batch_footer') ), $this->loadTemplate('batch_body') ); ?> <?php endif; ?> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHtml::_('form.token'); ?> </div> </form> PK �!]r�N{ { tmpl/modal.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (JFactory::getApplication()->isClient('site')) { JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN')); } JHtml::_('behavior.core'); JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); JHtml::_('script', 'com_fields/admin-fields-modal.js', array('version' => 'auto', 'relative' => true)); // Special case for the search field tooltip. $searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter'); JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom')); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $editor = JFactory::getApplication()->input->get('editor', '', 'cmd'); ?> <div class="container-popup"> <form action="<?php echo JRoute::_('index.php?option=com_fields&view=fields&layout=modal&tmpl=component&editor=' . $editor . '&' . JSession::getFormToken() . '=1'); ?>" method="post" name="adminForm" id="adminForm"> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> <?php if (empty($this->items)) : ?> <div class="alert alert-no-items"> <?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> </div> <?php else : ?> <table class="table table-striped" id="moduleList"> <thead> <tr> <th width="1%" class="nowrap center"> <?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> </th> <th class="title"> <?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> </th> <th width="15%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'COM_FIELDS_FIELD_GROUP_LABEL', 'g.title', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'COM_FIELDS_FIELD_TYPE_LABEL', 'a.type', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> </th> <th width="10%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?> </th> <th width="1%" class="nowrap hidden-phone"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="8"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php $iconStates = array( -2 => 'icon-trash', 0 => 'icon-unpublish', 1 => 'icon-publish', 2 => 'icon-archive', ); foreach ($this->items as $i => $item) : ?> <tr class="row<?php echo $i % 2; ?>"> <td class="center"> <span class="<?php echo $iconStates[$this->escape($item->state)]; ?>" aria-hidden="true"></span> </td> <td class="has-context"> <a class="btn btn-small btn-block btn-success" href="#" onclick="Joomla.fieldIns('<?php echo $this->escape($item->id); ?>', '<?php echo $this->escape($editor); ?>');"><?php echo $this->escape($item->title); ?></a> </td> <td class="small hidden-phone"> <a class="btn btn-small btn-block btn-warning" href="#" onclick="Joomla.fieldgroupIns('<?php echo $this->escape($item->group_id); ?>', '<?php echo $this->escape($editor); ?>');"><?php echo $item->group_id ? $this->escape($item->group_title) : JText::_('JNONE'); ?></a> </td> <td class="small hidden-phone"> <?php echo $item->type; ?> </td> <td class="small hidden-phone"> <?php echo $this->escape($item->access_level); ?> </td> <td class="small hidden-phone"> <?php echo JLayoutHelper::render('joomla.content.language', $item); ?> </td> <td class="hidden-phone"> <?php echo (int) $item->id; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHtml::_('form.token'); ?> </form> </div> PK �!]�#�� tmpl/default_batch_body.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('formbehavior.chosen', 'select'); JFactory::getDocument()->addScriptDeclaration( ' jQuery(document).ready(function($){ if ($("#batch-group-id").length){var batchSelector = $("#batch-group-id");} if ($("#batch-copy-move").length) { $("#batch-copy-move").hide(); batchSelector.on("change", function(){ if (batchSelector.val() != 0 || batchSelector.val() != "") { $("#batch-copy-move").show(); } else { $("#batch-copy-move").hide(); } }); } }); ' ); $context = $this->escape($this->state->get('filter.context')); ?> <div class="container-fluid"> <div class="row-fluid"> <div class="control-group span6"> <div class="controls"> <?php echo JLayoutHelper::render('joomla.html.batch.language', array()); ?> </div> </div> <div class="control-group span6"> <div class="controls"> <?php echo JLayoutHelper::render('joomla.html.batch.access', array()); ?> </div> </div> </div> <div class="row-fluid"> <div class="control-group span6"> <div class="controls"> <?php $options = array( JHtml::_('select.option', 'c', JText::_('JLIB_HTML_BATCH_COPY')), JHtml::_('select.option', 'm', JText::_('JLIB_HTML_BATCH_MOVE')) ); ?> <label id="batch-choose-action-lbl" for="batch-choose-action"><?php echo JText::_('COM_FIELDS_BATCH_GROUP_LABEL'); ?></label> <div id="batch-choose-action" class="control-group"> <select name="batch[group_id]" class="inputbox" id="batch-group-id"> <option value=""><?php echo JText::_('JLIB_HTML_BATCH_NO_CATEGORY'); ?></option> <option value="nogroup"><?php echo JText::_('COM_FIELDS_BATCH_GROUP_OPTION_NONE'); ?></option> <?php echo JHtml::_('select.options', $this->get('Groups'), 'value', 'text'); ?> </select> </div> <div id="batch-copy-move" class="control-group radio"> <?php echo JText::_('JLIB_HTML_BATCH_MOVE_QUESTION'); ?> <?php echo JHtml::_('select.radiolist', $options, 'batch[move_copy]', '', 'value', 'text', 'm'); ?> </div> </div> </div> </div> </div> PK �!]rG�%� � tmpl/default_batch_footer.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <button type="button" class="btn" onclick="document.getElementById('batch-field-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''" data-dismiss="modal"> <?php echo JText::_('JCANCEL'); ?> </button> <button type="submit" class="btn btn-success" onclick="Joomla.submitbutton('field.batch');return false;"> <?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?> </button> PK 5�!]yۄ�+'