CoreFiles by mySites.guru
renderfield.php47 lines, 1,542 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
a51a135eaf2a2fa60658aaef04e10082
sha1
0d71ac6bf3763e5562c3dcc7a3b3b5503caa31dc
sha256
4aadf3c11b85a118b3b6fe386a71ae565fcf9650cb6ee3bbae361f29ca013cab
<?php
/**
 * @package     Joomla.Site
 * @subpackage  Layout
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_BASE') or die;

use Joomla\CMS\HTML\HTMLHelper;

extract($displayData);

/**
 * Layout variables
 * ---------------------
 * 	$options      : (array)  Optional parameters
 * 	$name         : (string) The id of the input this label is for
 * 	$label        : (string) The html code for the label (not required if $options['hiddenLabel'] is true)
 * 	$input        : (string) The input field html code
 * 	$description  : (string) An optional description to use in a tooltip
 */

if (!empty($options['showonEnabled']))
{
	HTMLHelper::_('script', 'system/showon.min.js', array('version' => 'auto', 'relative' => true));
}
$class = empty($options['class']) ? '' : ' ' . $options['class'];
$rel   = empty($options['rel']) ? '' : ' ' . $options['rel'];
$id    = $name . '-desc';

?>
<div class="control-group<?php echo $class; ?>"<?php echo $rel; ?>>
	<?php if (empty($options['hiddenLabel'])) : ?>
		<div class="control-label"><?php echo $label; ?></div>
	<?php endif; ?>
	<div class="controls"<?php if (!empty($description)) : ?> aria-describedby="<?php echo $id; ?>"<?php endif; ?>>
		<?php echo $input; ?>
	</div>
	<?php if (!empty($description)) : ?>
		<div id="<?php echo $id; ?>">
			<small class="form-text text-muted"><?php echo $description; ?></small>
		</div>
	<?php endif; ?>
</div>

The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.