CoreFiles by mySites.guru
token.php49 lines, 1,349 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
6ba2c023c5c63b8a0a638f4995270f97
sha1
b23e76fc357ae934ccfbaa3d598b5c98310f0eab
sha256
9841f788c791fe77cecba771bcfcf72b80df5d7b4f6e6a7b76a5f03959a4a5c9
<?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\Factory;
use Joomla\CMS\Language\Text;

extract($displayData);

/**
 * Layout variables
 * -----------------
 * @var  string  $id     DOM id of the field.
 * @var  string  $label  Label of the field.
 * @var  string  $name   Name of the input field.
 * @var  string  $value  Value attribute of the field.
 */

Text::script('ERROR');
Text::script('MESSAGE');
Text::script('PLG_USER_TOKEN_COPY_SUCCESS');
Text::script('PLG_USER_TOKEN_COPY_FAIL');

Factory::getApplication()->getDocument()->getWebAssetManager()
	->registerAndUseScript('plg_user_token.token', 'plg_user_token/token.js', [], ['defer' => true], ['core']);
?>
<div class="input-group">
	<input
		type="text"
		class="form-control"
		name="<?php echo $name; ?>"
		id="<?php echo $id; ?>"
		readonly
		value="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>">
	<div class="input-group-append">
		<button
			class="btn btn-primary"
			type="button"
			id="token-copy"
			title="<?php echo Text::_('PLG_USER_TOKEN_COPY_DESC'); ?>"><?php echo Text::_('PLG_USER_TOKEN_COPY'); ?></button>
	</div>
</div>

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.