first commit

This commit is contained in:
peregr1nus
2025-12-10 13:27:48 +09:00
commit 8019a7e4ba
19 changed files with 2028 additions and 0 deletions

29
templates/auth.html Normal file
View File

@@ -0,0 +1,29 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="auth-container">
<h2>접근 인증</h2>
<p class="auth-description">이 서비스는 인증키가 있는 사용자만 이용할 수 있습니다.</p>
<p class="auth-description">인증키를 입력해주세요.</p>
{% if error %}
<div class="error-message">
{{ error }}
</div>
{% endif %}
<form method="POST" class="auth-form">
<div class="form-group">
<label for="access_key">인증키 *</label>
<input type="text" id="access_key" name="access_key" required autofocus placeholder="인증키를 입력하세요">
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">인증하기</button>
</div>
</form>
</div>
</div>
{% endblock %}

34
templates/base.html Normal file
View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>이단 탈퇴자 교리점검표</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<div class="container">
<header>
<h1>이단 탈퇴자 교리점검표</h1>
<p class="subtitle">기독교대한감리회 신앙고백에 따른 교리 점검</p>
{% if session.get('authenticated') %}
<div class="header-actions">
<a href="{{ url_for('logout') }}" class="logout-link">로그아웃</a>
</div>
{% endif %}
</header>
<main>
{% block content %}{% endblock %}
</main>
<footer>
<p>&copy; 2024 기독교대한감리회. All rights reserved.</p>
</footer>
</div>
<script src="{{ url_for('static', filename='script.js') }}"></script>
{% block scripts %}{% endblock %}
</body>
</html>

17
templates/complete.html Normal file
View File

@@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="complete-message">
<div class="checkmark"></div>
<h2>제출이 완료되었습니다!</h2>
<p>교리점검표가 성공적으로 제출되었습니다.</p>
<p>담당자가 검토 후 연락드리겠습니다.</p>
<div class="form-actions">
<button type="button" class="btn btn-primary" onclick="window.location.href='/'">처음으로</button>
</div>
</div>
</div>
{% endblock %}

43
templates/index.html Normal file
View File

@@ -0,0 +1,43 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="welcome-message">
<h2>환영합니다</h2>
<p>이단 탈퇴자를 위한 교리점검표 설문에 오신 것을 환영합니다.</p>
<p>기독교대한감리회 신앙고백에 따른 교리 점검을 진행합니다.</p>
<div class="info-box description-box">
<p class="description-text">총 4개의 섹션으로 되어 있습니다.</p>
<ol class="section-list">
<li>감리회 신앙고백 점검</li>
<li>이단 일반 점검</li>
<li>이단 상세 점검</li>
<li>상담 소감문</li>
</ol>
<p class="description-note">
본 점검표는 평가의 목적이 아니며, 점수를 매기지도 않습니다.
10주 양육에 들어가시기 전에 기본교리를 스스로 점검하는 차원에서 진행하는 것이니
부담없이 임해 주시면 감사하겠습니다.
</p>
</div>
<div class="info-box">
<h3>설문 안내</h3>
<ul>
<li>총 5단계로 구성되어 있습니다</li>
<li>각 단계는 약 5-10분 정도 소요됩니다</li>
<li>진행 중 이전 단계로 돌아갈 수 있습니다</li>
<li>모든 항목은 필수 입력 사항입니다</li>
</ul>
</div>
<div class="form-actions">
<button type="button" class="btn btn-primary" onclick="window.location.href='/step1'">설문 시작하기</button>
</div>
</div>
</div>
{% endblock %}

81
templates/step1.html Normal file
View File

