|
1 | 1 | <?php
|
2 |
| -/** @var $icons \SP\Core\UI\ThemeIcons */ |
| 2 | +/** |
| 3 | + * @var \SP\Core\UI\ThemeIcons $icons |
| 4 | + * @var \SP\Config\ConfigData $configData |
| 5 | + * @var callable $_getvar |
| 6 | + * @var \SP\Mvc\View\Template $this |
| 7 | + */ |
| 8 | + |
| 9 | +$chk2FAEnabled = $_getvar('chk2FAEnabled'); |
3 | 10 | ?>
|
4 | 11 |
|
5 | 12 | <div id="title" class="titleNormal">
|
|
10 | 17 | <form method="post" name="frmSecurity" id="frmSecurity" class="form-action"
|
11 | 18 | data-onsubmit="twofa/save"
|
12 | 19 | data-plugin="Authenticator"
|
13 |
| - data-action-route="<?php echo $route; ?>" |
| 20 | + data-action-route="<?php echo $_getvar('route'); ?>" |
14 | 21 | data-hash="">
|
15 | 22 |
|
16 | 23 | <table id="tblSite" class="data tblConfig round">
|
|
33 | 40 | <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="2faenabled">
|
34 | 41 | <input type="checkbox" id="2faenabled"
|
35 | 42 | class="mdl-switch__input mdl-color-text--indigo-400"
|
36 |
| - name="2faenabled" <?php echo $chk2FAEnabled ? 'checked' : ''; ?>/> |
| 43 | + name="2faenabled" <?php echo $_getvar('chk2FAEnabled') ? 'checked' : ''; ?>/> |
37 | 44 | <span class="mdl-switch__label"><?php echo _t('authenticator', 'Activar'); ?></span>
|
38 | 45 | </label>
|
39 | 46 |
|
40 | 47 | <div id="qr_code_wrapper">
|
41 |
| - <?php if (!$chk2FAEnabled && $qrCode): ?> |
| 48 | + <?php |
| 49 | + $qrCode = $_getvar('qrCode'); |
| 50 | + |
| 51 | + if (!$chk2FAEnabled && $qrCode): ?> |
42 | 52 | <div id="qr_code">
|
43 | 53 | <img id="qrcode" src="data:image/gif;base64,<?php echo $qrCode; ?>" alt="QR Code"/>
|
44 | 54 | </div>
|
|
69 | 79 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
70 | 80 | <input id="expiredays" name="expiredays" type="number" step="1"
|
71 | 81 | min="0" max="720" class="mdl-textfield__input mdl-color-text--indigo-400"
|
72 |
| - value="<?php echo $expireDays ?: 90; ?>" required/> |
| 82 | + value="<?php echo $_getvar('expireDays') ?: 90; ?>" required/> |
73 | 83 | <label class="mdl-textfield__label"
|
74 | 84 | for="expiredays"><?php echo _t('authenticator', 'Días'); ?></label>
|
75 | 85 | </div>
|
|
84 | 94 | title="<?php echo _t('authenticator', 'Ver códigos'); ?>"
|
85 | 95 | data-onclick="twofa/viewRecoveryCodes"
|
86 | 96 | data-plugin="Authenticator"
|
87 |
| - data-action-route="<?php echo $viewCodesRoute; ?>" |
| 97 | + data-action-route="<?php echo $_getvar('viewCodesRoute'); ?>" |
88 | 98 | data-dst-id="#recovery-codes">remove_red_eye</i>
|
89 | 99 | </td>
|
90 | 100 | <td class="valField" id="recovery-codes" style="display: none;">
|
|
0 commit comments