| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/radio.tar |
radio.xml 0000604 00000003011 15245561315 0006362 0 ustar 00 <?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
<name>plg_fields_radio</name>
<author>Joomla! Project</author>
<creationDate>March 2016</creationDate>
<copyright>(C) 2016 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_FIELDS_RADIO_XML_DESCRIPTION</description>
<files>
<filename plugin="radio">radio.php</filename>
<folder>params</folder>
<folder>tmpl</folder>
</files>
<languages>
<language tag="en-GB">en-GB.plg_fields_radio.ini</language>
<language tag="en-GB">en-GB.plg_fields_radio.sys.ini</language>
</languages>
<config>
<fields name="params">
<fieldset name="basic">
<field
name="options"
type="subform"
label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL"
description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC"
layout="joomla.form.field.subform.repeatable-table"
icon="list"
multiple="true"
>
<form hidden="true" name="list_templates_modal" repeat="true">
<field
name="name"
type="text"
label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL"
size="30"
/>
<field
name="value"
type="text"
label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL"
size="30"
/>
</form>
</field>
</fieldset>
</fields>
</config>
</extension>
radio.php 0000604 00000000703 15245561315 0006356 0 ustar 00 <?php
/**
* @package Joomla.Plugin
* @subpackage Fields.Radio
*
* @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;
JLoader::import('components.com_fields.libraries.fieldslistplugin', JPATH_ADMINISTRATOR);
/**
* Fields Radio Plugin
*
* @since 3.7.0
*/
class PlgFieldsRadio extends FieldsListPlugin
{
}
tmpl/radio.php 0000604 00000001124 15245561315 0007330 0 ustar 00 <?php
/**
* @package Joomla.Plugin
* @subpackage Fields.Radio
*
* @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;
$value = $field->value;
if ($value == '')
{
return;
}
$value = (array) $value;
$texts = array();
$options = $this->getOptionsFromField($field);
foreach ($options as $optionValue => $optionText)
{
if (in_array((string) $optionValue, $value))
{
$texts[] = JText::_($optionText);
}
}
echo htmlentities(implode(', ', $texts));
params/radio.xml 0000604 00000001777 15245561315 0007666 0 ustar 00 <?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="fieldparams">
<fieldset name="fieldparams">
<field
name="options"
type="subform"
label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL"
description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC"
layout="joomla.form.field.subform.repeatable-table"
icon="list"
multiple="true"
>
<form hidden="true" name="list_templates_modal" repeat="true">
<field
name="name"
type="text"
label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL"
size="30"
/>
<field
name="value"
type="text"
label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL"
size="30"
/>
</form>
</field>
</fieldset>
</fields>
<fields name="params">
<fieldset name="basic">
<field
name="class"
type="textarea"
label="COM_FIELDS_FIELD_CLASS_LABEL"
description="COM_FIELDS_FIELD_CLASS_DESC"
class="input-xxlarge"
size="40"
default="btn-group"
/>
</fieldset>
</fields>
</form>
switcher.php 0000604 00000001277 15245653073 0007122 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Layout\FileLayout;
// The layout is needed for transition from "btn-group" in Joomla! 3.10 to the "switcher" field in Joomla! 4
if (!$displayData['class'] || strpos($displayData['class'], 'btn-group') === false)
{
$displayData['class'] .= ' btn-group';
}
$renderer = new FileLayout('joomla.form.field.radio', null, $this->options);
$renderer->setIncludePaths($this->includePaths);
echo $renderer->render($displayData);