@@ -0,0 +1,81 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="progress-bar">
<div class="progress-step active">1</div>
<div class="progress-line"></div>
<div class="progress-step">2</div>
<div class="progress-line"></div>
<div class="progress-step">3</div>
<div class="progress-line"></div>
<div class="progress-step">4</div>
<div class="progress-line"></div>
<div class="progress-step">5</div>
</div>
<h2>1단계: 기본 정보 입력</h2>
<form id="step1Form" class="form-container">
<div class="form-group">
<label for="name">이름 *</label>
<input type="text" id="name" name="name" required>
</div>
<div class="form-group">
<label for="district">교구 *</label>
<select id="district" name="district" required>
<option value="">선택하세요</option>
{% for district in districts %}
<option value="{{ district }}">{{ district }}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="cult">이단교단 *</label>
<select id="cult" name="cult" required>
<option value="">선택하세요</option>
{% for cult in cults %}
<option value="{{ cult }}">{{ cult }}</option>
{% endfor %}
</select>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">다음 단계</button>
</div>
</form>
</div>
{% endblock %}
{% block scripts %}
<script>
document.getElementById('step1Form').addEventListener('submit', async function(e) {
e.preventDefault();
const formData = new FormData(this);
const data = Object.fromEntries(formData);
try {
const response = await fetch('/step1', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
});
const result = await response.json();
if (result.success) {
window.location.href = result.next_step;
} else {
alert('오류가 발생했습니다: ' + (result.message || '알 수 없는 오류'));
}
} catch (error) {
alert('오류가 발생했습니다: ' + error.message);
}
});
</script>
{% endblock %}

145
templates/step2.html Normal file
View File

@@ -0,0 +1,145 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="progress-bar">
<div class="progress-step completed">1</div>
<div class="progress-line"></div>
<div class="progress-step active">2</div>
<div class="progress-line"></div>
<div class="progress-step">3</div>
<div class="progress-line"></div>
<div class="progress-step">4</div>
<div class="progress-line"></div>
<div class="progress-step">5</div>
</div>
<h2>2단계: 기독교대한감리회 신앙고백 교리 점검</h2>
<form id="step2Form" class="form-container">
<div class="doctrine-section">
<div class="form-group">
<label>1. 우주 만물을 창조하시고 섭리하시며 주관하시는 거룩하시고 자비하시며 오직 한 분이신 아버지 하나님을 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q1_father_god" value="예" required></label>
<label><input type="radio" name="q1_father_god" value="아니오"> 아니오</label>
<label><input type="radio" name="q1_father_god" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>2. 말씀이 육신이 되어 우리 가운데 오셔서 하나님의 나라를 선포하시고 십자가에 달려 죽으셨다가 부활승천 하심으로 대속자가 되시고 구세주가 되시는 예수 그리스도를 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q2_jesus_christ" value="예" required></label>
<label><input type="radio" name="q2_jesus_christ" value="아니오"> 아니오</label>
<label><input type="radio" name="q2_jesus_christ" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>3. 우리와 함께 계셔서 우리를 거듭나게 하시고 거룩하게 하시며 완전하게 하시며 위안과 힘이 되시는 성령을 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q3_holy_spirit" value="예" required></label>
<label><input type="radio" name="q3_holy_spirit" value="아니오"> 아니오</label>
<label><input type="radio" name="q3_holy_spirit" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>4. 성령의 감동으로 기록된 하나님의 말씀인 성경이 구원에 이르는 도리와 신앙생활에 충분한 표준이 됨을 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q4_bible" value="예" required></label>
<label><input type="radio" name="q4_bible" value="아니오"> 아니오</label>
<label><input type="radio" name="q4_bible" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>5. 하나님의 은혜로 믿음을 통해 죄사함을 받아 거룩해지며 하나님의 구원의 역사에 동참하도록 부름받음을 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q5_salvation" value="예" required></label>
<label><input type="radio" name="q5_salvation" value="아니오"> 아니오</label>
<label><input type="radio" name="q5_salvation" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>6. 예배와 친교, 교육과 봉사, 전도와 선교를 위해 하나가 된 그리스도의 몸인 교회를 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q6_church" value="예" required></label>
<label><input type="radio" name="q6_church" value="아니오"> 아니오</label>
<label><input type="radio" name="q6_church" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>7. 만민에게 복음을 전파함으로 하나님의 정의와 사랑을 나누고 평화의 세계를 이루는 모든 사람들이 하나님 앞에 형제됨을 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q7_mission" value="예" required></label>
<label><input type="radio" name="q7_mission" value="아니오"> 아니오</label>
<label><input type="radio" name="q7_mission" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>8. 예수 그리스도의 재림과 심판 우리 몸의 부활과 영생 그리고 의의 최후 승리와 영원한 하나님 나라를 믿습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q8_second_coming" value="예" required></label>
<label><input type="radio" name="q8_second_coming" value="아니오"> 아니오</label>
<label><input type="radio" name="q8_second_coming" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="form-actions">
<button type="button" class="btn btn-secondary" onclick="window.location.href='/step1'">이전</button>
<button type="submit" class="btn btn-primary">다음 단계</button>
</div>
</form>
</div>
{% endblock %}
{% block scripts %}
<script>
document.getElementById('step2Form').addEventListener('submit', async function(e) {
e.preventDefault();
const formData = new FormData(this);
const data = Object.fromEntries(formData);
try {
const response = await fetch('/step2', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
});
const result = await response.json();
if (result.success) {
window.location.href = result.next_step;
} else {
alert('오류가 발생했습니다: ' + (result.message || '알 수 없는 오류'));
}
} catch (error) {
alert('오류가 발생했습니다: ' + error.message);
}
});
</script>
{% endblock %}

