-
Notifications
You must be signed in to change notification settings - Fork 18
/
custom-task-form.html
49 lines (42 loc) · 1.11 KB
/
custom-task-form.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
<div class="border-bottom mb-2">
<form>
<div class="form-group">
<label>Order Id</label>
<input type="text" id="orderId" class="form-control" value="{{orderId}}" readonly>
</div>
<div class="form-group">
<label>Price</label>
<input type="text" id="price" class="form-control" value="{{price}}" readonly>
</div>
<div class="form-group">
<label>Comment</label>
<input type="text" id="form_comment" class="form-control">
</div>
</form>
</div>
<div>
<button type="button" class="btn btn-primary" onclick="accept()">Accept</button>
<button type="button" class="btn btn-light" onclick="reject()">Reject</button>
</div>
<script>
function accept() {
var data = [{
key: "accept",
value: true
}, {
key: "comment",
value: document.getElementById("form_comment").value
}];
completeTask(data);
}
function reject() {
var data = [{
key: "accept",
value: false
}, {
key: "comment",
value: document.getElementById("form_comment").value
}];
completeTask(data);
}
</script>