OneToOneQnaRegisterFormWeb.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org"
  4. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  5. layout:decorator="web/common/layout/CallcenterLayoutWeb">
  6. <!--
  7. *******************************************************************************
  8. * @source : OneToOneQnaRegisterFormWeb.html
  9. * @desc : 1:1문의 등록 Page
  10. *============================================================================
  11. * STYLE24
  12. * Copyright(C) 2020 TSIT, All rights reserved.
  13. *============================================================================
  14. * VER DATE AUTHOR DESCRIPTION
  15. * === =========== ========== =============================================
  16. * 1.0 2021.02.19 gagamel 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <div id="container" class="container cs">
  22. <div class="breadcrumb">
  23. <ul>
  24. <li class="bread_home"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
  25. <li class="bread_2depth"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_FAQ);">고객센터</a></li>
  26. <li class="bread_3depth">1:1문의</li>
  27. </ul>
  28. </div>
  29. <div class="wrap">
  30. <div class="content contactUs_my">
  31. <div class="cont_body">
  32. <!-- CONT-BODY -->
  33. <div class="lnb" id="callcenterLnb">
  34. </div>
  35. <div class="cont">
  36. <div>
  37. <div class="sec_head">
  38. <h3>1:1 문의</h3>
  39. </div>
  40. <div class="sec_body">
  41. <div class="t_info blt_dot mb15 light">문의를 남겨 주시면 24시간 이내(토/일/공휴일 제외)에 답변 드릴 수 있도록 최선을 다 하겠습니다.</div>
  42. <form class="form_wrap" role="form" name="qnaForm" id="qnaForm" th:action="@{'/callcenter/onetoone/qna/create'}" method="post">
  43. <div class="form_field">
  44. <label class="ui_col_2 input_label">문의 유형</label>
  45. <div class="ui_col_10 form_full">
  46. <div class="input_wrap">
  47. <select name="counselClsf" required="required" data-valid-name="문의유형">
  48. <option value="">유형을 선택해 주세요</option>
  49. <option th:if="${counselClsfList}" th:each="oneData, status : ${counselClsfList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  50. </select>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="form_field">
  55. <label class="ui_col_2 input_label">제목</label>
  56. <div class="ui_col_10 form_full">
  57. <div class="input_wrap">
  58. <span class="input_group_addon"><span class="ico"></span></span>
  59. <input type="text" class="form_control" placeholder="30자 내외로 작성해주세요" maxlength="30" name="questTitle" required="required" data-valid-name="제목"/>
  60. </div>
  61. <!-- 숫자, 특수문자, 불완성형 한글 제외하여 입력 -->
  62. </div>
  63. </div>
  64. <div class="form_field">
  65. <label class="ui_col_2 input_label">내용</label>
  66. <div class="ui_col_10 form_full">
  67. <div class="input_wrap">
  68. <textarea class="doc_contactus" name="questContent" id="questContent" cols="30" rows="10" style="resize: none;" required="required" data-valid-name="내용"></textarea>
  69. <p class="txt_cnt">
  70. <span id="contactus_cnt" class="contactus_cnt">(<em class="c_primary">0</em>/500자)</span>
  71. </p>
  72. </div>
  73. <!-- 특수문자 : \ / : < > 사용 불가 > 입력 시, “특수문자 \ / : < > 는 사용할 수 없습니다.” 얼럿 호출 스크립트 입력 불가능 -->
  74. </div>
  75. </div>
  76. <div class="form_field">
  77. <label class="ui_col_2 input_label">첨부이미지</label>
  78. <div class="ui_col_10 form_full">
  79. <div class="input_wrap">
  80. <!-- 이미지첨부 -->
  81. <div class="form_field">
  82. <div class="imgUpload">
  83. <label for="fileAdd" class="fileAdd">첫번째업로드</label>
  84. <input type="file" id="fileAdd" name="file1"/>
  85. <input type="hidden" name="orgFileNmArr" id="file1OrgFileNm"/>
  86. <input type="hidden" name="sysFileNmArr" id="file1SysFileNm"/>
  87. </div>
  88. <div class="imgUpload">
  89. <label for="fileAdds" class="fileAdd">두번째업로드</label>
  90. <input type="file" id="fileAdds" name="file2"/>
  91. <input type="hidden" name="orgFileNmArr" id="file2OrgFileNm"/>
  92. <input type="hidden" name="sysFileNmArr" id="file2SysFileNm"/>
  93. </div>
  94. </div>
  95. <!-- //이미지첨부 -->
  96. <div class="info_addfile">
  97. <ul>
  98. <li>- 사진은 최대 20MB 이하의 JPG,PNG,GIF <span>파일2장까지 첨부 가능</span>합니다.</li>
  99. <li>- 첨부된 사진은 문의 외의 목적으로는 사용되지 않습니다.</li>
  100. </ul>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="form_field">
  106. <label class="ui_col_2 input_label">알림톡 수신 여부</label>
  107. <div class="ui_col_10 push_agree">
  108. <div>
  109. <input type="radio" name="smsReqYn" id="smsReqYn1" value="Y" checked="checked"><label for="smsReqYn1"><span>수신</span></label>
  110. </div>
  111. <div>
  112. <input type="radio" name="smsReqYn" id="smsReqYn2" value="N"><label for="smsReqYn2"><span>미수신</span></label>
  113. </div>
  114. </div>
  115. </div>
  116. </form>
  117. </div>
  118. <div class="sec_foot t_c">
  119. <button type="button" class="btn btn_default btn_md" onclick="history.back(-1);"><span>취소</span></button>
  120. <button type="button" class="btn btn_dark btn_md" id="btnSaveQna"><span>확인</span></button>
  121. </div>
  122. </div>
  123. </div>
  124. <!-- // CONT-BODY -->
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <!-- // container -->
  130. <script th:inline="javascript">
  131. /*<![CDATA[*/
  132. $(document).ready(function() {
  133. // 고객센터 LNB 설정
  134. fnSetCallcenterLnb(2);
  135. });
  136. // text_area
  137. $('.doc_contactus').keyup(function (e) {
  138. var content = $(this).val();
  139. $('#contactus_cnt').html("(<em class='c_primary'>" + content.length + "</em>/500자)");
  140. if (content.length > 500) {
  141. alert("최대 500자까지 입력 가능합니다.");
  142. $(this).val(content.substring(0, 500));
  143. $('#contactus_cnt').html("(<em class='c_primary'>500</em>/500자)");
  144. }
  145. });
  146. // 파일첨부 선택 시
  147. $('#fileAdd').on('change', function() { fnChooseFile(this); });
  148. $('#fileAdds').on('change', function() { fnChooseFile(this); });
  149. var fnChooseFile = function(obj) {
  150. // multiple 속성이 있으면 files에는 다수의 객체가 할당됨
  151. var file = obj.files[0];
  152. if (!gagajf.isNull(file.name)) {
  153. var extension = "\.(jpg|jpeg|png)$";
  154. if (!(new RegExp(extension, "i")).test(file.name)) {
  155. mcxDialog.alertC('이미지는 [jpg, jpeg, png] 파일만 가능합니다.', {
  156. sureBtnText: "확인",
  157. sureBtnClick: function() {
  158. $(obj).parent('.imgUpload').find('.removes').trigger('click');
  159. }
  160. });
  161. return false;
  162. }
  163. }
  164. if (!gagajf.isNull(file.size) && Number(file.size) > 20 * 1000000) {
  165. mcxDialog.alertC('이미지는 최대 20MB 이하 파일만 가능합니다.', {
  166. sureBtnText: "확인",
  167. sureBtnClick: function() {
  168. $(obj).parent('.imgUpload').find('.removes').trigger('click');
  169. }
  170. });
  171. return false;
  172. }
  173. // 파일 업로드
  174. gagajf.ajaxFileUpload('/common/file/upload?subDir=/counsel'
  175. , file
  176. , function(result) {
  177. // 업로드한 파일명 설정
  178. $('input[id=' + obj.name + 'OrgFileNm]').val(result.oldFileName);
  179. $('input[id=' + obj.name + 'SysFileNm]').val(result.newFileName);
  180. }
  181. );
  182. }
  183. // 저장
  184. $('#btnSaveQna').on('click', function() {
  185. // 입력 값 체크
  186. if (!gagajf.validation('#qnaForm'))
  187. return false;
  188. if($('#questContent').val().length<20){
  189. mcxDialog.alert("문의내용을 20자 이상 입력해주세요.");
  190. return;
  191. }
  192. mcxDialog.confirm("저장하시겠습니까?", {
  193. cancelBtnText: "취소",
  194. sureBtnText: "확인",
  195. sureBtnClick: function() {
  196. gagajf.ajaxFormSubmit($('#qnaForm').prop('action')
  197. , '#qnaForm'
  198. , function() {
  199. cfnGoToPage(_PAGE_ONETOONE_QNA);
  200. }
  201. );
  202. }
  203. });
  204. });
  205. /*]]>*/
  206. </script>
  207. </th:block>
  208. </body>
  209. </html>