247
templates/step3.html Normal file
View File

@@ -0,0 +1,247 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="progress-bar">
<div class="progress-step completed">1</div>
<div class="progress-line"></div>
<div class="progress-step completed">2</div>
<div class="progress-line"></div>
<div class="progress-step active">3</div>
<div class="progress-line"></div>
<div class="progress-step">4</div>
<div class="progress-line"></div>
<div class="progress-step">5</div>
</div>
<h2>3단계: 이단 일반 교리 점검</h2>
<form id="step3Form" class="form-container">
<div class="doctrine-section">
<div class="form-group">
<label>1. 우리의 구원을 위해서 성경 이외의 가르침이 필요하다고 생각하십니까?</label>
<div class="radio-group">
<label><input type="radio" name="q1_additional_teaching" value="예" required></label>
<label><input type="radio" name="q1_additional_teaching" value="아니오"> 아니오</label>
<label><input type="radio" name="q1_additional_teaching" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>2. 어떤 특별한 성경 번역본만이 진리이고 다른 번역본에는 문제가 있다고 생각하십니까?</label>
<div class="radio-group">
<label><input type="radio" name="q2_special_bible" value="예" required></label>
<label><input type="radio" name="q2_special_bible" value="아니오"> 아니오</label>
<label><input type="radio" name="q2_special_bible" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>3. 성경의 진리 가운데 그동안 숨겨져 온 부분이 있고, 그 내용을 계시 받은 특별한 사람이 있다고 믿고 있습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q3_hidden_truth" value="예" required></label>
<label><input type="radio" name="q3_hidden_truth" value="아니오"> 아니오</label>
<label><input type="radio" name="q3_hidden_truth" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>4. 성경을 해석하기 위해서 비유가 매우 중요하다고 생각하십니까? 비유를 깨닫기 위해서 별도의 성경공부가 필요하다고 생각하십니까?</label>
<div class="radio-group">
<label><input type="radio" name="q4_parable" value="예" required></label>
<label><input type="radio" name="q4_parable" value="아니오"> 아니오</label>
<label><input type="radio" name="q4_parable" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>5. 성경의 내용들 가운데 모든 것이 서로 짝이 있습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q5_pairs" value="예" required></label>
<label><input type="radio" name="q5_pairs" value="아니오"> 아니오</label>
<label><input type="radio" name="q5_pairs" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>6. 구세주 되시는 예수님은 모든 인류의 구원을 위해서 죽으셨는데 아직도 특별한 사람을 대리자로 세워서 구원사역을 이루실 필요가 있습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q6_mediator" value="예" required></label>
<label><input type="radio" name="q6_mediator" value="아니오"> 아니오</label>
<label><input type="radio" name="q6_mediator" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>7. 나는 죄인이라고 생각하십니까? 나의 구원은 확실하십니까? 그 이유는 무엇입니까? (이 문항은 아래 기타의견란에 문항번호를 적은 후 서술해 주세요)</label>
<p class="help-text">※ 이 문항은 아래 "기타의견"란에 "7번: "으로 시작하여 답변해주세요.</p>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>8. 우리는 구원 받았을 때 회개했습니다. 그리고 이후에 다시 회개가 필요합니까?</label>
<div class="radio-group">
<label><input type="radio" name="q8_repentance" value="예" required></label>
<label><input type="radio" name="q8_repentance" value="아니오"> 아니오</label>
<label><input type="radio" name="q8_repentance" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>9. 우리가 주일을 성수하는 것은 성경적입니까?</label>
<div class="radio-group">
<label><input type="radio" name="q9_sunday" value="예" required></label>
<label><input type="radio" name="q9_sunday" value="아니오"> 아니오</label>
<label><input type="radio" name="q9_sunday" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>10. 안식일을 지키는 것이 구원의 조건입니까?</label>
<div class="radio-group">
<label><input type="radio" name="q10_sabbath" value="예" required></label>
<label><input type="radio" name="q10_sabbath" value="아니오"> 아니오</label>
<label><input type="radio" name="q10_sabbath" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>11. 성탄절은 예수님이 탄생한 날입니다. 12월 25일에 기념해도 되는 겁니까?</label>
<div class="radio-group">
<label><input type="radio" name="q11_christmas" value="예" required></label>
<label><input type="radio" name="q11_christmas" value="아니오"> 아니오</label>
<label><input type="radio" name="q11_christmas" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>12. 예수 그리스도의 재림의 때가 구체적으로 언제인지 정해져 있다고 믿으십니까?</label>
<div class="radio-group">
<label><input type="radio" name="q12_second_coming_date" value="예" required></label>
<label><input type="radio" name="q12_second_coming_date" value="아니오"> 아니오</label>
<label><input type="radio" name="q12_second_coming_date" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>13. 성경에서 말하는 동방은 한국을 말하는 것이 맞습니까?</label>
<div class="radio-group">
<label><input type="radio" name="q13_east" value="예" required></label>
<label><input type="radio" name="q13_east" value="아니오"> 아니오</label>
<label><input type="radio" name="q13_east" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>14. 당신의 종교적 신념을 지키는 것이 가정을 지키는 것보다 더 중요합니까?</label>
<div class="radio-group">
<label><input type="radio" name="q14_family" value="예" required></label>
<label><input type="radio" name="q14_family" value="아니오"> 아니오</label>
<label><input type="radio" name="q14_family" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>15. 당신이 믿는 바를 전하고 사명을 감당하기 위해서 모략을 사용하는 것이 바람직합니까?</label>
<div class="radio-group">
<label><input type="radio" name="q15_deception" value="예" required></label>
<label><input type="radio" name="q15_deception" value="아니오"> 아니오</label>
<label><input type="radio" name="q15_deception" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>16. 주일성수, 새벽기도, 십일조 등 기존의 교회제도는 율법의 산물이기에 지킬 필요가 없다고 생각하십니까?</label>
<div class="radio-group">
<label><input type="radio" name="q16_church_system" value="예" required></label>
<label><input type="radio" name="q16_church_system" value="아니오"> 아니오</label>
<label><input type="radio" name="q16_church_system" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label>17. 사람이 질병에 걸리는 이유는 귀신의 영향 때문입니까?</label>
<div class="radio-group">
<label><input type="radio" name="q17_disease" value="예" required></label>
<label><input type="radio" name="q17_disease" value="아니오"> 아니오</label>
<label><input type="radio" name="q17_disease" value="모르겠습니다"> 모르겠습니다</label>
</div>
</div>
</div>
<div class="doctrine-section">
<div class="form-group">
<label for="other_opinions">기타의견 (7번 문항 답변 포함)</label>
<textarea id="other_opinions" name="other_opinions" rows="5" placeholder="7번 문항 답변 및 기타 의견을 작성해주세요. 7번 문항은 '7번: '으로 시작하여 답변해주세요."></textarea>
</div>
</div>
<div class="form-actions">
<button type="button" class="btn btn-secondary" onclick="window.location.href='/step2'">이전</button>
<button type="submit" class="btn btn-primary">다음 단계</button>
</div>
</form>
</div>
{% endblock %}
{% block scripts %}
<script>
document.getElementById('step3Form').addEventListener('submit', async function(e) {
e.preventDefault();
const formData = new FormData(this);
const data = Object.fromEntries(formData);
try {
const response = await fetch('/step3', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
});
const result = await response.json();
if (result.success) {
window.location.href = result.next_step;
} else {
alert('오류가 발생했습니다: ' + (result.message || '알 수 없는 오류'));
}
} catch (error) {
alert('오류가 발생했습니다: ' + error.message);
}
});
</script>
{% endblock %}

