You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
3.7 KiB
PHTML

2 years ago
<section class="main-inquiry" id="inquiry">
<div class="container">
<div class="row">
<div class="inquiry-message-box text-center">
방문해주셔서 감사합니다. 궁금하신 점이 있다면 언제든 문의 주세요.<br><br>
질문이 있거나 도움이 필요한 경우 아래 양식을 작성해주세요.<br>
빠른 시간내 답변 드리겠습니다.
2 years ago
</div>
<div class="inquiry-form">
<div class="row">
<div class="col-12 col-md-6 mx-auto">
<form id="writeForm" method="post" accept-charset="utf-8" action="{{ route('board.store', null, false) }}">
2 years ago
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<input type="hidden" name="mode" value="add" />
<input type="hidden" name="code" value="inquiry" />
<input type="hidden" name="board_id" value="3" />
<input type="hidden" name="uid" value="" />
<input type="hidden" name="category" value="" />
<input type="hidden" name="notice" value="0" />
2 years ago
<div class="row">
<div class="col-12">
<label for="name" class="form-label mb-3">이름 또는 업체명 *</label>
<input type="text" class="k-input" name="name" id="name" value="" required />
2 years ago
</div>
<div class="col-12">
2 years ago
<label for="email" class="form-label mb-3">이메일 주소 *</label>
<input type="text" class="k-input" name="email" id="email" value="" required />
2 years ago
</div>
<div class="col-12">
2 years ago
<label for="subject" class="form-label mb-3">제목 *</label>
<input type="text" class="k-input" name="subject" id="subject" value="" required />
2 years ago
</div>
</div>
2 years ago
<label for="content" class="form-label mb-3">내용 * </label>
<textarea name="content" id="content" rows="14" class="k-input k-text-area autosize" required></textarea>
2 years ago
<div class="text-center inquery-submit">
<button type="submit" class="more-button bg-white">등록하기 <i class="fa-solid fa-chevron-right"></i></button>
2 years ago
</div>
</form>
</div>
</div>
</div>
</div>
</div>
2 years ago
</section>
2 years ago
@push('scripts')
<script type="text/javascript">
$(document).ready(function() {
$('#writeForm').submit(function () {
if (!$("#name").checkEmpty('이름을 입력해 주세요.')) return false;
if (!$("#email").checkEmpty('연락처를 입력해 주세요.')) return false;
if (!$("#subject").checkEmpty('이메일을 입력해 주세요.')) return false;
if (!$("#content").checkEmpty('문의내용을 입력해 주세요.')) return false;
$.post($(this).attr('action'), $(this).serialize(), function(result) {
alert(result.message);
if (result.code == 'success') {
window.history.go(-1);
}
}).fail(function(result) {
console.log(result);
alert('문의 등록에 실패했습니다!!\n잠시 후 다시 시도해 주세요.');
});
return false;
});
});
</script>
@endpush