perf: 修改 mfa 地址

pull/7864/head
ibuler 2022-03-15 15:42:10 +08:00 committed by 老广
parent 4f887b1b11
commit 8839e6293b
2 changed files with 6 additions and 5 deletions

View File

@ -44,13 +44,13 @@ class MFASms(BaseMFA):
return settings.SMS_ENABLED
def get_enable_url(self) -> str:
return '/ui/#/users/profile/?activeTab=ProfileUpdate'
return '/ui/#/profile/setting?activeTab=ProfileUpdate'
def can_disable(self) -> bool:
return True
def disable(self):
return '/ui/#/users/profile/?activeTab=ProfileUpdate'
return '/ui/#/profile/setting?activeTab=ProfileUpdate'
@staticmethod
def help_text_of_enable():
@ -61,4 +61,4 @@ class MFASms(BaseMFA):
return _("Clear phone number to disable")
def get_disable_url(self) -> str:
return '/ui/#/users/profile/?activeTab=ProfileUpdate'
return '/ui/#/profile/setting?activeTab=ProfileUpdate'

View File

@ -49,8 +49,9 @@
<div style="height: 100%; width: 100%;">
{% for b in mfa_backends %}
<div class="row" style="padding-top: 10px">
<li class="col-sm-6" style="font-size: 14px">{{ b.display_name }}
{{ b.enable }}</li>
<li class="col-sm-6" style="font-size: 14px">
{{ b.display_name }}
</li>
<span class="col-sm-6">
{% if b.is_active %}
<button class="btn btn-warning btn-xs" style="float: right"