|
@@ 2628-2662 (lines=35) @@
|
| 2625 |
|
/** |
| 2626 |
|
* Template for the password box/save button stuck at the bottom of every profile page. |
| 2627 |
|
*/ |
| 2628 |
|
function template_profile_save() |
| 2629 |
|
{ |
| 2630 |
|
global $context, $txt; |
| 2631 |
|
|
| 2632 |
|
echo ' |
| 2633 |
|
|
| 2634 |
|
<hr>'; |
| 2635 |
|
|
| 2636 |
|
// Only show the password box if it's actually needed. |
| 2637 |
|
if ($context['require_password']) |
| 2638 |
|
echo ' |
| 2639 |
|
<dl class="settings"> |
| 2640 |
|
<dt> |
| 2641 |
|
<strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '>', $txt['current_password'], ': </strong><br> |
| 2642 |
|
<span class="smalltext">', $txt['required_security_reasons'], '</span> |
| 2643 |
|
</dt> |
| 2644 |
|
<dd> |
| 2645 |
|
<input type="password" name="oldpasswrd" size="20"> |
| 2646 |
|
</dd> |
| 2647 |
|
</dl>'; |
| 2648 |
|
|
| 2649 |
|
echo ' |
| 2650 |
|
<div class="righttext">'; |
| 2651 |
|
|
| 2652 |
|
if (!empty($context['token_check'])) |
| 2653 |
|
echo ' |
| 2654 |
|
<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
| 2655 |
|
|
| 2656 |
|
echo ' |
| 2657 |
|
<input type="submit" value="', $txt['change_profile'], '" class="button"> |
| 2658 |
|
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 2659 |
|
<input type="hidden" name="u" value="', $context['id_member'], '"> |
| 2660 |
|
<input type="hidden" name="sa" value="', $context['menu_item_selected'], '"> |
| 2661 |
|
</div>'; |
| 2662 |
|
} |
| 2663 |
|
|
| 2664 |
|
/** |
| 2665 |
|
* Small template for showing an error message upon a save problem in the profile. |
|
@@ 3183-3212 (lines=30) @@
|
| 3180 |
|
/** |
| 3181 |
|
* Template for disabling two-factor authentication. |
| 3182 |
|
*/ |
| 3183 |
|
function template_tfadisable() |
| 3184 |
|
{ |
| 3185 |
|
global $txt, $context, $scripturl; |
| 3186 |
|
|
| 3187 |
|
echo ' |
| 3188 |
|
<div class="cat_bar"> |
| 3189 |
|
<h3 class="catbg">', $txt['tfadisable'], '</h3> |
| 3190 |
|
</div> |
| 3191 |
|
<div class="roundframe"> |
| 3192 |
|
<form action="', $scripturl, '?action=profile;area=tfadisable" method="post">'; |
| 3193 |
|
|
| 3194 |
|
if ($context['user']['is_owner']) |
| 3195 |
|
echo ' |
| 3196 |
|
<div class="block"> |
| 3197 |
|
<strong', (isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : ''), '>', $txt['current_password'], ': </strong><br> |
| 3198 |
|
<input type="password" name="oldpasswrd" size="20"> |
| 3199 |
|
</div>'; |
| 3200 |
|
else |
| 3201 |
|
echo ' |
| 3202 |
|
<div class="smalltext"> |
| 3203 |
|
', sprintf($txt['tfa_disable_for_user'], $context['user']['name']), ' |
| 3204 |
|
</div>'; |
| 3205 |
|
|
| 3206 |
|
echo ' |
| 3207 |
|
<input type="submit" name="save" value="', $txt['tfa_disable'], '" class="button floatright"> |
| 3208 |
|
<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '"> |
| 3209 |
|
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 3210 |
|
</form> |
| 3211 |
|
</div><!-- .roundframe -->'; |
| 3212 |
|
} |
| 3213 |
|
|
| 3214 |
|
/** |
| 3215 |
|
* Template for setting up 2FA backup code |