-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaa.html
More file actions
744 lines (662 loc) · 34.4 KB
/
aa.html
File metadata and controls
744 lines (662 loc) · 34.4 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
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>تسجيل طالب جديد</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<style>
:root {
--primary-color: #4361ee;
--secondary-color: #3f37c9;
--accent-color: #4895ef;
--success-color: #4cc9f0;
--light-bg: #f8f9fa;
--card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
body {
background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #2c3e50;
padding: 20px;
min-height: 100vh;
}
.card {
border: none;
border-radius: 15px;
box-shadow: var(--card-shadow);
margin-bottom: 30px;
overflow: hidden;
background: #fff;
}
.card-header {
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
color: white;
border-bottom: none;
padding: 20px 30px;
border-radius: 15px 15px 0 0 !important;
position: relative;
}
.card-header h6 {
font-weight: 600;
font-size: 1.4rem;
margin: 0;
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.wizard-header {
background: #fff;
padding: 20px 30px;
border-bottom: 1px solid #eee;
}
.wizard-steps {
display: flex;
justify-content: center;
margin: 20px 0 30px;
position: relative;
}
.wizard-steps:before {
content: '';
position: absolute;
top: 20px;
left: 0;
right: 0;
height: 3px;
background: #e9ecef;
z-index: 1;
}
.step {
position: relative;
z-index: 2;
text-align: center;
width: 180px;
}
.step-icon {
width: 40px;
height: 40px;
background: #e9ecef;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 10px;
font-weight: bold;
color: #6c757d;
transition: all 0.3s ease;
}
.step.active .step-icon {
background: var(--primary-color);
color: white;
box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}
.step-title {
font-weight: 600;
color: #6c757d;
font-size: 0.9rem;
}
.step.active .step-title {
color: var(--primary-color);
}
.step-content {
padding: 30px;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-label {
font-weight: 600;
margin-bottom: 8px;
color: #495057;
display: block;
}
.form-control, .form-select {
border: 1px solid #dee2e6;
border-radius: 8px;
padding: 12px 15px;
transition: all 0.3s;
height: auto;
box-shadow: none;
}
.form-control:focus, .form-select:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}
.btn-primary {
background: linear-gradient(to right, var(--primary-color), var(--accent-color));
border: none;
padding: 10px 25px;
font-weight: 600;
border-radius: 8px;
transition: all 0.3s;
box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}
.btn-outline-secondary {
border-color: #dee2e6;
color: #6c757d;
border-radius: 8px;
padding: 10px 25px;
font-weight: 600;
}
.wizard-navigation {
display: flex;
justify-content: space-between;
padding: 20px 30px;
background: #f8f9fa;
border-top: 1px solid #eee;
}
.required-star {
color: #e53e3e;
margin-right: 4px;
}
.file-upload {
position: relative;
overflow: hidden;
}
.file-upload-btn {
display: inline-block;
padding: 10px 20px;
background: #edf2f7;
border-radius: 8px;
color: #4a5568;
cursor: pointer;
transition: all 0.3s;
border: 1px dashed #cbd5e0;
text-align: center;
width: 100%;
}
.file-upload-btn:hover {
background: #e2e8f0;
}
.file-upload-input {
position: absolute;
top: 0;
right: 0;
margin: 0;
padding: 0;
font-size: 20px;
cursor: pointer;
opacity: 0;
height: 100%;
width: 100%;
}
.file-info {
font-size: 0.85rem;
color: #718096;
margin-top: 8px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.wizard-steps {
flex-wrap: wrap;
}
.step {
width: 50%;
margin-bottom: 20px;
}
.card-header h6 {
font-size: 1.2rem;
}
.step-content {
padding: 20px;
}
.wizard-navigation {
flex-direction: column;
gap: 10px;
}
.wizard-navigation .btn {
width: 100%;
}
}
@media (max-width: 576px) {
body {
padding: 10px;
}
.step {
width: 100%;
}
.card-header {
padding: 15px 20px;
}
}
.form-section {
background: #fff;
border-radius: 12px;
padding: 25px;
margin-bottom: 25px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
border: 1px solid #edf2f7;
}
.form-section-title {
font-size: 1.1rem;
font-weight: 600;
color: var(--primary-color);
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #edf2f7;
}
</style>
</head>
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-10">
<div class="card">
<div class="card-header">
<h6>من فضلك ادخل جميع بيانات الطالب ليتم تسجيله</h6>
</div>
<div class="wizard-header">
<div class="wizard-steps">
<div class="step active" id="step1">
<div class="step-icon">1</div>
<div class="step-title">البيانات الشخصية</div>
</div>
<div class="step" id="step2">
<div class="step-icon">2</div>
<div class="step-title">بيانات الطالب</div>
</div>
</div>
</div>
<form id="student-registration-form">
<!-- الخطوة 1: البيانات الشخصية -->
<div class="step-content" id="step1-content">
<div class="form-section">
<div class="form-section-title">معلومات الهوية</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>الاسم الرباعي:
</label>
<input type="text" name="name" class="form-control" placeholder="الاسم مع اللقب" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>العنوان:
</label>
<input type="text" name="address" class="form-control" placeholder="ادخل العنوان" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">الايميل:</label>
<input type="email" name="email" class="form-control" placeholder="ادخل الايميل اختياري">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>الجنس:
</label>
<select class="form-select" name="gender" required>
<option value="">اختر الجنس</option>
<option value="Male">ذكر</option>
<option value="Female">انثى</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">رقم الهاتف:</label>
<input type="tel" name="phone" class="form-control" placeholder="779168887">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">رقم الوصي:</label>
<input type="tel" name="phone2" class="form-control" placeholder="779168887">
</div>
</div>
</div>
</div>
<div class="form-section">
<div class="form-section-title">معلومات إضافية</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">تاريخ الميلاد:</label>
<input type="text" name="dob" class="form-control date-picker" placeholder="اختر التاريخ...">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>الجنسية:
</label>
<select class="form-select" name="nal_id" required>
<option value="">اختر الجنسية</option>
<option value="1">يمنية</option>
<option value="2">سعودية</option>
<option value="3">مصرية</option>
<option value="4">أردنية</option>
<option value="5">سورية</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>الحالة:
</label>
<select class="form-select" name="state_id" id="state_id" required>
<option value="">اختر الحالة</option>
<option value="1">صنعاء</option>
<option value="2">عدن</option>
<option value="3">تعز</option>
<option value="4">حضرموت</option>
<option value="5">الحديدة</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>LGA:
</label>
<select class="form-select" name="lga_id" id="lga_id" required>
<option value="">اختر الحالة أولاً</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">فصيلة الدم:</label>
<select class="form-select" name="bg_id">
<option value="">اختر فصيلة الدم</option>
<option value="1">A+</option>
<option value="2">A-</option>
<option value="3">B+</option>
<option value="4">B-</option>
<option value="5">O+</option>
<option value="6">O-</option>
<option value="7">AB+</option>
<option value="8">AB-</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">صورة الوثيقة:</label>
<div class="file-upload">
<div class="file-upload-btn">
<i class="fas fa-cloud-upload-alt me-2"></i>اختر ملف
<input type="file" name="photo" class="file-upload-input" accept="image/*">
</div>
<div class="file-info">اقبل صور من نوع: jpeg, png. بحجم لا يزيد عن 2MB</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- الخطوة 2: بيانات الطالب -->
<div class="step-content d-none" id="step2-content">
<div class="form-section">
<div class="form-section-title">المعلومات الأكاديمية</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>التخصص:
</label>
<select class="form-select" name="my_class_id" id="my_class_id" required>
<option value="">اختر التخصص</option>
<option value="1">علوم الحاسوب</option>
<option value="2">الهندسة المدنية</option>
<option value="3">الطب البشري</option>
<option value="4">الصيدلة</option>
<option value="5">اللغة العربية</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>الفصل الدراسي:
</label>
<select class="form-select" name="section_id" id="section_id" required>
<option value="">اختر التخصص أولاً</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">الوصي:</label>
<select class="form-select" name="my_parent_id" id="my_parent_id">
<option value="">اختر الوصي</option>
<option value="1">علي أحمد محمد</option>
<option value="2">سالم عبدالله حسن</option>
<option value="3">فاطمة عبد الرحمن</option>
<option value="4">محمد سعيد عمر</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">
<span class="required-star">*</span>سنة الالتحاق بالكلية:
</label>
<select class="form-select" name="year_admitted" id="year_admitted" required>
<option value="">اختر السنة</option>
<option value="2023">2023</option>
<option value="2022">2022</option>
<option value="2021">2021</option>
<option value="2020">2020</option>
<option value="2019">2019</option>
</select>
</div>
</div>
</div>
</div>
<div class="form-section">
<div class="form-section-title">معلومات السكن</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">السكن:</label>
<select class="form-select" name="dorm_id" id="dorm_id">
<option value="">اختر السكن</option>
<option value="1">سكن الطلاب الرئيسي</option>
<option value="2">سكن الطالبات الرئيسي</option>
<option value="3">سكن الخريجين</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">رقم الغرفة:</label>
<input type="text" name="dorm_room_no" class="form-control" placeholder="اذا كان السكن تبع الكلية">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">Sport House:</label>
<input type="text" name="house" class="form-control" placeholder="Sport House">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label">الرقم الأكاديمي:</label>
<input type="text" name="adm_no" class="form-control" placeholder="اترك الحقل فاضي">
</div>
</div>
</div>
</div>
</div>
<div class="wizard-navigation">
<button type="button" class="btn btn-outline-secondary" id="prev-btn" disabled>
<i class="fas fa-arrow-right me-2"></i>السابق
</button>
<button type="button" class="btn btn-primary" id="next-btn">
التالي <i class="fas fa-arrow-left ms-2"></i>
</button>
<button type="submit" class="btn btn-success d-none" id="submit-btn">
<i class="fas fa-check me-2"></i>تسجيل الطالب
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/l10n/ar.js"></script>
<script>
$(document).ready(function() {
// Initialize date picker
flatpickr(".date-picker", {
locale: "ar",
dateFormat: "Y-m-d",
allowInput: true
});
// State and LGA data
const stateLgaData = {
1: ["مديرية التحرير", "مديرية الصافية", "مديرية السبعين", "مديرية معين", "مديرية الوحدة"],
2: ["مديرية المنصورة", "مديرية التواهي", "مديرية الشيخ عثمان", "مديرية خور مكسر", "مديرية دار سعد"],
3: ["مديرية القاهرة", "مديرية صالة", "مديرية المشنة", "مديرية المظفر", "مديرية الوازعية"],
4: ["مديرية المكلا", "مديرية الشحر", "مديرية غيل باوزير", "مديرية الديس", "مديرية بروم"],
5: ["مديرية الحالي", "مديرية الحوك", "مديرية المراوعة", "مديرية الزيدية", "مديرية اللحية"]
};
// Class and section data
const classSectionData = {
1: ["الفصل الأول", "الفصل الثاني", "الفصل الثالث", "الفصل الرابع"],
2: ["الفصل الأول", "الفصل الثاني", "الفصل الثالث"],
3: ["الفصل الأول", "الفصل الثاني", "الفصل الثالث", "الفصل الرابع", "الفصل الخامس"],
4: ["الفصل الأول", "الفصل الثاني", "الفصل الثالث", "الفصل الرابع"],
5: ["الفصل الأول", "الفصل الثاني"]
};
// State change handler
$('#state_id').change(function() {
const stateId = $(this).val();
const lgaSelect = $('#lga_id');
lgaSelect.empty();
lgaSelect.append('<option value="">اختر الحالة أولاً</option>');
if (stateId && stateLgaData[stateId]) {
stateLgaData[stateId].forEach((lga, index) => {
lgaSelect.append(`<option value="${index + 1}">${lga}</option>`);
});
}
});
// Class change handler
$('#my_class_id').change(function() {
const classId = $(this).val();
const sectionSelect = $('#section_id');
sectionSelect.empty();
sectionSelect.append('<option value="">اختر التخصص أولاً</option>');
if (classId && classSectionData[classId]) {
classSectionData[classId].forEach((section, index) => {
sectionSelect.append(`<option value="${index + 1}">${section}</option>`);
});
}
});
// Wizard navigation
let currentStep = 1;
$('#next-btn').click(function() {
// Validate current step
let isValid = true;
$(`#step${currentStep}-content :input[required]`).each(function() {
if (!$(this).val()) {
isValid = false;
$(this).addClass('is-invalid');
} else {
$(this).removeClass('is-invalid');
}
});
if (!isValid) {
alert('يرجى ملء جميع الحقول المطلوبة');
return;
}
// Move to next step
$(`#step${currentStep}`).removeClass('active');
$(`#step${currentStep}-content`).addClass('d-none');
currentStep++;
$(`#step${currentStep}`).addClass('active');
$(`#step${currentStep}-content`).removeClass('d-none');
// Update navigation buttons
$('#prev-btn').prop('disabled', false);
if (currentStep === 2) {
$('#next-btn').addClass('d-none');
$('#submit-btn').removeClass('d-none');
}
});
$('#prev-btn').click(function() {
// Move to previous step
$(`#step${currentStep}`).removeClass('active');
$(`#step${currentStep}-content`).addClass('d-none');
currentStep--;
$(`#step${currentStep}`).addClass('active');
$(`#step${currentStep}-content`).removeClass('d-none');
// Update navigation buttons
if (currentStep === 1) {
$('#prev-btn').prop('disabled', true);
$('#next-btn').removeClass('d-none');
$('#submit-btn').addClass('d-none');
}
});
// Form submission
$('#student-registration-form').submit(function(e) {
e.preventDefault();
// Validate final step
let isValid = true;
$(`#step${currentStep}-content :input[required]`).each(function() {
if (!$(this).val()) {
isValid = false;
$(this).addClass('is-invalid');
} else {
$(this).removeClass('is-invalid');
}
});
if (!isValid) {
alert('يرجى ملء جميع الحقول المطلوبة');
return;
}
// Form is valid - show success message
const formData = new FormData(this);
const formObject = Object.fromEntries(formData.entries());
// Simulate form submission
alert('تم تسجيل الطالب بنجاح!\n\nسيتم الآن إعادة توجيهك إلى لوحة التحكم.');
// Reset form
this.reset();
$('#lga_id').html('<option value="">اختر الحالة أولاً</option>');
$('#section_id').html('<option value="">اختر التخصص أولاً</option>');
// Reset wizard to first step
$(`#step${currentStep}`).removeClass('active');
$(`#step${currentStep}-content`).addClass('d-none');
currentStep = 1;
$(`#step${currentStep}`).addClass('active');
$(`#step${currentStep}-content`).removeClass('d-none');
$('#prev-btn').prop('disabled', true);
$('#next-btn').removeClass('d-none');
$('#submit-btn').addClass('d-none');
});
// File upload styling
$('.file-upload-input').change(function() {
const fileName = $(this).val().split('\\').pop();
if (fileName) {
$(this).siblings('.file-upload-btn').html(`<i class="fas fa-file me-2"></i>${fileName}`);
}
});
});
</script>
</body>
</html>