78
templates/step4.html Normal file
View File

@@ -0,0 +1,78 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="progress-bar">
<div class="progress-step completed">1</div>
<div class="progress-line"></div>
<div class="progress-step completed">2</div>
<div class="progress-line"></div>
<div class="progress-step completed">3</div>
<div class="progress-line"></div>
<div class="progress-step active">4</div>
<div class="progress-line"></div>
<div class="progress-step">5</div>
</div>
<h2>4단계: 이단 상세 점검</h2>
<p class="cult-name">출신 이단: <strong>{{ cult_name }}</strong></p>
<form id="step4Form" class="form-container">
{% for question in questions %}
<div class="doctrine-section">
<div class="form-group">
<label>{{ question }}</label>
{% if '기타의견란' in question or '기타의견' in question %}
<p class="help-text">※ 이 문항은 아래 "기타의견"란에 "{{ loop.index }}번: "으로 시작하여 답변해주세요.</p>
{% else %}
<textarea name="q{{ loop.index }}" rows="4" required placeholder="답변을 작성해주세요"></textarea>
{% endif %}
</div>
</div>
{% endfor %}
<div class="doctrine-section">
<div class="form-group">
<label for="other_opinions">기타의견 (3번 문항 답변 포함)</label>
<textarea id="other_opinions" name="other_opinions" rows="5" placeholder="3번 문항 답변 및 기타 의견을 작성해주세요. 3번 문항은 '3번: '으로 시작하여 답변해주세요."></textarea>
</div>
</div>
<div class="form-actions">
<button type="button" class="btn btn-secondary" onclick="window.location.href='/step3'">이전</button>
<button type="submit" class="btn btn-primary">다음 단계</button>
</div>
</form>
</div>
{% endblock %}
{% block scripts %}
<script>
document.getElementById('step4Form').addEventListener('submit', async function(e) {
e.preventDefault();
const formData = new FormData(this);
const data = Object.fromEntries(formData);
try {
const response = await fetch('/step4', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
});
const result = await response.json();
if (result.success) {
window.location.href = result.next_step;
} else {
alert('오류가 발생했습니다: ' + (result.message || '알 수 없는 오류'));
}
} catch (error) {
alert('오류가 발생했습니다: ' + error.message);
}
});
</script>
{% endblock %}

