260522_03_ENH: 전화번호, pw는 개별 수정 가능하게 수정

This commit is contained in:
2026-05-22 10:41:21 +09:00
parent 296bd614c7
commit 7b59843082
2 changed files with 70 additions and 5 deletions

View File

@@ -66,6 +66,11 @@
@keyframes uploadLoadingSpin{
to { transform: rotate(360deg); }
}
.form-group input {
background-color:#fff!important;
color: #000!important;
}
</style>
<!--#include virtual="/Include/Top.asp"-->
<div id="uploadLoading">
@@ -111,6 +116,16 @@
<option value="">선택</option>
</select>
</div>
<hr/>
<div class="form-group">
<label>수정 전화번호</label>
<input type="text" class="form-control" name="new_r_phone" id="new_r_phone" onkeyup="this.value=this.value.replace(/[^0-9]/g,'');" />
</div>
<hr/>
<div class="form-group">
<label>수정 PW</label>
<input type="text" class="form-control" name="new_r_pass" id="new_r_pass" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-warning" id="r_edit">수정</button>
@@ -333,8 +348,35 @@
alert("지원 지역을 선택하여 주십시오.");
return false;
}
AjaxUpdate("update", $("#r_phone").val(), $("#r_position").val(), $("#r_area").val(), $("#r_district").val(), $("#r_edu").val());
if($("#new_r_phone").val() != "" || $("#new_r_pass").val() != ""){
var alertMessage = [];
if($("#new_r_phone").val() != ""){
alertMessage.push(`전화번호를 ${$("#new_r_phone").val()}로`);
}
if($("#new_r_pass").val() != ""){
alertMessage.push(`PW를 ${$("#new_r_pass").val()}로`);
}
var confirmMessage = alertMessage.join(", ") + " 변경하시겠습니까?";
if(!confirm(confirmMessage)){
alert("수정 취소");
return;
}
}
AjaxUpdate(
"update",
$("#r_phone").val(),
$("#r_position").val(),
$("#r_area").val(),
$("#r_district").val(),
$("#r_edu").val(),
$("#new_r_phone").val() ?? "",
$("#new_r_pass").val() ?? ""
);
var dt = $("#r_list").DataTable();
dt.ajax.reload(null, false);
}else{
alert("수정 취소");
}
@@ -722,7 +764,9 @@
"r_position" : upsertRow.r_position,
"r_area" : upsertRow.r_area,
"r_district" : upsertRow.r_district,
"r_edu" : "NULL"
"r_edu" : "NULL",
"new_r_phone" : "NULL",
"new_r_pass" : "NULL",
},
success:function(res){
if(res == "1"){
@@ -785,7 +829,18 @@
return {"insert": insertCnt, "delete": deleteCnt, "fail": failCnt};
}
function AjaxUpdate(gubun, phone, position, area, district, edu){
function AjaxUpdate(gubun, phone, position, area, district, edu, new_r_phone, new_r_pass){
console.log( {
"gubun" : gubun,
"r_name" : "NULL",
"r_phone" : phone,
"r_position" : position,
"r_area" : area,
"r_district" : district,
"r_edu" : edu,
"new_r_phone" : new_r_phone,
"new_r_pass" : new_r_pass,
})
$.ajax({
url:"/Ajax/Redit.asp",
method:"POST",
@@ -797,7 +852,9 @@
"r_position" : position,
"r_area" : area,
"r_district" : district,
"r_edu" : edu
"r_edu" : edu,
"new_r_phone" : new_r_phone,
"new_r_pass" : new_r_pass,
},
success:function(res){
if(res == "1"){