|
|
@@ -41,7 +41,7 @@
|
|
|
<div class="sec_body">
|
|
|
<div class="t_info blt_dot mb15 light">문의를 남겨 주시면 24시간 이내(토/일/공휴일 제외)에 답변 드릴 수 있도록 최선을 다 하겠습니다.</div>
|
|
|
|
|
|
- <form class="form_wrap" role="form" name="qnaForm" id="qnaForm" th:action="@{'/onetoone/qna/create'}" method="post">
|
|
|
+ <form class="form_wrap" role="form" name="qnaForm" id="qnaForm" th:action="@{'/callcenter/onetoone/qna/create'}" method="post">
|
|
|
<div class="form_field">
|
|
|
<label class="ui_col_2 input_label">문의 유형</label>
|
|
|
<div class="ui_col_10 form_full">
|
|
|
@@ -82,14 +82,14 @@
|
|
|
<!-- 이미지첨부 -->
|
|
|
<div class="form_field">
|
|
|
<div class="imgUpload">
|
|
|
- <label for="fileAdd" class="fileAdd">업로드</label>
|
|
|
+ <label for="fileAdd" class="fileAdd">첫번째업로드</label>
|
|
|
<input type="file" id="fileAdd" name="file1"/>
|
|
|
<input type="hidden" name="fileAddOrgFileNm"/>
|
|
|
<input type="hidden" name="fileAddSysFileNm"/>
|
|
|
</div>
|
|
|
<div class="imgUpload">
|
|
|
- <label for="fileAdd" class="fileAdd">업로드</label>
|
|
|
- <input type="file" id="file2" name="file2"/>
|
|
|
+ <label for="fileAdds" class="fileAdd">두번째업로드</label>
|
|
|
+ <input type="file" id="fileAdds" name="file2"/>
|
|
|
<input type="hidden" name="file2OrgFileNm"/>
|
|
|
<input type="hidden" name="file2SysFileNm"/>
|
|
|
</div>
|
|
|
@@ -106,20 +106,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form_field">
|
|
|
- <label class="ui_col_2 input_label">휴대폰</label>
|
|
|
- <div class="ui_col_10 cellphone">
|
|
|
+ <label class="ui_col_2 input_label">알림톡 수신 여부</label>
|
|
|
+ <div class="ui_col_10 push_agree">
|
|
|
<div class="input_wrap">
|
|
|
- <input type="text" class="form_control" name="cellPhnno" maxlength="13" placeholder="휴대폰 번호를 입력해 주세요." required="required" data-valid-type="cellPhone" data-valid-name="휴대폰번호"/> <!-- 잘못 입력시 클래스명 : err 추가 -->
|
|
|
- <!-- 알림 신청 체크박스(선택 _ 기본값) -->
|
|
|
- <div class="ck_box">
|
|
|
- <input type="hidden" name="smsReqYn"/>
|
|
|
- <input type="checkbox" name="chkSmsReqYn" value="Y" checked="checked"/>
|
|
|
- <label for="chkSmsReqYn"><span>알림 신청</span></label>
|
|
|
+ <div>
|
|
|
+ <input type="radio" name="smsReqYn" id="smsReqYn1" value="Y" checked="checked"><label for="smsReqYn1"><span>수신</span></label>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <input type="radio" name="smsReqYn" id="smsReqYn2" value="N"><label for="smsReqYn2"><span>미수신</span></label>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="help_block" style="display: none;" id="divCellPhnno">
|
|
|
- <p class="t_err">휴대폰 번호를 형식에 맞게 정확히 입력해주세요.</p>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
@@ -157,7 +153,7 @@
|
|
|
|
|
|
// 파일첨부 선택 시
|
|
|
$('#fileAdd').on('change', function() { fnChooseFile(this); });
|
|
|
- $('#file2').on('change', function() { fnChooseFile(this); });
|
|
|
+ $('#fileAdds').on('change', function() { fnChooseFile(this); });
|
|
|
|
|
|
var fnChooseFile = function(obj) {
|
|
|
// multiple 속성이 있으면 files에는 다수의 객체가 할당됨
|
|
|
@@ -166,16 +162,26 @@
|
|
|
if (!gagajf.isNull(file.name)) {
|
|
|
var extension = "\.(jpg|jpeg|png)$";
|
|
|
if (!(new RegExp(extension, "i")).test(file.name)) {
|
|
|
- mcxDialog.alert('이미지는 [jpg, jpeg, png] 파일만 가능합니다.');
|
|
|
+ mcxDialog.alertC('이미지는 [jpg, jpeg, png] 파일만 가능합니다.', {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $(obj).parent('.imgUpload').find('.removes').trigger('click');
|
|
|
+ }
|
|
|
+ });
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (!gagajf.isNull(file.size) && Number(file.size) > 20 * 1000000) {
|
|
|
- mcxDialog.alert('이미지는 최대 20MB 이하 파일만 가능합니다.');
|
|
|
+ mcxDialog.alertC('이미지는 최대 20MB 이하 파일만 가능합니다.', {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $(obj).parent('.imgUpload').find('.removes').trigger('click');
|
|
|
+ }
|
|
|
+ });
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 파일 업로드
|
|
|
gagajf.ajaxFileUpload('/common/file/upload?subDir=/counsel'
|
|
|
, file
|
|
|
@@ -193,28 +199,12 @@
|
|
|
if (!gagajf.validation('#qnaForm'))
|
|
|
return false;
|
|
|
|
|
|
- if (!gagajf.isNull($('#qnaForm input[name=cellPhnno]').val())) {
|
|
|
- let regexp = /^(01(?:0|1|[6-9])-(?:\d{3}|\d{4})-\d{4})$/;
|
|
|
- if (!regexp.test($('#qnaForm input[name=cellPhnno]').val())) {
|
|
|
- $('#qnaForm input[name=cellPhnno]').addClass('err');
|
|
|
- $('#divCellPhnno').show();
|
|
|
- $('#qnaForm input[name=cellPhnno]').select();
|
|
|
- $('#qnaForm input[name=cellPhnno]').focus();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- $('#qnaForm input[name=cellPhnno]').removeClass('err');
|
|
|
- $('#divCellPhnno').hide();
|
|
|
-
|
|
|
- $('#qnaForm input[name=smsReqYn]').val($('#qnaForm input:checkbox[name=chkSmsReqYn]').is(":checked") ? 'Y' : 'N');
|
|
|
-
|
|
|
mcxDialog.confirm("저장하시겠습니까?", {
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
gagajf.ajaxFormSubmit($('#qnaForm').prop('action')
|
|
|
- , $('#qnaForm')
|
|
|
+ , '#qnaForm'
|
|
|
, function() {
|
|
|
cfnGoToPage(_PAGE_ONETOONE_QNA);
|
|
|
}
|