-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.html
69 lines (65 loc) · 3.01 KB
/
profile.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="profile.css" media="screen"/>
<title id="title">Edit Profile</title>
<script>
function SaveUserData()
{
var name = document.getElementById("name").value;
var surname = document.getElementById("surname").value;
var mail = document.getElementById("mail").value;
var city = document.getElementById("city").value;
var about = document.getElementById("info").value;
var interests = document.getElementById("interests").value;
var isWorker = document.getElementById("radio2").checked
if (name != "" && surname != "" && mail != "" && city != "")
{
Monkey.SaveUserData(name,surname,mail,city,about,interests,isWorker);
}
else Monkey.Warn("Error", "One of the needed fields is empyty");
}
function onProfileDataResult(name,surname,mail,city,about,interests,isWorker)
{
document.getElementById("name").value = name;
document.getElementById("surname").value = surname;
document.getElementById("mail").value = mail;
document.getElementById("city").value = city;
document.getElementById("info").value = about;
document.getElementById("interests").value = interests;
if(isWorker)
{
document.getElementById("radio2").checked = true;
document.getElementById("radio1").checked = false;
}
else
{
document.getElementById("radio2").checked = false;
document.getElementById("radio1").checked = true;
}
}
</script>
</head>
<body>
<form>
<div class="formFlex">
<h1>Edit Profile</h1>
<input maxlength='30' type="text" id="name" placeholder="Name"/>
<input maxlength='30' type="text" id="surname" placeholder="Surname"/>
<input maxlength='50' type="email" id="mail" placeholder="Email"/>
<input maxlength='40' type="text" id="city" placeholder="Town"/>
<textarea maxlength='1500' id="info" placeholder="Information about you"></textarea>
<textarea maxlength='1500' id="interests" placeholder="Interests (one per line)"></textarea>
<ul>
<li><lable>Employer</lable><input type="radio" id="radio1" name="position"/></li>
<li><lable>Worker</lable><input id="radio2" type="radio" name="position"/></li>
</ul>
<ul class="buttons">
<li><button onclick="SaveUserData(); return false;" id="butt">Save</button></li>
<li><button onclick="window.history.back(); return false;" id="butt2">Back</button></li>
</ul>
</div>
</form>
</body>
</html>