forked from ineventhorizon/Missing-Pet-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathilanver.ejs
118 lines (105 loc) · 5.52 KB
/
ilanver.ejs
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
<% include ./partials/header %>
<section class="page-section about-heading">
<div class="container">
<div class="col-xl-9 col-lg-10 mx-auto">
<div class="bg-faded rounded p-5" id="forms">
<form action="/ilanver" enctype="multipart/form-data" method="POST" >
<div class="form-row">
<div class="form-group col-md-12">
<label for="postTitle">E-posta adresiniz:</label>
<input class="form-control" id="postTitle"type="text" value="<%= currentUser.username %>" name="usrname" readonly>
</div>
<div class="form-group col-md-4">
<label class=labelrow for="postTitle">İlan Başlığı:</label>
<input class="form-control" id="postTitle"type="text" placeholder="İlan Adı" name="title" required>
</div>
<div class="form-group col-md-4">
<label for="postType">İlanı ne için açmak istiyorsunuz?</label>
<select class="form-control" onchange="yesnoCheck(this)" id="postType" name="type">
<option value="Kayıp İlanı">Kayıp İlanı</option>
<option value="Sahiplendirme İlanı">Sahiplendirme İlanı</option>
<option value="Geçici Süre Bakım İlanı">Geçici Süre Bakım İlanı</option>
</select>
</div>
<div class="form-group col-md-4">
<label for="exampleFormControlFile1">Resim seçin. Sadece 1 adet fotoğraf yükleyiniz.</label>
<input type="file" class="form-control-file" id="fileUp" name="image" required>
</div>
<div class="form-group col-md-4">
<label for="uName">Adınız ve Soyadınız:</label>
<input class="form-control" id="uName"type="text" value="<%= currentUser.usersName %> <%= currentUser.usersSurname %>" name="namesurname" readonly>
</div>
<div class="form-group col-md-4">
<label for="userPhone">Telefon Numaranız:</label>
<input class="form-control" id="userPhone"type="text" value="<%= currentUser.userCellPhone %>" name="phonenumber" readonly>
</div>
<div class="form-group col-md-4">
<label for="userCity">Şehir:</label>
<input class="form-control" id="userCity"type="text" value="<%= currentUser.userCity %>" name="usercity" readonly>
</div>
<div class="form-group col-md-6" id="daterange" style="display: none;">
<label for="daterange1" >Bakım başlangıç tarihi:</label>
<input id="daterange1" name="daterange1" readonly>
<label for="daterange2" >Geri teslim alma tarihi:</label>
<input id="daterange2" name="daterange2" readonly>
</div>
<div class="form-group col-md-6">
<div id="datecheck" style="display: block;">
<label for="datepicker" >Kaybolma tarihi:</label>
<input id="datepicker" name="date" readonly>
</div>
</div>
<div class="form-group col-md-12">
<label for="animalNotes">Notlar</label>
<textarea cols="40" rows="5" class="form-control" id="animalNotes" placeholder="Notlarınız" name="notes"></textarea>
</div>
<div class="form-group col-md-4">
<label for="animalT">Hayvanınızın türü:</label>
<input class="form-control" id="animalT"type="text" placeholder="Hayvanın Türü" name="typea">
</div>
<div class="form-group col-md-4">
<label for="animalG">Hayvanınızın cinsi:</label>
<select class="form-control" id="animalG" name="genus">
<option>Kedi</option>
<option>Köpek</option>
<option>Kanatlı hayvan</option>
<option>Diğer</option>
</select>
</div>
<div class="form-group col-md-4">
<label for="animalA">Hayvanınızın yaşı:</label>
<input class="form-control" id="animalA"type="number" placeholder="Yaş" name="age">
</div>
<button type="submit" value="upload" class="btn btn-primary">Onay İsteği</button>
</div>
</form>
</div>
</div>
</div>
</section>
<script>
$('#datepicker').datepicker({
uiLibrary: 'bootstrap4'
});
$('#daterange1').datepicker({
uiLibrary: 'bootstrap4'
});
$('#daterange2').datepicker({
uiLibrary: 'bootstrap4'
});
function yesnoCheck(){
if(document.getElementById("postType").value=="Kayıp İlanı"){
document.getElementById("datecheck").style.display="block";
document.getElementById("daterange").style.display="none";
}
else if(document.getElementById("postType").value=="Sahiplendirme İlanı"){
document.getElementById("datecheck").style.display="none";
document.getElementById("daterange").style.display="none";
}
else{
document.getElementById("datecheck").style.display="none";
document.getElementById("daterange").style.display="block";
}
}
</script>
<% include ./partials/footer %>