Repository navigation
Expand file tree
/
Copy pathallocations.html
More file actions
53 lines (45 loc) · 2.13 KB
/
Copy pathallocations.html
File metadata and controls
53 lines (45 loc) · 2.13 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
{% extends "./layout.html" %} {% block title %}Allocations{% endblock %} {% block content %}
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Filter Assets based on Stock Performance
</h3>
</div>
<div class="panel-body">
<form action="/allocations/{{userId}}" method="get" role="search">
<div class="form-group">
<!--Fix for A1 - 2 NoSQL Injection - Provide validation for input.
Adhering to defence in depth, on the front-end mostly for UX.
The attacker, or user should not be able to enter anything other than 0-99.
Also implement fix in allocations-dao.js-->
<!--<input type="number" min="0" max="99" class="form-control" placeholder="Stocks Threshold" name="threshold" />-->
<input type="text" class="form-control" placeholder="Stocks Threshold" name="threshold" />
<p class="help-block">Using above threshold value, it will return all assets allocation above the specified stocks percentage number.</p>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
{% for allocation in allocations %}
<div class="panel panel-info">
<div class="panel-heading">
<strong>Asset Allocations for {{allocation.firstName}} {{allocation.lastName}}</strong>
</div>
<div class="panel-body">
<p>Domestic Stocks :
<strong>{{allocation.stocks}} %</strong>
</p>
<p>Funds:
<strong>{{allocation.funds}} %</strong>
</p>
<p>Bonds:
<strong>{{allocation.bonds}} %</strong>
</p>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}