사용자 계정 쿠키 저장 추가

master
mjkhan21 1 year ago
parent 9d879227d8
commit 7cfa70e4af

@ -92,7 +92,7 @@
<div id="formAuthentication" class="mb-3">
<div class="mb-3">
<label for="userId" class="form-label">아이디</label>
<input id="userId" type="text" required class="form-control" placeholder="아이디를 입력하십시오." autofocus />
<input id="userId" type="text" value="${cookie['userAccount'].getValue()}" required class="form-control" placeholder="아이디를 입력하십시오." autofocus />
</div>
<div class="mb-3 form-password-toggle">
<div class="d-flex justify-content-between">
@ -129,7 +129,7 @@ function login() {
password:$("#password").val(),
institute:"default"
};
json.post({
ajax.post({
url:wctx.url("/login.do"),
data:params,
success:function(resp) {
@ -150,6 +150,8 @@ function login() {
$(function(){
$("#formAuthentication input").onEnterPress(login);
if ($("#userId").val())
$("#password").focus();
});
</script>
</body>

@ -302,13 +302,17 @@ $.fn.onEnterPress = function(handler) {
}
function labelFor(input) {
var selector = "label[for='{id}']",
key = "string" == typeof(input) ? input
: $(input).attr("id") || $(input).attr("name");
let selector = "label[for='{id}']",
str = "string" == typeof(input),
obj = $(input),
key = str ? input
: obj.attr("id") || obj.attr("name");
if (!key) return "";
selector = selector.replace(/{id}/gi, key);
return $(selector).text();
return $(selector).text()
|| obj.attr("title")
|| obj.attr("placeholder");
}
function validationFailureHandler() {

Loading…
Cancel
Save