fix: improve category cancel button functionality
Some checks failed
Deploy to Vercel / deploy (push) Has been cancelled
Deploy to Railway / deploy (push) Has been cancelled

- Enhanced resetCategoryForm() to properly reset editing state
- Clear currentEditCategoryId when cancelling
- Reset button text and form title to default state
- Add console logging for better debugging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-16 14:08:04 +09:00
parent d6a0656f12
commit 7796d9b7d5

View File

@@ -1367,6 +1367,22 @@ class AdminFileManager {
resetCategoryForm() {
document.getElementById('categoryName').value = '';
this.currentEditCategoryId = null;
// 버튼 텍스트를 기본 상태로 복원
const submitBtn = document.getElementById('addCategoryBtn');
if (submitBtn) {
submitBtn.textContent = ' 카테고리 추가';
submitBtn.disabled = false;
}
// 폼 제목을 기본 상태로 복원
const formTitle = document.querySelector('#categoryTab h2');
if (formTitle) {
formTitle.textContent = '🏷️ 카테고리 관리';
}
console.log('카테고리 폼이 초기화되었습니다.');
}
renderCategoryList() {