FAISP/src/main/resources/templates/publicBoard/reference/referenceEditModal.html

92 lines
4.9 KiB
HTML

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="referenceEditModalLabel" th:text="${info.publicKey eq null?'자료실 작성':'자료실 수정'}"></h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="referenceEditBody">
<form action="#" method="post" id="referenceEditForm">
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
<input type="hidden" name="publicType" id="publicType" th:value="${info.publicType}">
<input type="hidden" name="wrtOrgan" th:value="${info.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${info.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${info.wrtUserSeq}">
<input type="hidden" name="wrtUserGrd" th:value="${info.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${info.wrtUserNm}">
<div class="row mb-1">
<label for="wrtUserNm" class="col-sm-2 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-2">
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
<input type="text" class=" form-control form-control-sm" id="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
</th:block>
</th:block>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class=" form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
<div class="col-sm-auto my-auto">
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
</div>
<label for="organChk" class="col-sm-2 col-form-label col-form-label-sm text-left">소속관서에만 노출</label>
<!-- <div class="col-sm-2" >-->
<!-- <select class="form-select form-select-sm" name="tabStatusList" id="tabStatusList" style="font-size: 1rem">-->
<!-- <option value="">메뉴 선택-</option>-->
<!-- <th:block th:each="tab:${tab.get('RPC')}">-->
<!-- <option th:value="${tab.itemCd}" th:text="${tab.itemValue}"-->
<!-- th:selected=""></option>-->
<!-- </th:block>-->
<!-- </select>-->
<!-- </div>-->
<div class="col-sm-2">
<select class="form-select form-select-sm" name="tabStatus" id="tabStatus">
<option value="">분류 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('RPC')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}">
</option>
</th:block>
</select>
</div>
</div>
<div class="row mb-1">
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
<div class="col-sm-10">
<input type="text" class=" form-control form-control-sm" id="title" name="title" th:value="${info.title}" autocomplete="off">
</div>
</div>
<div class="row mb-1 justify-content-center">
<label for="content" class="col-sm-2 col-form-label col-form-label-sm text-center">내용</label>
<div class="col-sm-10">
<div id="editor"></div>
<textarea id="content" class="d-none" th:utext="${info.content}"></textarea>
</div>
</div>
<div class="row mb-3">
<label for="fileInputer" class="col-sm-2 col-form-label col-form-label-sm text-center">첨부파일</label>
<div class="col-sm-10" style="min-height: 70px;">
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
<th:block th:if="${#arrays.isEmpty(info.fileList)}">
<br>파일을 업로드 해주세요.
</th:block>
<th:block th:unless="${#arrays.isEmpty(info.fileList)}">
<div class='row-col-6' th:each="infoFile:${info.fileList}">
<span th:data-fileseq="${infoFile.fileSeq}" th:text="|${infoFile.origNm}.${infoFile.fileExtn} ${infoFile.fileSize}|"></span>
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
</div>
</th:block>
</div>
</div>
<input type="file" class="d-none" id="fileInputer" multiple>
</div>
</form>
</div>
<div class="modal-footer bg-light">
<!--
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
-->
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
</div>