增加后台编辑两步验证和openapi appkey的功能。
同时修复: - 去除部分表单的 id 和 name,阻止chrome的自动填充 - 不再需要的model - 部分代码格式问题
This commit is contained in:
@@ -20,6 +20,8 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "pager", "validator"],
|
||||
email: "",
|
||||
adminType: 0,
|
||||
userId: -1,
|
||||
openAPI: false,
|
||||
tfa_auth: false,
|
||||
|
||||
pager: {
|
||||
getPage: function (page) {
|
||||
@@ -32,6 +34,8 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "pager", "validator"],
|
||||
vm.adminType = user.admin_type;
|
||||
vm.email = user.email;
|
||||
vm.userId = user.id;
|
||||
vm.tfa_auth = user.two_factor_auth;
|
||||
vm.openAPI = user.openapi_appkey ? true: false;
|
||||
|
||||
vm.isEditing = true;
|
||||
},
|
||||
@@ -77,7 +81,9 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "pager", "validator"],
|
||||
real_name: vm.realName,
|
||||
email: vm.email,
|
||||
id: vm.userId,
|
||||
admin_type: vm.adminType
|
||||
admin_type: vm.adminType,
|
||||
openapi: vm.openAPI,
|
||||
tfa_auth: vm.tfa_auth
|
||||
};
|
||||
if ($("#password").val() !== "")
|
||||
data.password = $("#password").val();
|
||||
|
||||
Reference in New Issue
Block a user