-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapply.html
296 lines (271 loc) · 10 KB
/
apply.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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<!Doctype html>
<html>
<head>
<!-- Primary Color #3784cc -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" type="image/jpeg" href="/favicon.jpeg">
<title>MSP-Typescript</title>
<!-- Javascript -->
<script src="/lib/jQuery/jquery-3.2.1.js"></script>
<script src="/lib/Semantic/semantic.js"></script>
<script src="/lib/async/async.js"></script>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="/lib/Semantic/semantic.css">
<link rel="stylesheet" type="text/css" href="/css/animate.css">
<link rel="stylesheet" type="text/css" href="/css/style.css">
<style>
.ui.message p {
font-size: 1em !important;
}
</style>
<script src="https://www.gstatic.com/firebasejs/3.9.0/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyBZGBrTHYn1YfCbJp5Qc-Q0FcCdqU5qguA",
authDomain: "msp-ts.firebaseapp.com",
databaseURL: "https://msp-ts.firebaseio.com",
projectId: "msp-ts",
storageBucket: "msp-ts.appspot.com",
messagingSenderId: "999174857938"
};
firebase.initializeApp(config);
</script>
<script>
function writeNewApply(data){
var newPostKey = firebase.database().ref().child('apply').push().key;
var updates = {};
updates['/apply/' + newPostKey] = data;
// updates['/user-posts/' + uid + '/' + newPostKey] = postData;
return firebase.database().ref().update(updates);
}
</script>
<script>
$(document).ready(function() {
// fix menu when passed
$('.masthead').visibility({
once: false,
onBottomPassed: function() {
$('.fixed.menu').transition('fade in');
},
onBottomPassedReverse: function() {
$('.fixed.menu').transition('fade out');
}
});
$('.ui.dropdown').dropdown();
$('.ui.checkbox').checkbox();
// create sidebar and attach to menu open
$('.ui.sidebar').sidebar('attach events', '.toc.item');
$('.ui.form').form({
fields: {
name: {
identifier : 'name',
rules: [
{
type : 'empty',
prompt : '이름을 입력해 주세요.'
}
]
},
email: {
identifier : 'email',
rules: [
{
type : 'regExp',
value : /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/,
prompt : '올바른 이메일 양식을 입력해주세요.'
}
]
},
phone: {
identifier : 'phone',
rules: [
{
type : 'regExp',
value : /[0-9]{2,3}-[0-9]{3,4}-[0-9]{3,4}/g,
prompt : '010-0000-000 양식으로 올바른 전화번호를 입력해주세요.'
}
]
},
major: {
identifier: 'major',
rules: [
{
type : 'empty',
prompt : '전공 여부를 선택해주세요.'
}
]
},
age: {
identifier: 'age',
rules: [
{
type : 'empty',
prompt : '연령대를 선택해주세요.'
}
]
},
agree: {
identifier : 'agree',
rules: [
{
type : 'checked',
prompt : '개인정보 수집에 동의하시지 않으면 행사에 참여하실 수 없습니다.'
}
]
}
},
onSuccess: function(event){
event.preventDefault();
var name = $("input[name=name]").val()
var email = $("input[name=email]").val()
var phone = $("input[name=phone]").val()
var major = $("#major").val()
var age = $("#age").val()
var org = $("input[name=organization]").val()
var data = {name, email, phone, age, major, org};
console.log(data);
writeNewApply(data)
$('.apply_modal').modal('show');
// async(writeNewApply(data), function(){
// location.href="/done.html";
// });
// location.href="/done.html";
},
});
});
</script>
</head>
<body>
<div class="ui basic modal apply_modal">
<h1 class="ui center aligned header">신청이 완료되었습니다.</h1>
<br />
<br />
<a class="ui inverted fluid button" href="/">홈으로</a>
</div>
<!-- Following Menu -->
<div class="ui large top fixed hidden menu">
<div class="ui container">
<a class="item" href="/">소개</a>
<a class="item active apply" href="/apply.html">신청</a>
</div>
</div>
<!-- Sidebar Menu -->
<div class="ui vertical inverted sidebar menu">
<a class="item" href="/">소개</a>
<a class="item active apply" href="/apply.html">신청</a>
</div>
<!-- Page Contents -->
<div class="pusher">
<div class="ui inverted vertical masthead center aligned segment" style="background:#3784cc !important">
<div class="ui container" >
<div class="ui large secondary inverted pointing menu" style="border-color: transparent;">
<a class="toc item">
<i class="sidebar icon"></i>
</a>
<a class="item" href="/">소개</a>
<a class="item active apply" href="/apply.html">신청</a>
</div>
</div>
<div class="ui text container" >
<h1 class="ui inverted header">
Typescript with MSP
</h1>
<h2>Microsoft Student Partners와 함께하는 Typescript</h2>
<br />
<br />
<div class="ui huge basic inverted button">신청하기 <i class="right arrow icon"></i></div>
</div>
</div>
<div class="ui vertical stripe segment">
<div class="ui text container">
<h2 class="ui header">
<i class="write square icon"></i>
<div class="content">
Apply
<div class="sub header">강연 참여 지원서를 작성해주세요.</div>
</div>
</h2>
<br />
<form class="ui form">
<div class="field">
<label>성함</label>
<input id="input_id" type="text" name="name" placeholder="성함">
</div>
<div class="field">
<label>이메일</label>
<input id="input_email" type="email" name="email" placeholder="[email protected]">
</div>
<div class="field">
<label>연락처</label>
<input id="input_tel" type="tel" name="phone" placeholder="010-0000-0000">
</div>
<div class="field">
<label>전공 여부</label>
<select id="major" class="ui fluid dropdown">
<option value="">전공여부</option>
<option value="true">전공자</option>
<option value="false">비전공자</option>
</select>
</div>
<div class="field">
<label>구분</label>
<select id="age" class="ui fluid dropdown">
<option value="">연령대</option>
<option value="Teenager">중고등학생</option>
<option value="University">대학생</option>
<option value="Career">직장인</option>
<option value="Etc">기타</option>
</select>
</div>
<div class="field">
<label>소속(Optional)</label>
<input type="text" name="organization" placeholder="Microsoft Student Partners">
</div>
<div class="ui message">
<div class="header">
개인정보 수집 및 이용, 제공에 대한 동의
</div>
<p>
개인정보보호법에 의거 다음과 같이 개인정보 수집 및 이용 목적을 알려드립니다.<br /><br />
▷ 수집하는 개인정보 항목<br />
- 성명, 연락처, E-Mail, 소속, 컴퓨터공학 전공 여부, 직업 정보<br />
▷ 수집된 개인정보자료는 행사 참여 확인 목적이외에는 절대 사용되지 않습니다.<br />
▷ 2017년 6월 3일 행사 종료 직후 해당 정보는 즉시 폐기됩니다.<br />
<br />
※ 개인정보의 수집 및 이용, 제공에 동의를 거부하실 수 있으며, 다만 이 경우에는 행사에 참여하실 수 없습니다.
</p>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" tabindex="0" name="agree" class="hidden">
<label>개인정보 수집 및 이용에 동의합니다.</label>
</div>
</div>
<button class="ui fluid button">제출하기</button>
<div class="ui error message"></div>
</form>
</div>
</div>
<div class="ui inverted vertical footer segment">
<div class="ui container">
<div class="ui stackable inverted divided equal height stackable grid">
<div class="three wide column">
<h4 class="ui inverted header">Menu</h4>
<div class="ui inverted horizontal ink list">
<a href="#" class="item">소개</a>
<a href="#" class="item">신청</a>
</div>
</div>
<div class="ten wide column">
<h4 class="ui inverted header">Infomation</h4>
<p>본 행사는 Microsoft에서 운영하는 Microsoft Student Partners 대학생 단체에서 진행하는 행사로 Microsoft 본사에서 주최하는 공식적인 행사는 아닙니다.</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>