FAISP/src/main/resources/templates/sri/sriEditModal.html

136 lines
7.6 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="faRptEditModalLabel" th:text="${sri.faSriKey eq null?'SRI 작성':'SRI 수정'}"></h5>
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="faRptEditBody">
<form action="#" method="post" id="sriEditForm">
<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="faSriKey" th:value="${sri.faSriKey}">
<input type="hidden" name="wrtOrgan" th:value="${sri.wrtOrgan}">
<input type="hidden" name="wrtPart" th:value="${sri.wrtPart}">
<input type="hidden" name="wrtUserSeq" th:value="${sri.wrtUserSeq}">
<input type="hidden" name="wrtTitle" th:value="${sri.wrtTitle}">
<input type="hidden" name="status" id="status" th:value="${sri.status}">
<input type="hidden" name="refKey" id="refKey" th:value="${sri.refKey}">
<div class="row">
<div class="col-8">
<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-4">
<input type="text" class="form-control form-control-sm" id="wrtUserNm" name="wrtUserNm" th:value="${sri.wrtUserNm}" readonly>
</div>
<label for="wrtDt" class="col-sm-2 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-4">
<input type="text" class="form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(sri.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
</div>
<th:block th:if="${sri.refKey eq null}">
<div class="row mb-1">
<label for="faSriType" class="col-sm-2 col-form-label col-form-label-sm text-center">분류</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="faSriType" name="faSriType">
<option value="">선택해주세요.</option>
<th:block th:each="SriCategory:${SriCategoryList}">
<option th:value="${SriCategory.itemCd}" th:text="${SriCategory.itemValue}" th:selected="${SriCategory.itemCd eq sri.faSriType}"></option>
</th:block>
</select>
</div>
<label for="faSriEdate" class="col-sm-2 col-form-label col-form-label-sm text-center">제출기한</label>
<div class="col-sm-4" th:with="faSriEdate=${#temporals.format(sri.faSriEdate, 'yyyy-MM-dd HH:mm')}">
<input type="hidden" id="faSriEdateTime" name="faSriEdate" th:value="${faSriEdate}">
<div class="input-group">
<input type="text" class="form-control form-control-sm faSriEdate w-60" id="faSriEdate" th:value="${#strings.substringBefore(faSriEdate, ' ')}" readonly>
<input type="text" class="form-control form-control-sm faSriEdate w-40" id="faSriETime" th:value="${#strings.substringAfter(faSriEdate, ' ')}" readonly>
</div>
</div>
</div>
</th:block>
<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="${sri.title}">
</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="${sri.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(sri.fileList)}">
<br>파일을 업로드 해주세요.
</th:block>
<th:block th:unless="${#arrays.isEmpty(sri.fileList)}">
<div class='row-col-6' th:each="sriFile:${sri.fileList}">
<span th:data-fileseq="${sriFile.fileSeq}" th:text="|${sriFile.origNm}.${sriFile.fileExtn} ${sriFile.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>
</div>
<div class="col-4">
<div class="row">
<div class="col-12 pb-2">
<div class="row justify-content-between">
<div class="col-auto">■ 수신자</div>
<div class="col-auto">
<th:block th:if="${sri.refKey eq null}">
<button type="button" class="btn btn-sm btn-info" id="addReadUserBtn">추가</button>
</th:block>
</div>
</div>
</div>
<div class="col-1">no</div>
<div class="col-9">수신자</div>
<div class="col-2">삭제</div>
</div>
<hr class="my-1">
<div class="row">
<div class="col-12" id="readUserRow">
<th:block th:each="readUser, idx:${sri.readUserList}">
<div class="row my-1 readUserRow">
<input type="hidden" class="userSeq" th:value="${readUser.userSeq}">
<input type="hidden" class="ogCd" th:value="${readUser.ogCd}">
<input type="hidden" class="ofcCd" th:value="${readUser.ofcCd}">
<input type="hidden" class="titleCd" th:value="${readUser.titleCd}">
<input type="hidden" class="userNm" th:value="${readUser.userNm}">
<div class="col-1 rowSeq" th:text="${idx.index+1}"></div>
<div class="col-9">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd eq readUser.ogCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<th:block th:each="commonCode:${session.commonCode.get(readUser.ogCd)}">
<th:block th:if="${commonCode.itemCd eq readUser.ofcCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<!--<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd eq readUser.titleCd}" th:text="|${commonCode.itemValue} ${readUser.userNm}|"></th:block>
</th:block>-->
<th:block th:text="${readUser.userNm}"></th:block>
</div>
<div class="col-2">
<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>
</div>
</div>
</th:block>
</div>
</div>
</div>
</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-warning saveBtn" data-state="DST001">임시저장</button>
<button type="button" class="btn btn-primary saveBtn" data-state="DST007" th:text="${sri.refKey eq null?'하달':'응신'}"></button>
</div>