79
templates/step5.html Normal file
View File

@@ -0,0 +1,79 @@
{% extends "base.html" %}
{% block content %}
<div class="step-container">
<div class="progress-bar">
<div class="progress-step completed">1</div>
<div class="progress-line"></div>
<div class="progress-step completed">2</div>
<div class="progress-line"></div>
<div class="progress-step completed">3</div>
<div class="progress-line"></div>
<div class="progress-step completed">4</div>
<div class="progress-line"></div>
<div class="progress-step active">5</div>
</div>
<h2>5단계: 간증문 입력</h2>
<form id="step5Form" class="form-container">
<div class="form-group">
<label for="testimony">간증문 *</label>
<p class="help-text">이단에서 탈퇴하고 정통 기독교로 돌아온 과정과 소감을 자유롭게 작성해주세요.</p>
<textarea id="testimony" name="content" rows="15" required placeholder="간증문을 작성해주세요..."></textarea>
</div>
<div class="form-actions">
<button type="button" class="btn btn-secondary" onclick="window.location.href='/step4'">이전</button>
<button type="submit" class="btn btn-primary">제출하기</button>
</div>
</form>
</div>
<div id="loadingModal" class="modal" style="display: none;">
<div class="modal-content">
<div class="spinner"></div>
<p>문서를 생성하고 업로드하는 중입니다...</p>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
document.getElementById('step5Form').addEventListener('submit', async function(e) {
e.preventDefault();
const formData = new FormData(this);
const data = Object.fromEntries(formData);
// 로딩 모달 표시
document.getElementById('loadingModal').style.display = 'flex';
try {
const response = await fetch('/step5', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
});
const result = await response.json();
// 로딩 모달 숨기기
document.getElementById('loadingModal').style.display = 'none';
if (result.success) {
alert(result.message);
window.location.href = '/complete';
} else {
alert('오류가 발생했습니다: ' + (result.message || '알 수 없는 오류'));
}
} catch (error) {
document.getElementById('loadingModal').style.display = 'none';
alert('오류가 발생했습니다: ' + error.message);
}
});
</script>
{% endblock %}