[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage com_users 6 * 7 * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\Component\ComponentHelper; 14 use Joomla\CMS\HTML\HTMLHelper; 15 use Joomla\CMS\Language\Text; 16 use Joomla\CMS\Plugin\PluginHelper; 17 use Joomla\CMS\Router\Route; 18 19 /** @var \Joomla\Component\Users\Site\View\Login\HtmlView $cookieLogin */ 20 21 HTMLHelper::_('behavior.keepalive'); 22 HTMLHelper::_('behavior.formvalidator'); 23 24 $usersConfig = ComponentHelper::getParams('com_users'); 25 26 ?> 27 <div class="com-users-login login"> 28 <?php if ($this->params->get('show_page_heading')) : ?> 29 <div class="page-header"> 30 <h1> 31 <?php echo $this->escape($this->params->get('page_heading')); ?> 32 </h1> 33 </div> 34 <?php endif; ?> 35 36 <?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description', '')) != '') || $this->params->get('login_image') != '') : ?> 37 <div class="com-users-login__description login-description"> 38 <?php endif; ?> 39 40 <?php if ($this->params->get('logindescription_show') == 1) : ?> 41 <?php echo $this->params->get('login_description'); ?> 42 <?php endif; ?> 43 44 <?php if ($this->params->get('login_image') != '') : ?> 45 <?php echo HTMLHelper::_('image', $this->params->get('login_image'), empty($this->params->get('login_image_alt')) && empty($this->params->get('login_image_alt_empty')) ? false : $this->params->get('login_image_alt'), ['class' => 'com-users-login__image login-image']); ?> 46 <?php endif; ?> 47 48 <?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description', '')) != '') || $this->params->get('login_image') != '') : ?> 49 </div> 50 <?php endif; ?> 51 52 <form action="<?php echo Route::_('index.php?option=com_users&task=user.login'); ?>" method="post" class="com-users-login__form form-validate form-horizontal well" id="com-users-login__form"> 53 54 <fieldset> 55 <?php echo $this->form->renderFieldset('credentials', ['class' => 'com-users-login__input']); ?> 56 57 <?php if (PluginHelper::isEnabled('system', 'remember')) : ?> 58 <div class="com-users-login__remember"> 59 <div class="form-check"> 60 <input class="form-check-input" id="remember" type="checkbox" name="remember" value="yes"> 61 <label class="form-check-label" for="remember"> 62 <?php echo Text::_('COM_USERS_LOGIN_REMEMBER_ME'); ?> 63 </label> 64 </div> 65 </div> 66 <?php endif; ?> 67 68 <?php foreach ($this->extraButtons as $button) : 69 $dataAttributeKeys = array_filter(array_keys($button), function ($key) { 70 return substr($key, 0, 5) == 'data-'; 71 }); 72 ?> 73 <div class="com-users-login__submit control-group"> 74 <div class="controls"> 75 <button type="button" 76 class="btn btn-secondary w-100 <?php echo $button['class'] ?? '' ?>" 77 <?php foreach ($dataAttributeKeys as $key) : ?> 78 <?php echo $key ?>="<?php echo $button[$key] ?>" 79 <?php endforeach; ?> 80 <?php if ($button['onclick']) : ?> 81 onclick="<?php echo $button['onclick'] ?>" 82 <?php endif; ?> 83 title="<?php echo Text::_($button['label']) ?>" 84 id="<?php echo $button['id'] ?>" 85 > 86 <?php if (!empty($button['icon'])) : ?> 87 <span class="<?php echo $button['icon'] ?>"></span> 88 <?php elseif (!empty($button['image'])) : ?> 89 <?php echo HTMLHelper::_('image', $button['image'], Text::_($button['tooltip'] ?? ''), [ 90 'class' => 'icon', 91 ], true) ?> 92 <?php elseif (!empty($button['svg'])) : ?> 93 <?php echo $button['svg']; ?> 94 <?php endif; ?> 95 <?php echo Text::_($button['label']) ?> 96 </button> 97 </div> 98 </div> 99 <?php endforeach; ?> 100 101 <div class="com-users-login__submit control-group"> 102 <div class="controls"> 103 <button type="submit" class="btn btn-primary"> 104 <?php echo Text::_('JLOGIN'); ?> 105 </button> 106 </div> 107 </div> 108 109 <?php $return = $this->form->getValue('return', '', $this->params->get('login_redirect_url', $this->params->get('login_redirect_menuitem', ''))); ?> 110 <input type="hidden" name="return" value="<?php echo base64_encode($return); ?>"> 111 <?php echo HTMLHelper::_('form.token'); ?> 112 </fieldset> 113 </form> 114 <div class="com-users-login__options list-group"> 115 <a class="com-users-login__reset list-group-item" href="<?php echo Route::_('index.php?option=com_users&view=reset'); ?>"> 116 <?php echo Text::_('COM_USERS_LOGIN_RESET'); ?> 117 </a> 118 <a class="com-users-login__remind list-group-item" href="<?php echo Route::_('index.php?option=com_users&view=remind'); ?>"> 119 <?php echo Text::_('COM_USERS_LOGIN_REMIND'); ?> 120 </a> 121 <?php if ($usersConfig->get('allowUserRegistration')) : ?> 122 <a class="com-users-login__register list-group-item" href="<?php echo Route::_('index.php?option=com_users&view=registration'); ?>"> 123 <?php echo Text::_('COM_USERS_LOGIN_REGISTER'); ?> 124 </a> 125 <?php endif; ?> 126 </div> 127 </div>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |