-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2.html
More file actions
267 lines (234 loc) · 11.1 KB
/
Copy path2.html
File metadata and controls
267 lines (234 loc) · 11.1 KB
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
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<title>Чек-лист</title>
<!-- Bootstrap core CSS -->
<link href="../vendor/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h2 align="center">Заказ</h2>
<div class="select-group">
<h6>Выберите вид спорта</h6>
<select class="btn btn-secondary dropdown-toggleb" id="SelSport" name="Вид спорта" onchange="SelectSport()">
<option value="ArtGym"> Художетвенная гимнастика </option>
<option value="SportGym"> Спортивная гимнастика </option>
<option value="FigSka"> Фигурное катание </option>
</select>
</div>
<br>
<h6>Вид заказа</h6>
<div data-toggle="buttons" id="GR">
<a> Индивидульный <input name="orderType" type="radio" id="Indiv" autocomplete="off" checked onclick="checkedOrderType(0)">
</a>
<a> Групповой <input name="orderType" type="radio" id="Group" autocomplete="off" onclick="checkedOrderType(1)"></a>
</div>
<br>
<br>
<div class="form-group">
<h6>Укажите количесво человек в группе </h6>
<input type="number" class="form-control" id="Count" disabled required>
</div>
<form>
<div class="select-group">
<h6>Выберите изделие</h6>
<select class="btn btn-secondary dropdown-toggleb" id="Inven" name="Изделие" onchange="SelectInven()">
<optgroup id="g1" label="Художественная гимнастика">
<option value="A1">Купальник</option>
<option value="A2">Комбинезон</option>
<option value="A3">Другое (укажите в коментариях)</option>
</optgroup>
<optgroup id="g2" label="Спортивная гимнастика" disabled>
<option value="S1">Купальник</option>
<option value="S2">Лосины</option>
<option value="S3">Другое (укажите в коментариях)</option>
</optgroup>
<optgroup id="g3" label="Фигурное катание" disabled>
<option value="F1">Платье</option>
<option value="F2">Комбинезон</option>
<option value="F3">Рубашка</option>
<option value="F4">Брюки</option>
<option value="F5">Другое кажите в коментариях</option>
</optgroup>
</select>
</div>
</form>
<br>
<div class="form-group">
<h6> <label for="exampleFormControlTextarea1">Коментарий</label></h6>
<textarea class="form-control" id="coment" rows="2"></textarea>
</div>
<h6>Укажите пол</h6>
<div data-toggle="buttons" >
<a><input name="type" type="radio" id="M" autocomplete="off" checked> Мужской</a>
<a><input name="type" type="radio" id="W" autocomplete="off"> Женский</a>
</div>
<br>
<br>
<form>
<h6>Заполните ваши мерки</h6>
<div class="form-group">
<label for="formGroupExampleInput">Рост</label>
<input type="number" class="form-control" id="growth" disabled required>
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Обхват туловища</label>
<input type="number" class="form-control" id="body" required>
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Обхват груди</label>
<input type="number" class="form-control" id="chest" required>
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Обхват талии</label>
<input type="number" class="form-control" id="waist" required>
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Обхват бедер</label>
<input type="number" class="form-control" id="hip" disabled required>
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Обхват шеи</label>
<input type="number" class="form-control" id="neck" disabled required>
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Ширина плеча</label>
<input type="number" class="form-control" id="width" disabled required>
</div>
<div class="form-group">
<label for="formGroupExampleInput2">Обхват плеча</label>
<input type="number" class="form-control" id="shoulder" disabled required>
</div>
</form>
<button type="submit" class="btn btn-secondary" onclick="addOrder()">Добавить следующее изделие</button>
<button type="button" class="btn btn-secondary" onclick="addAndClear()" value="Добавить" id="button" disabled>Добавить изделие на следующего человека</button>
</div>
<script src="../vendor/jquery/dist/jquery.js"></script>
<script src="./vendor/jquery-cookie/jquery.cookie.js"></script>
<script>
var orders = [];
function ElementIsCorrect(idElement){
var e = $(idElement);
if ((e.attr("disabled") == undefined) && (e.val()=="")){
e.addClass("is-invalid");
return false;
} else {
e.removeClass("is-invalid");
return true;
}
}
function addOrder() {
var NoError = ElementIsCorrect("#growth");
NoError &= ElementIsCorrect("#body");
NoError &= ElementIsCorrect("#chest");
NoError &= ElementIsCorrect("#waist");
NoError &= ElementIsCorrect("#hip");
NoError &= ElementIsCorrect("#neck");
NoError &= ElementIsCorrect("#width");
NoError &= ElementIsCorrect("#shoulder");
if (NoError) {
var merks = {
growth: $("#growth").val(),
body: $("#body").val(),
chest: $("#chest").val(),
waist: $("#waist").val(),
hip: $("#hip").val(),
neck: $("#neck").val(),
width: $("#width").val(),
shoulder: $("#shoulder").val(),
};
orders.push(merks);
}
return NoError;
}
function addAndClear() {
if(ElementIsCorrect("#Count"))
{
if (addOrder()) {
$("#Inven").val("A1");
$("#coment").val("");
$("#M").attr("checked", true);
$("#growth").val("");
$("#body").val("");
$("#chest").val("");
$("#waist").val("");
$("#hip").val("");
$("#neck").val("");
$("#width").val("");
$("#shoulder").val("");
}
}
}
function checkedOrderType(orederType) {
if (orederType == 0) {
$("#Count").attr("disabled", true);
$("#button").attr("disabled", true);
} else {
$("#Count").attr("disabled", false);
$("#button").attr("disabled", false);
}
}
function SelectSport() {
var SelSport = $("#SelSport").val();
$("#g1").attr("disabled", true);
$("#g2").attr("disabled", true);
$("#g3").attr("disabled", true);
if (SelSport == "ArtGym") {
$("#g1").attr("disabled", false);
}
if (SelSport == "SportGym") {
$("#g2").attr("disabled", false);
}
if (SelSport == "FigSka") {
$("#g3").attr("disabled", false);
}
}
function SelectInven() {
var SelectInven = $("#Inven").val();
$("#growth").attr("disabled", true);
$("#body").attr("disabled", true);
$("#chest").attr("disabled", true);
$("#waist").attr("disabled", true);
$("#hip").attr("disabled", true);
$("#neck").attr("disabled", true);
$("#width").attr("disabled", true);
$("#shoulder").attr("disabled", true);
if ((SelectInven == "A2") || (SelectInven == "F2")) {
$("#growth").attr("disabled", false);
$("#waist").attr("disabled", false);
$("#hip").attr("disabled", false);
$("#width").attr("disabled", false);
$("#shoulder").attr("disabled", false);
}
if (SelectInven == "S1" || SelectInven == "A1") {
$("#body").attr("disabled", false);
$("#waist").attr("disabled", false);
$("#chest").attr("disabled", false);
}
if (SelectInven == "S2" || SelectInven == "F4") {
$("#growth").attr("disabled", false);
$("#hip").attr("disabled", false);
}
if (SelectInven == "F1") {
$("#growth").attr("disabled", false);
$("#chest").attr("disabled", false);
$("#chest").attr("disabled", false);
$("#width").attr("disabled", false);
$("#shoulder").attr("disabled", false);
}
if (SelectInven == "F3") {
$("#chest").attr("disabled", false);
$("#waist").attr("disabled", false);
$("#neck").attr("disabled", false);
$("#width").attr("disabled", false);
$("#shoulder").attr("disabled", false);
}
}
</script>
</body>
</html>