[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 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\Administrator\Model\CaptiveModel; 16 use Joomla\Component\Users\Administrator\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 $this->document->getWebAssetManager() 26 ->useScript('com_users.two-factor-focus'); 27 28 ?> 29 <div class="users-mfa-captive card card-body"> 30 <h2 id="users-mfa-title"> 31 <?php if (!empty($this->title)) : ?> 32 <?php echo $this->title ?> <small> – 33 <?php endif; ?> 34 <?php if (!$this->allowEntryBatching) : ?> 35 <?php echo $this->escape($this->record->title) ?> 36 <?php else : ?> 37 <?php echo $this->escape($this->getModel()->translateMethodName($this->record->method)) ?> 38 <?php endif; ?> 39 <?php if (!empty($this->title)) : ?> 40 </small> 41 <?php endif; ?> 42 <?php if (!empty($this->renderOptions['help_url'])) : ?> 43 <span class="float-end"> 44 <a href="<?php echo $this->renderOptions['help_url'] ?>" 45 class="btn btn-sm btn-secondary" 46 target="_blank" 47 > 48 <span class="icon icon-question-sign" aria-hidden="true"></span> 49 <span class="visually-hidden"><?php echo Text::_('JHELP') ?></span> 50 </a> 51 </span> 52 <?php endif;?> 53 </h2> 54 55 <?php if ($this->renderOptions['pre_message']) : ?> 56 <div class="users-mfa-captive-pre-message text-muted"> 57 <?php echo $this->renderOptions['pre_message'] ?> 58 </div> 59 <?php endif; ?> 60 61 <form action="<?php echo Route::_('index.php?option=com_users&task=captive.validate&record_id=' . ((int) $this->record->id)) ?>" 62 id="users-mfa-captive-form" 63 method="post" 64 class="form-horizontal" 65 > 66 <?php echo HTMLHelper::_('form.token') ?> 67 68 <div id="users-mfa-captive-form-method-fields" class="container"> 69 <?php if ($this->renderOptions['field_type'] == 'custom') : ?> 70 <?php echo $this->renderOptions['html']; ?> 71 <?php endif; ?> 72 <div class="row mb-3 <?php echo $this->renderOptions['input_type'] === 'hidden' ? 'd-none' : '' ?>"> 73 <?php if ($this->renderOptions['label']) : ?> 74 <label for="users-mfa-code" class="col-sm-3 col-form-label"> 75 <?php echo $this->renderOptions['label'] ?> 76 </label> 77 <?php endif; ?> 78 <?php 79 $attributes = array_merge( 80 [ 81 'type' => $this->renderOptions['input_type'], 82 'name' => 'code', 83 'value' => '', 84 'placeholder' => $this->renderOptions['placeholder'] ?? null, 85 'id' => 'users-mfa-code', 86 'class' => 'form-control' 87 ], 88 $this->renderOptions['input_attributes'] 89 ); 90 91 if (strpos($attributes['class'], 'form-control') === false) { 92 $attributes['class'] .= ' form-control'; 93 } 94 ?> 95 <input <?php echo ArrayHelper::toString($attributes) ?>> 96 </div> 97 </div> 98 99 <div id="users-mfa-captive-form-standard-buttons" class="row my-3 d-sm-none"> 100 <div class="col-sm-9 offset-sm-3"> 101 <button class="btn btn-primary me-3 <?php echo $this->renderOptions['submit_class'] ?>" 102 id="users-mfa-captive-button-submit" 103 style="<?php echo $this->renderOptions['hide_submit'] ? 'display: none' : '' ?>" 104 type="submit"> 105 <span class="<?php echo $this->renderOptions['submit_icon'] ?>" aria-hidden="true"></span> 106 <?php echo Text::_($this->renderOptions['submit_text']); ?> 107 </button> 108 109 <a href="<?php echo Route::_('index.php?option=com_login&task=logout&' . Factory::getApplication()->getFormToken() . '=1') ?>" 110 class="btn btn-danger btn-sm" 111 id="users-mfa-captive-button-logout"> 112 <span class="icon icon-lock" aria-hidden="true"></span> 113 <?php echo Text::_('COM_USERS_MFA_LOGOUT'); ?> 114 </a> 115 116 <?php if (count($this->records) > 1) : ?> 117 <a id="users-mfa-captive-form-choose-another" 118 class="btn btn-link" 119 href="<?php echo Route::_('index.php?option=com_users&view=captive&task=select') ?>"> 120 <?php echo Text::_('COM_USERS_MFA_USE_DIFFERENT_METHOD'); ?> 121 </a> 122 <?php endif; ?> 123 </div> 124 </div> 125 </form> 126 127 <?php if ($this->renderOptions['post_message']) : ?> 128 <div class="users-mfa-captive-post-message"> 129 <?php echo $this->renderOptions['post_message'] ?> 130 </div> 131 <?php endif; ?> 132 133 </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 |