totp form name different from user one

This commit is contained in:
Jordan Blasenhauer 2024-01-02 14:50:27 +01:00
parent db0f238557
commit ad2253f89b

View file

@ -1,10 +1,9 @@
{% extends "base.html" %} {% block content %} {% set current_endpoint =
url_for(request.endpoint)[1:].split("/")[-1].strip() %}
<div
data-service-content
class="md:max-w-[600px] first-letter:w-full overflow-hidden overflow-y-auto overflow-x-auto col-span-12 p-4 relative break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
class="md:max-w-[600px] first-letter:w-full overflow-hidden overflow-y-auto overflow-x-auto col-span-12 p-4 relative break-words bg-white shadow-xl dark:bg-slate-850 dark:shadow-dark-xl rounded-2xl bg-clip-border"
>
<h5 class="my-2 font-bold dark:text-white/90 mx-2">SETTINGS</h5>
<!-- desktop tabs -->
@ -134,13 +133,13 @@ url_for(request.endpoint)[1:].split("/")[-1].strip() %}
method="POST"
autocomplete="off"
>
<div class="col-span-12">
<h5
class="text-xl my-1 transition duration-300 ease-in-out text-md font-bold m-0"
>
PROFILE
</h5>
</div>
<div class="col-span-12">
<h5
class="text-xl my-1 transition duration-300 ease-in-out text-md font-bold m-0"
>
PROFILE
</h5>
</div>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input
type="hidden"
@ -364,18 +363,18 @@ url_for(request.endpoint)[1:].split("/")[-1].strip() %}
<form
data-plugin-item="totp"
class="hidden grid grid-cols-12 w-full justify-items-center"
id="profile-form"
id="totp-form"
action="profile"
method="POST"
autocomplete="off"
>
<div class="col-span-12">
<h5
class="text-xl my-1 transition duration-300 ease-in-out text-md font-bold m-0"
>
TOTP
</h5>
</div>
<div class="col-span-12">
<h5
class="text-xl my-1 transition duration-300 ease-in-out text-md font-bold m-0"
>
TOTP
</h5>
</div>
<h5
class="{% if not is_totp %} text-red-500 {% else %} text-green-500 {% endif %} uppercase col-span-12 text-sm my-2 font-bold dark:text-white/90 mx-2"
>
@ -551,9 +550,9 @@ url_for(request.endpoint)[1:].split("/")[-1].strip() %}
<div class="col-span-12 flex justify-center mt-6">
<button
type="submit"
id="profile-button"
name="profile-button"
value="profile"
id="totp-button"
name="totp-button"
value="totp"
class="{% if not is_totp %}valid-btn{% else %}delete-btn{% endif %}"
>
{% if not is_totp %} enable totp {% else %} disable totp {% endif %}