-
Notifications
You must be signed in to change notification settings - Fork 0
/
content_register.html
273 lines (238 loc) · 9.98 KB
/
content_register.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>워니토퍼 관리자 - 컨텐츠 등록</title>
<!-- Custom fonts for this template -->
<link href="public/admin/assets/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css" />
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet" />
<!-- Custom styles -->
<link href="public/admin/assets/css/sb-admin-2.min.css" rel="stylesheet" />
<link rel="stylesheet" href="public/admin/assets/css/style.css" />
<!-- Custom styles for this page -->
<link href="public/admin/assets/vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" />
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css" />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
<!-- 공통 -->
<script src="public/admin/assets/js/common.js"></script>
<style>
.pagination {
text-align: center;
}
.dataTables_paginate {
text-align: center;
}
</style>
<script>
</script>
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar"></ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav id="top-bar" class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow"></nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<div class="border-bottom-primary mb-4">
<div class="main-title">
<h1 class="mb-2 text-gray-800">컨텐츠 등록</h1>
</div>
<h6 class="page-adress">
컨텐츠 관리 > 컨텐츠 관리 > 컨텐츠 등록
</h6>
</div>
<section role="main" class="content-body register-content-body">
<form action="/admin/source" method="post" enctype="multipart/form-data">
<h6 class="float-right">
<span class="star">*</span>
는 필수 입력값
</h6>
<h4 class="register-sub-title">■ 컨텐츠 기본정보</h3>
<table class="register table table-bordered" id="datatable-ajax"
data-url="/resources/admin/assets/ajax/ajax-datatables-sample.json">
<tr>
<td width="20%" class="table-title-td">카테고리<span class="star">*</span></td>
<td width="30%">
<select name="cars" id="cars" class="form-control">
<option value="volvo">--선택--</option>
<option value="saab">풍선 장식</option>
<option value="mercedes">토퍼 제작</option>
<option value="audi">삐에로</option>
<option value="audi">페이스페인팅</option>
<option value="audi">원데이클래스</option>
</select>
</td>
<td width="20%" class="table-title-td">컨텐츠코드</td>
<td width="30%">
<input name="brandCd" value="${sourceCd}" style="display: none;" />
</td>
</tr>
<tr>
<td width="20%" class="table-title-td">제목<span class="star">*</span></td>
<td width="30%" colspan="3">
<input type="text" class="form-control" name="name" required />
</td>
</tr>
<tr>
<td width="20%" class="table-title-td">등록일</td>
<td width="30%"></td>
<td width="20%" class="table-title-td">수정일</td>
<td width="30%"></td>
</tr>
</td>
</tr>
</table>
<h4 class="register-sub-title">■ 이미지 등록</h3>
<table class="register table table-bordered" id="datatable-ajax"
data-url="/resources/admin/assets/ajax/ajax-datatables-sample.json">
<tr>
<td width="20%" class="table-title-td">대표 이미지<span class="star">*</span>
<div>(최대 1개)</div>
</td>
<td width="40%" colspan="2">
<input type="file" accept="image/jpg" name="introduceImg" required />
</td>
</tr>
<tr>
<td width="20%" rowspan="4" class="table-title-td">추가 이미지<div>(최대 4개)</div>
</td>
<td width="5%" style="text-align: center;">1</td>
<td width="95%">
<input type="file" accept="image/jpg" name="productImgArr[]" />
</td>
</tr>
<tr>
<td width="5%" style="text-align: center;">2</td>
<td width="95%">
<input type="file" accept="image/jpg" name="productImgArr[]" />
</td>
</tr>
<tr>
<td width="5%" style="text-align: center;">3</td>
<td width="95%">
<input type="file" accept="image/jpg" name="productImgArr[]" />
</td>
</tr>
<tr>
<td width="5%" style="text-align: center;">4</td>
<td width="95%">
<input type="file" accept="image/jpg" name="productImgArr[]" />
</td>
</tr>
</table>
<h4 class="register-sub-title">■ 기타 정보</h3>
<table class="register table table-bordered" id="datatable-ajax"
data-url="/resources/admin/assets/ajax/ajax-datatables-sample.json">
<tr>
<td width="20%" class="table-title-td">비고
</div>
</td>
<td width="80%" colspan="2">
<textarea class="form-control">비고입니다</textarea>
</td>
</tr>
</table>
<div class="admin-btn-tool tool-btn ib detail-bottom-btn">
<button type="button" class="btn btn-primary btn-100" onClick="onClickCancleBtn()">
목록
</button>
<button type="button" class="btn btn-primary btn-100" onClick="onClickSubmitBtn()">
등록
</button>
</div>
</form>
</section>
</div>
</div>
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright © Your Website 2020</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
<script>
let orderClick = 0
window.onload = () => {
$('.date-pick').datepicker({
dateFormat: 'yy-mm-dd',
format: 'yyyy-mm-dd',
autoclose: true,
todayHighlight: true,
placement: 'bottom',
orientation: 'auto bottom'
})
}
$(document).ready(function () {
$('#dataTable').DataTable()
})
const onClickCancleBtn = () => {
if (confirm("등록을 취소하시겠습니까")) location.href = "./content_main.html";
}
const onClickSubmitBtn = () => {
const name = document.getElementById("name");
const link = document.getElementById("link");
const photo = document.getElementById("photo");
const nameCheck = /^[a-zA-Zㄱ-힣0-9-_.!@#$%^*+=-~&|\\;:\/?\'\"]{1,20}$/;
if (!nameCheck.test(name.value)) {
alert("배너명은 국/영문, 숫자, 특수문자 최대 20자 조합으로 사용해야 합니다.");
name.focus();
return false;
};
if (name.value == "") {
alert("필수값이 입력되지 않았습니다.");
name.focus();
return false;
}
if (photo.value == "") {
alert("필수값이 입력되지 않았습니다.");
photo.focus();
return false;
}
if (link.value == "") {
alert("필수값이 입력되지 않았습니다.");
link.focus();
return false;
}
document.querySelector('#form').submit();
}
</script>
<!-- Bootstrap core JavaScript-->
<script src="public/admin/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="public/admin/assets/vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="public/admin/assets/js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="public/admin/assets/vendor/datatables/jquery.dataTables.min.js"></script>
<script src="public/admin/assets/vendor/datatables/dataTables.bootstrap4.min.js"></script>
<!-- Page level custom scripts -->
<script src="public/admin/assets/js/demo/datatables-demo.js"></script>
</body>
</html>