-
Notifications
You must be signed in to change notification settings - Fork 3
/
sign_up.html
81 lines (79 loc) · 4.05 KB
/
sign_up.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Alef|Varela+Round&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="img/icons/logo_icon.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/mefathim.css">
</head>
<body dir="rtl" onload="check_params()">
<div class="container">
<h2 style="margin-top: 100px;">הצטרפו למשפחת מפתחים</h2 style="margin-top: 100px;">
<a href="login.html"><img src="img/logo.png" id="logo"></a>
<div class="card card-container sign_up">
<p>מלא את שדות החובה המסומנים בכוכבית!</p>
<form action="scripts/sign_up.py" method="post">
<div class="form-row">
<input type="email" id="email" placeholder="הכנס אימייל *" name="email" required>
</div>
<div id="result"></div>
<div class="form-row">
<input class="col-md-4 mb-3" type="text" placeholder="שם פרטי *" name="first_name" required>
<input class="col-md-8 mb-3" type="text" placeholder="שם משפחה" name="last_name">
</div>
<div class="form-row">
<input class="col-md-6 mb-3" type="text" placeholder="כינוי" name="nick_name">
<select class="col-md-6 mb-3" name="gender">
<option value="1">זכר</option>
<option value="2">נקבה</option>
<option value="3">אחר</option>
</select>
</div>
<div class="form-row">
<input class="col-md-6 mb-3" type="password" placeholder="סיסמה: בין 8-16 תווים *" id="pass" name="password" pattern=".{8, 16}" required>
<input class="col-md-6 mb-3" type="password" placeholder="הקלד סיסמה שוב *" id="pass_again" name="password_again" pattern=".{8, 16}" required>
</div>
<p class="err" id="err"></p>
<div class="form-row">
<!-- <for class="err">תאריך לידה*</for> -->
<label for="pwd" class="col-4">תאריך לידה * </label>
<input class="col-8" type="date" placeholder="תאריך לידה" name="birth_date">
</div>
<div class="form-row">
<input class="col-6" type="text" placeholder="עיר" name="city">
<input class="col-6" type="text" placeholder="הכנס מדינה ב3 אותיות (isr)" value="isr" name="country">
</div>
<div class="form-row">
<input type="text" placeholder="טלפון" name="phone">
</div>
<div class="form-row">
<label for="invalidCheck2">אני מסכים לתנאים וההגבלות *</label>
<input class="form-check-input" type="checkbox" value="" id="invalidCheck2" required>
</div>
<button type="submit">הרשם</button>
</form>
</div>
</div>
</body>
<script>
$("#email").change(function(){
let email = $("#email").val();
$.post( "scripts/check_email.py", JSON.stringify({ "email": email }))
.done(function( data ) {
$("#result").html('<p class="err">'+data+'</p>')
});
});
function check_params(){
var url_string = window.location.href;
var url = new URL(url_string);
if (url.searchParams.get("err") == "1"){
document.getElementById('err').innerHTML = "הסיסמאות לא תואמות!";
}
document.getElementById('email').value = url.searchParams.get("msg")
}
</script>
</html>