[ 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) 2022 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 use Joomla\CMS\Factory; 12 use Joomla\CMS\HTML\HTMLHelper; 13 use Joomla\CMS\Language\Text; 14 use Joomla\CMS\Router\Route; 15 use Joomla\Component\Users\Site\Model\CaptiveModel; 16 use Joomla\Component\Users\Site\View\Captive\HtmlView; 17 use Joomla\Utilities\ArrayHelper; 18 19 /** 20 * @var HtmlView $this View object 21 * @var CaptiveModel $model The model 22 */ 23 $model = $this->getModel(); 24 25 if ($this->renderOptions['field_type'] !== 'custom') { 26 $this->document->getWebAssetManager() 27 ->useScript('com_users.two-factor-focus'); 28 } 29 30 ?> 31 <div class="users-mfa-captive card card-body"> 32 <h2 id="users-mfa-title"> 33 <?php if (!empty($this->renderOptions['help_url'])) : ?> 34 <span class="float-end"> 35 <a href="<?php echo $this->renderOptions['help_url'] ?>" 36 class="btn btn-sm btn-secondary" 37 target="_blank" 38 > 39 <span class="icon icon-question-sign" aria-hidden="true"></span> 40 <span class="visually-hidden"><?php echo Text::_('JHELP') ?></span> 41 </a> 42 </span> 43 <?php endif;?> 44 <?php if (!empty($this->title)) : ?> 45 <?php echo $this->title ?> <small> – 46 <?php endif; ?> 47 <?php if (!$this->allowEntryBatching) : ?> 48 <?php echo $this->escape($this->record->title) ?> 49 <?php else : ?> 50 <?php echo $this->escape($this->getModel()->translateMethodName($this->record->method)) ?> 51 <?php endif; ?> 52 <?php if (!empty($this->title)) : ?> 53 </small> 54 <?php endif; ?> 55 </h2> 56 57 <?php if ($this->renderOptions['pre_message']) : ?> 58 <div class="users-mfa-captive-pre-message text-muted mb-3"> 59 <?php echo $this->renderOptions['pre_message'] ?> 60 </div> 61 <?php endif; ?> 62 63 <form action="<?php echo Route::_('index.php?option=com_users&task=captive.validate&record_id=' . ((int) $this->record->id)) ?>" 64 id="users-mfa-captive-form" 65 method="post" 66 class="form-horizontal" 67 > 68 <?php echo HTMLHelper::_('form.token') ?> 69 70 <div id="users-mfa-captive-form-method-fields"> 71 <?php if ($this->renderOptions['field_type'] == 'custom') : ?> 72 <?php echo $this->renderOptions['html']; ?> 73 <?php endif; ?> 74 <div class="row mb-3"> 75 <?php if ($this->renderOptions['label']) : ?> 76 <label for="users-mfa-code" class="col-sm-3 col-form-label"> 77 <?php echo $this->renderOptions['label'] ?> 78 </label> 79 <?php endif; ?> 80 <div class="col-sm-9 <?php echo $this->renderOptions['label'] ? '' : 'offset-sm-3' ?>"> 81 <?php 82 $attributes = array_merge( 83 [ 84 'type' => $this->renderOptions['input_type'], 85 'name' => 'code', 86 'value' => '', 87 'placeholder' => $this->renderOptions['placeholder'] ?? null, 88 'id' => 'users-mfa-code', 89 'class' => 'form-control' 90 ], 91 $this->renderOptions['input_attributes'] 92 ); 93 94 if (strpos($attributes['class'], 'form-control') === false) { 95 $attributes['class'] .= ' form-control'; 96 } 97 ?> 98 <input <?php echo ArrayHelper::toString($attributes) ?>> 99 </div> 100 </div> 101 </div> 102 103 <div id="users-mfa-captive-form-standard-buttons" class="row my-3"> 104 <div class="col-sm-9 offset-sm-3"> 105 <button class="btn btn-primary me-3 <?php echo $this->renderOptions['submit_class'] ?>" 106 id="users-mfa-captive-button-submit" 107 style="<?php echo $this->renderOptions['hide_submit'] ? 'display: none' : '' ?>" 108 type="submit"> 109 <span class="<?php echo $this->renderOptions['submit_icon'] ?>" aria-hidden="true"></span> 110 <?php echo Text::_($this->renderOptions['submit_text']); ?> 111 </button> 112 113 <a href="<?php echo Route::_('index.php?option=com_users&task=user.logout&' . Factory::getApplication()->getFormToken() . '=1') ?>" 114 class="btn btn-danger btn-sm" id="users-mfa-captive-button-logout"> 115 <span class="icon icon-lock" aria-hidden="true"></span> 116 <?php echo Text::_('COM_USERS_MFA_LOGOUT'); ?> 117 </a> 118 119 <?php if (count($this->records) > 1) : ?> 120 <div id="users-mfa-captive-form-choose-another" class="my-3"> 121 <a href="<?php echo Route::_('index.php?option=com_users&view=captive&task=select') ?>"> 122 <?php echo Text::_('COM_USERS_MFA_USE_DIFFERENT_METHOD'); ?> 123 </a> 124 </div> 125 <?php endif; ?> 126 </div> 127 </div> 128 </form> 129 130 <?php if ($this->renderOptions['post_message']) : ?> 131 <div class="users-mfa-captive-post-message"> 132 <?php echo $this->renderOptions['post_message'] ?> 133 </div> 134 <?php endif; ?> 135 136 </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 |