Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
FIX: 경기 중복 생성 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
empal030110 committed May 11, 2024
1 parent 2cb0f4a commit e244624
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions admin_view/match_create.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function html_body() {
<p class="list_title"><i class="fa-regular fa-futbol"></i> 경기 생성</p>
</div>
<div class="match_create_wrap">
<form action="../admin_control/match_create" method="post">
<form action="../admin_control/match_create" method="post" id="form_match_crate">
<div><p>경기 제목</p><input type="text" name="match_title" id="match_title" class="match_title" placeholder="경기 제목을 입력해주세요"></div>
<div>
<p>경기 위치</p>
Expand All @@ -57,7 +57,7 @@ function html_body() {
<div><p>종료 시간</p><input type="datetime-local" name="match_end_time" id="match_end_time" class="match_end_time" placeholder="종료 시간 선택해주세요"></div>
<div><p>개인 활동비</p><input type="text" name="match_money" id="match_money" class="match_money" placeholder="개인 활동비를 입력해주세요"></div>
<div><p>유의사항</p><input type="text" name="match_description" id="match_description" class="match_description" placeholder="경기 유의사항을 작성해주세요"></div>
<div class="match_create_btn_wrap"><button type="submit" class="match_create_btn">경기 생성</button></div>
<div class="match_create_btn_wrap"><button type="submit" class="match_create_btn" id="match_create_btn">경기 생성</button></div>
</form>
</div>
</div>
Expand Down Expand Up @@ -85,6 +85,19 @@ function html_body() {
member_gender.classList.remove('select_on');
}
}

var form_match_crate = document.getElementById("form_match_crate");
var submit_btn = document.getElementById("match_create_btn");
var count = 0;
function btn_click(event) {
event.preventDefault();
count += 1;
if (count > 1) {
return;
}
form_match_crate.submit();
}
submit_btn.addEventListener("click", btn_click);
</script>
<?php
}
Expand Down

0 comments on commit e244624

Please sign in to comment.