增加后台编辑两步验证和openapi appkey的功能。

同时修复:
 - 去除部分表单的 id 和 name,阻止chrome的自动填充
 - 不再需要的model
 - 部分代码格式问题
This commit is contained in:
virusdefender
2016-02-17 09:45:35 +08:00
parent c00d631ed0
commit 030a9b52f1
6 changed files with 69 additions and 12 deletions

View File

@@ -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();