admin_manage_user.html: 修改 JavaScript 函数名.

Hui Lan 2023-03-25 22:21:49 +08:00
parent c6010ccbbd
commit fb6d0b23ce
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@
<form id="user_form" action="" method="post" class="container mb-3"> <form id="user_form" action="" method="post" class="container mb-3">
<div> <div>
<label class="form-label" style="padding-top: 10px;">用户</label> <label class="form-label" style="padding-top: 10px;">用户</label>
<select onchange="select_user()" id="username" name="username" class="form-select" aria-label="Default select example"> <select onchange="loadUserExpiryDate()" id="username" name="username" class="form-select" aria-label="Default select example">
<option selected>选择用户</option> <option selected>选择用户</option>
{% for user in user_list %} {% for user in user_list %}
<option value="{{ user.name }}">{{ user.name }}</option> <option value="{{ user.name }}">{{ user.name }}</option>
@ -79,7 +79,7 @@
document.getElementById("new_password").value = pwd document.getElementById("new_password").value = pwd
}) })
// 选择用户后更新其过期时间 // 选择用户后更新其过期时间
function select_user() { function loadUserExpiryDate() {
let cur_user = $('#username').val(); let cur_user = $('#username').val();
{% for user in user_list %} {% for user in user_list %}
if (cur_user == "{{ user.name }}") { if (cur_user == "{{ user.name }}") {