fix:모달 내 정보보기 버튼 JS 함수 미정의 오류 수정
AJAX 로드 모달에서 script 태그가 실행되지 않는 문제 해결 - 별도 함수 대신 onclick 인라인으로 토글 로직 직접 처리 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -105,7 +105,8 @@
|
||||
<div class="bg-emerald-50 rounded-lg p-4 mb-6">
|
||||
<div class="flex items-center justify-between mb-3">
|
||||
<h3 class="text-sm font-semibold text-emerald-700">계약 및 납입 정보</h3>
|
||||
<button type="button" onclick="toggleContractDetail()"
|
||||
<button type="button"
|
||||
onclick="var p=document.getElementById('contractDetailPanel'),i=document.getElementById('contractDetailIcon'),t=document.getElementById('contractDetailBtnText'),h=p.classList.toggle('hidden');i.style.transform=h?'':'rotate(180deg)';t.textContent=h?'정보보기':'접기';"
|
||||
class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium text-emerald-700 bg-emerald-100 hover:bg-emerald-200 rounded-md transition">
|
||||
<svg id="contractDetailIcon" class="w-3.5 h-3.5 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
@@ -277,17 +278,6 @@ class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium text-emera
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggleContractDetail() {
|
||||
const panel = document.getElementById('contractDetailPanel');
|
||||
const icon = document.getElementById('contractDetailIcon');
|
||||
const btnText = document.getElementById('contractDetailBtnText');
|
||||
const isHidden = panel.classList.contains('hidden');
|
||||
panel.classList.toggle('hidden');
|
||||
icon.style.transform = isHidden ? 'rotate(180deg)' : '';
|
||||
btnText.textContent = isHidden ? '접기' : '정보보기';
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- 등록 정보 -->
|
||||
<div class="text-sm text-gray-500">
|
||||
|
||||
Reference in New Issue
Block a user