-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathtask-form.html
More file actions
65 lines (55 loc) · 2 KB
/
task-form.html
File metadata and controls
65 lines (55 loc) · 2 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
<form role="form" name="form">
<script cam-script type="text/form-script">
camForm.on('form-loaded', function() {
camForm.variableManager.fetchVariable('loanType');
camForm.variableManager.fetchVariable('loanAmount');
camForm.variableManager.fetchVariable('loanRuntime');
camForm.variableManager.fetchVariable('gender');
camForm.variableManager.fetchVariable('firstname');
camForm.variableManager.fetchVariable('lastname');
camForm.variableManager.fetchVariable('address');
camForm.variableManager.fetchVariable('email');
});
camForm.on('variables-restored', function() {
$scope.loanType = camForm.variableManager.variableValue('loanType');
$scope.loanAmount = camForm.variableManager.variableValue('loanAmount');
$scope.loanRuntime = camForm.variableManager.variableValue('loanRuntime');
$scope.gender = camForm.variableManager.variableValue('gender');
$scope.firstname = camForm.variableManager.variableValue('firstname');
$scope.lastname = camForm.variableManager.variableValue('lastname');
$scope.address = camForm.variableManager.variableValue('address');
$scope.email = camForm.variableManager.variableValue('email');
console.log("setting variables to scope");
});
</script>
<h2>Request Summary</h2>
<table>
<tr>
<td>Type of the loan:</td>
<td>{{ loanType }}</td>
</tr>
<tr>
<td>Amount:</td>
<td>{{loanAmount}}</td>
</tr>
<tr>
<td>Runtime (Years):</td>
<td>{{loanRuntime}}</td>
</tr>
</table>
<h2>Contact Data:</h2>
<address>
<strong>
<span ng-if="gender == 'f'">Mrs.</span>
<span ng-if="gender == 'm'">Mr.</span>
{{firstname}} {{lastname}}
</strong><br>
{{address}}<br>
<a href="mailto:{{email}}">{{email}}</a>
</address>
<h2>Approval</h2>
Do you approve this request?
<div class="form-group">
<input type="checkbox" cam-variable-name="approved" cam-variable-type="Boolean"/>
</div>
</form>