first commit
This commit is contained in:
63
components/com_config/tmpl/config/default.php
Normal file
63
components/com_config/tmpl/config/default.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate')
|
||||
->useScript('com_config.config')
|
||||
->useScript('inlinehelp');
|
||||
|
||||
?>
|
||||
<?php if ($this->params->get('show_page_heading')) : ?>
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
<?php if ($this->escape($this->params->get('page_heading'))) : ?>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($this->params->get('page_title')); ?>
|
||||
<?php endif; ?>
|
||||
</h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo Route::_('index.php?option=com_config'); ?>" id="application-form" method="post" name="adminForm" class="form-validate">
|
||||
|
||||
<div class="mb-2 d-flex">
|
||||
<button type="button" class="btn btn-sm btn-outline-info button-inlinehelp ms-auto">
|
||||
<span class="fa fa-question-circle" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JINLINEHELP') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<?php echo $this->loadTemplate('site'); ?>
|
||||
<?php echo $this->loadTemplate('seo'); ?>
|
||||
<?php echo $this->loadTemplate('metadata'); ?>
|
||||
|
||||
<input type="hidden" name="task" value="">
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
|
||||
<div class="mb-2">
|
||||
<button type="button" class="btn btn-primary" data-submit-task="config.apply">
|
||||
<span class="icon-check" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JSAVE') ?>
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" data-submit-task="config.cancel">
|
||||
<span class="icon-times" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JCANCEL') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
20
components/com_config/tmpl/config/default.xml
Normal file
20
components/com_config/tmpl/config/default.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_CONFIG_CONFIG_VIEW_DEFAULT_TITLE" option="COM_CONFIG_CONFIG_VIEW_DEFAULT_OPTION">
|
||||
<help
|
||||
key = "Menu_Item:_Site_Configuration_Options"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[COM_CONFIG_CONFIG_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<fields name="request">
|
||||
<fieldset name="request">
|
||||
<field
|
||||
name="controller"
|
||||
type="hidden"
|
||||
default=""
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
32
components/com_config/tmpl/config/default_metadata.php
Normal file
32
components/com_config/tmpl/config/default_metadata.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<fieldset>
|
||||
|
||||
<legend><?php echo Text::_('COM_CONFIG_METADATA_SETTINGS'); ?></legend>
|
||||
|
||||
<?php foreach ($this->form->getFieldset('metadata') as $field) : ?>
|
||||
<div class="mb-3">
|
||||
<?php echo $field->label; ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php if ($field->description) : ?>
|
||||
<div class="form-text hide-aware-inline-help d-none" id="<?php echo $field->id ?>-desc">
|
||||
<?php echo Text::_($field->description) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</fieldset>
|
||||
32
components/com_config/tmpl/config/default_seo.php
Normal file
32
components/com_config/tmpl/config/default_seo.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<fieldset>
|
||||
|
||||
<legend><?php echo Text::_('COM_CONFIG_SEO_SETTINGS'); ?></legend>
|
||||
|
||||
<?php foreach ($this->form->getFieldset('seo') as $field) : ?>
|
||||
<div class="mb-3">
|
||||
<?php echo $field->label; ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php if ($field->description) : ?>
|
||||
<div class="form-text hide-aware-inline-help d-none" id="<?php echo $field->id ?>-desc">
|
||||
<?php echo Text::_($field->description) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</fieldset>
|
||||
32
components/com_config/tmpl/config/default_site.php
Normal file
32
components/com_config/tmpl/config/default_site.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<fieldset>
|
||||
|
||||
<legend><?php echo Text::_('COM_CONFIG_SITE_SETTINGS'); ?></legend>
|
||||
|
||||
<?php foreach ($this->form->getFieldset('site') as $field) : ?>
|
||||
<div class="mb-3">
|
||||
<?php echo $field->label; ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php if ($field->description) : ?>
|
||||
<div class="form-text hide-aware-inline-help d-none" id="<?php echo $field->id ?>-desc">
|
||||
<?php echo Text::_($field->description) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</fieldset>
|
||||
187
components/com_config/tmpl/modules/default.php
Normal file
187
components/com_config/tmpl/modules/default.php
Normal file
@ -0,0 +1,187 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Multilanguage;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
HTMLHelper::_('behavior.combobox');
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate')
|
||||
->useScript('com_config.modules');
|
||||
|
||||
$editorText = false;
|
||||
$moduleXml = JPATH_SITE . '/modules/' . $this->item['module'] . '/' . $this->item['module'] . '.xml';
|
||||
|
||||
if (is_file($moduleXml)) {
|
||||
$xml = simplexml_load_file($moduleXml);
|
||||
|
||||
if (isset($xml->customContent)) {
|
||||
$editorText = true;
|
||||
}
|
||||
}
|
||||
|
||||
// If multi-language site, make language read-only
|
||||
if (Multilanguage::isEnabled()) {
|
||||
$this->form->setFieldAttribute('language', 'readonly', 'true');
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_config'); ?>" method="post" name="adminForm" id="modules-form" class="form-validate">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<legend><?php echo Text::_('COM_CONFIG_MODULES_SETTINGS_TITLE'); ?></legend>
|
||||
|
||||
<div>
|
||||
<?php echo Text::_('COM_CONFIG_MODULES_MODULE_NAME'); ?>
|
||||
<span class="badge bg-secondary"><?php echo $this->item['title']; ?></span>
|
||||
|
||||
<?php echo Text::_('COM_CONFIG_MODULES_MODULE_TYPE'); ?>
|
||||
<span class="badge bg-secondary"><?php echo $this->item['module']; ?></span>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('title'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('title'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('showtitle'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('showtitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('position'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('position'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<?php if ($this->getCurrentUser()->authorise('core.edit.state', 'com_modules.module.' . $this->item['id'])) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('published'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('published'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('publish_up'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('publish_up'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('publish_down'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('publish_down'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('access'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('access'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('ordering'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('ordering'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (Multilanguage::isEnabled()) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('language'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('language'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('note'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('note'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id="options">
|
||||
<?php echo $this->loadTemplate('options'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($editorText) : ?>
|
||||
<div class="mt-2" id="custom">
|
||||
<?php echo $this->form->getInput('content'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="id" value="<?php echo $this->item['id']; ?>">
|
||||
<input type="hidden" name="return" value="<?php echo Factory::getApplication()->getInput()->get('return', null, 'base64'); ?>">
|
||||
<input type="hidden" name="task" value="">
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<button type="button" class="btn btn-primary" data-submit-task="modules.apply">
|
||||
<span class="icon-check" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JAPPLY'); ?>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-submit-task="modules.save">
|
||||
<span class="icon-check" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JSAVE'); ?>
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" data-submit-task="modules.cancel">
|
||||
<span class="icon-times" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JCANCEL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
48
components/com_config/tmpl/modules/default_options.php
Normal file
48
components/com_config/tmpl/modules/default_options.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Multilanguage;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$fieldSets = $this->form->getFieldsets('params');
|
||||
|
||||
echo HTMLHelper::_('bootstrap.startAccordion', 'collapseTypes');
|
||||
$i = 0;
|
||||
|
||||
foreach ($fieldSets as $name => $fieldSet) :
|
||||
$label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_MODULES_' . strtoupper($name) . '_FIELDSET_LABEL';
|
||||
$class = isset($fieldSet->class) && !empty($fieldSet->class) ? $fieldSet->class : '';
|
||||
|
||||
|
||||
if (isset($fieldSet->description) && trim($fieldSet->description)) :
|
||||
echo '<p class="tip">' . $this->escape(Text::_($fieldSet->description)) . '</p>';
|
||||
endif;
|
||||
?>
|
||||
<?php echo HTMLHelper::_('bootstrap.addSlide', 'collapseTypes', Text::_($label), 'collapse' . ($i++)); ?>
|
||||
|
||||
<ul class="nav flex-column">
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<li>
|
||||
<?php // If multi-language site, make menu-type selection read-only ?>
|
||||
<?php if (Multilanguage::isEnabled() && $this->item['module'] === 'mod_menu' && $field->getAttribute('name') === 'menutype') : ?>
|
||||
<?php $field->readonly = true; ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $field->renderField(); ?>
|
||||
</li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<?php echo HTMLHelper::_('bootstrap.endSlide'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo HTMLHelper::_('bootstrap.endAccordion'); ?>
|
||||
61
components/com_config/tmpl/templates/default.php
Normal file
61
components/com_config/tmpl/templates/default.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
$user = $this->getCurrentUser();
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate')
|
||||
->useScript('com_config.templates');
|
||||
|
||||
?>
|
||||
<?php if ($this->params->get('show_page_heading')) : ?>
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
<?php if ($this->escape($this->params->get('page_heading'))) : ?>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($this->params->get('page_title')); ?>
|
||||
<?php endif; ?>
|
||||
</h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo Route::_('index.php?option=com_config'); ?>" method="post" name="adminForm" id="templates-form" class="form-validate">
|
||||
|
||||
<div id="page-site" class="tab-pane active">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo $this->loadTemplate('options'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="">
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
|
||||
<div class="mb-2">
|
||||
<button type="button" class="btn btn-primary " data-submit-task="templates.apply">
|
||||
<span class="icon-check text-white" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JSAVE') ?>
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger" data-submit-task="templates.cancel">
|
||||
<span class="icon-times text-white" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JCANCEL') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
20
components/com_config/tmpl/templates/default.xml
Normal file
20
components/com_config/tmpl/templates/default.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_CONFIG_TEMPLATES_VIEW_DEFAULT_TITLE" option="COM_CONFIG_TEMPLATES_VIEW_DEFAULT_OPTION">
|
||||
<help
|
||||
key = "Menu_Item:_Display_Template_Options"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[COM_CONFIG_TEMPLATES_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<fields name="request">
|
||||
<fieldset name="request" >
|
||||
<field
|
||||
name="controller"
|
||||
type="hidden"
|
||||
default=""
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
36
components/com_config/tmpl/templates/default_options.php
Normal file
36
components/com_config/tmpl/templates/default_options.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$fieldSets = $this->form->getFieldsets('params');
|
||||
?>
|
||||
|
||||
<legend><?php echo Text::_('COM_CONFIG_TEMPLATE_SETTINGS'); ?></legend>
|
||||
|
||||
<?php
|
||||
|
||||
// Search for com_config field set
|
||||
if (!empty($fieldSets['com_config'])) {
|
||||
echo $this->form->renderFieldset('com_config');
|
||||
} else {
|
||||
// Fall-back to display all in params
|
||||
foreach ($fieldSets as $name => $fieldSet) {
|
||||
$label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_CONFIG_' . $name . '_FIELDSET_LABEL';
|
||||
|
||||
if (isset($fieldSet->description) && trim($fieldSet->description)) {
|
||||
echo '<p class="tip">' . $this->escape(Text::_($fieldSet->description)) . '</p>';
|
||||
}
|
||||
|
||||
echo $this->form->renderFieldset($name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user