MailHeaderFooterDetailForm.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : MailHeaderFooterDetailForm.html
  7. * @desc : 메일헤더푸터 등록/수정 상세 팝업
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.02.02 csh9191 최초 작성
  15. * 1.1 2021.05.13 gagamel 전반적 수정
  16. *******************************************************************************
  17. -->
  18. <div class="modalPopup" data-width="1200" id="popupMailHeaderFooter">
  19. <div class="panelStyle">
  20. <!-- TITLE -->
  21. <div class="panelTitle">
  22. <strong th:text="${'메일헤더/푸터 ' + (mode == 'N' ? '등록' : '상세')}">메일헤더/푸터</strong>
  23. <button type="button" class="close" onclick="uifnPopupClose('popupMailHeaderFooter');"><em class="fa fa-times"></em></button>
  24. </div>
  25. <!-- //TITLE -->
  26. <!-- CONTENT -->
  27. <div class="panelContent">
  28. <form id="mailHeaderFooterForm" name="mailHeaderFooterForm" action="#" th:action="@{'/marketing/mail/headerfooter/save'}" th:method="post">
  29. <input type="hidden" name="mode" th:value="${mode}"/>
  30. <table class="frmStyle" aria-describedby="등록폼">
  31. <colgroup>
  32. <col style="width:10%;"/>
  33. <col/>
  34. </colgroup>
  35. <tbody>
  36. <tr>
  37. <th>헤더푸터번호</th>
  38. <td>
  39. <input type="text" name="mailhfSq" maxlength="20" placeholder="자동생성" readonly="readonly" th:value="${mailhfInfo?.mailhfSq}"/>
  40. </td>
  41. </tr>
  42. <tr>
  43. <th>헤더푸터구분<em class="required" title="필수"></em></th>
  44. <td>
  45. <label class="rdoBtn"><input type="radio" name="mailhfGb" value="H" th:checked="${mailhfInfo?.mailhfGb == null or mailhfInfo?.mailhfGb == 'H'}"/>헤더</label>
  46. <label class="rdoBtn"><input type="radio" name="mailhfGb" value="F" th:checked="${mailhfInfo?.mailhfGb == 'F'}"/>푸터</label>
  47. </td>
  48. </tr>
  49. <tr>
  50. <th>헤더푸터명<em class="required" title="필수"></em></th>
  51. <td>
  52. <input type="text" name="mailhfNm" maxlength="50" required="required" data-valid-name="헤더푸터명" th:value="${mailhfInfo?.mailhfNm}"/>
  53. </td>
  54. </tr>
  55. <tr>
  56. <th>내용<em class="required" title="필수"></em></th>
  57. <td>
  58. <textarea class="textareaR4" id="mailhfContent" name="mailhfContent" data-valid-name="내용" th:text="${mailhfInfo?.mailhfContent}"></textarea>
  59. </td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. </form>
  64. </div>
  65. <!-- //CONTENT -->
  66. <!-- 버튼 배치 영역 -->
  67. <ul class="panelBar">
  68. <li class="right">
  69. <button type="button" class="btn btn-info btn-lg" id="btnSaveMailHeaderFooter">저장</button>
  70. <button type="button" class="btn btn-danger btn-lg" id="btnDeleteMailHeaderFooter" th:if="${mode == 'U'}">삭제</button>
  71. </li>
  72. </ul>
  73. <!-- //버튼 배치 영역 -->
  74. </div>
  75. </div>
  76. <script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
  77. <script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2021053001"></script>
  78. <script th:inline="javascript">
  79. /*<![CDATA[*/
  80. // 저장
  81. $('#btnSaveMailHeaderFooter').on('click', function() {
  82. // 입력 값 체크
  83. if (!gagajf.validation('#mailHeaderFooterForm'))
  84. return false;
  85. if (gagajf.isNull($('#mailhfContent').val())) {
  86. mcxDialog.alert('내용을 입력해 주세요.');
  87. return false;
  88. }
  89. // 헤더푸터명 길이 제한 2자 이상 50자 미만
  90. var check = $('#mailHeaderFooterForm input[name=mailhfNm]').val();
  91. if (check.length < 2) {
  92. mcxDialog.alert('헤더푸터명은 2자 이상 50자 미만으로 입력해 주세요.');
  93. return false;
  94. }
  95. mcxDialog.confirm("저장하시겠습니까?", {
  96. cancelBtnText: "취소",
  97. sureBtnText: "확인",
  98. sureBtnClick: function() {
  99. gagajf.ajaxFormSubmit($('#mailHeaderFooterForm').prop('action'), '#mailHeaderFooterForm', function() {
  100. uifnPopupClose('popupMailHeaderFooter');
  101. $('#btnSearch').trigger('click');
  102. });
  103. }
  104. });
  105. });
  106. // 삭제
  107. $('#btnDeleteMailHeaderFooter').on('click', function() {
  108. mcxDialog.confirm("정말 삭제하시겠습니까? 삭제한 내용은 복원하실 수 없습니다.", {
  109. cancelBtnText: "취소",
  110. sureBtnText: "확인",
  111. sureBtnClick: function() {
  112. var actionUrl = '/marketing/mail/headerfooter/delete/' + $('#mailHeaderFooterForm input[name=mailhfSq]').val();
  113. gagajf.ajaxFormSubmit(actionUrl, '#mailHeaderFooterForm', function() {
  114. uifnPopupClose('popupMailHeaderFooter');
  115. $('#btnSearch').trigger('click');
  116. });
  117. }
  118. });
  119. });
  120. $(document).ready(function() {
  121. // Create a summernote
  122. let snOptions = gagaSn.getToolbarOptions();
  123. gagaSn.createSummernote(snOptions, '#mailhfContent');
  124. });
  125. /*]]>*/
  126. </script>
  127. </html>