-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-prod.html
104 lines (100 loc) · 2.67 KB
/
index-prod.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html>
<head>
<title>View JS Test</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script>
<link rel="stylesheet" href="fairplay.min.css">
</head>
<body>
<form id="main-form">
<div>
<input type="text" name="firstName" placeholder="Enter your first name">
</div>
<div>
<input type="text" name="lastName" placeholder="Enter your last name">
</div>
<div>
<select name="offer">
<option>Submit Resume</option>
<option>Submit Vacancy</option>
<option>Job Alert</option>
</select>
</div>
<div>
<input type="file" name="Resume" placeholder="Attach resume">
</div>
<div>
<input type="checkbox" name="acceptTandCs">
<label>Accept terms and conditions</label>
</div>
<input type="submit" name="Submit">
</form>
<div id="wrapper"></div>
<script src="fairplay.min.js"></script>
<script type="text/javascript">
const fp = new Fairplay({
//clientId:'1chfi-oqwg4-0ulzl-y36zv',
mode: 'dev', // Optional. When set to 'dev', the 'clientId' property is not required.
businessId: 123,
addTrailingSlashToJobLinks: true // Optional. When set to true the will add a trailing a slash ('/') to the job links.
})
// 1. Create the widget
fp.createWidget({
el: '#wrapper',
pageSize: 2, // Optional. Default is 10.
categories: { // Optional. This object overides the Neap's JobAdder's Board category names
5843: 'Internet & Telco',
5821: 'Internet & Telco'
}
// filter:{
// toggled: true,
// searchCountToggled: false,
// classification:{
// name: 'Professions',
// toggled:true
// },
// subClassification:{
// name: 'Role',
// toggled:true
// },
// location:{
// name: 'Cities',
// toggled:true
// },
// area:{
// name: 'Zones',
// toggled:true
// },
// workType:{
// name: 'Types',
// toggled:true
// },
// consultant:{
// name: 'Recruiters',
// toggled:true,
// //value:'nic@neap.co'
// },
// salary:{
// name: 'Wage Range',
// toggled:false
// }
// }
})
// 2. Get some data
fp.getJobAds({ where:{ } }, (err,data) => { console.log(data) })
// 3. Capture a form submit and asynchronously submit the data
document.getElementById('main-form').addEventListener('submit', function(event) {
fp.submitForm(this,event, (error, res) => {
if (error) {
console.log('ERROR')
console.log(JSON.stringify(error))
} else {
console.log(`Status: ${res.status}`)
console.log(`Data: ${res.data}`)
}
})
})
</script>
</body>
</html>