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 return settings.SMS_ENABLED
def get_enable_url(self) -> str: def get_enable_url(self) -> str:
return '/ui/#/users/profile/?activeTab=ProfileUpdate' return '/ui/#/profile/setting?activeTab=ProfileUpdate'
def can_disable(self) -> bool: def can_disable(self) -> bool:
return True return True
def disable(self): def disable(self):
return '/ui/#/users/profile/?activeTab=ProfileUpdate' return '/ui/#/profile/setting?activeTab=ProfileUpdate'
@staticmethod @staticmethod
def help_text_of_enable(): def help_text_of_enable():
@ -61,4 +61,4 @@ class MFASms(BaseMFA):
return _("Clear phone number to disable") return _("Clear phone number to disable")
def get_disable_url(self) -> str: 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%;"> <div style="height: 100%; width: 100%;">
{% for b in mfa_backends %} {% for b in mfa_backends %}
<div class="row" style="padding-top: 10px"> <div class="row" style="padding-top: 10px">
<li class="col-sm-6" style="font-size: 14px">{{ b.display_name }} <li class="col-sm-6" style="font-size: 14px">
{{ b.enable }}</li> {{ b.display_name }}
</li>
<span class="col-sm-6"> <span class="col-sm-6">
{% if b.is_active %} {% if b.is_active %}
<button class="btn btn-warning btn-xs" style="float: right" <button class="btn btn-warning btn-xs" style="float: right"