-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlabel-modal.php
executable file
·334 lines (316 loc) · 15.7 KB
/
label-modal.php
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<?php
session_start();
$year = $_SESSION["year"];
?>
<div class="modal fade" id="label-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog label-width">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<p class="modal-title" id="myModalLabel">
<ul class="nav nav-tabs" id="firstTabs">
</ul>
</p>
</div>
<div class="modal-body">
<div class="container label-wrap">
<div class="row">
<h2>Interactive consumer information: retirement saving</h2>
</div>
<div class="row normal-top">
<h4 id="label-fund-name">Vanguard Total Stock Market Index Fund Investor Shares (VTSMX)</h4>
<p>
<span id="label-desc">Diversified fund with exposure to the entire U.S. stock market. 100% stock fund.</span>
</p>
</div>
<div class="row">
<div class="col-md-8">
<p class="red label-experiment-desc">Click the "See how changes affect fund performance" button, and change the annual growth, volatility and fees to see how they affect the fund's performance.</p>
</div>
<div class="col-md-4">
<button type="button" class="btn btn-danger label-experiment" id="tip-experiment" data-toggle="tooltip" title="Change fund attributes like growth rate, volatility and fees to see hypothetically how the fund would behave. This does not affect actual fund performance.">See how changes affect fund performance</button>
</div>
</div>
<div class="row thin-top">
<div class="col-md-7 right">
<b>Your saving timeframe is: <input id="label-timeframe" class="label-input" maxlength="2" placeholder=
"<?php
if (2016 - $year > 20) {
echo 20;
} else {
echo 2016 - $year;
}
?>"
> years</b>
</div>
<div class="col-md-5 right">
<b>Saving amount <input id="label-invest" class="label-input" maxlength="7" placeholder="$10,000" readonly></b>
</div>
</div>
<div class="row thick-top">
<div class="col-md-9">
<table id="hist-label" class="table label-table">
<col width="4%">
<col width="36%">
<col width="20%">
<col width="20%">
<col width="20%">
<tr>
<td><span class="glyphicon glyphicon-info-sign blue" id="tip-historical" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Historical returns of this fund over the past years and a benchmark comparison"></span></td>
<th>Historical growth</th>
<td class="right"><i>Last <span class="label-year1head">1</span> year</i></td>
<td class="right"><i>Last <span class="label-year2head">5</span> years</i></td>
<td class="right"><i>Last <span class="label-year3head">10</span> years</i></td>
</tr>
<tr>
<td></td>
<td>Historical growth of <span id="historical-growth-amount">$10,000</span></td>
<td class="right" id="label-hist1">$12,000</td>
<td class="right" id="label-hist2">$15,000</td>
<td class="right" id="label-hist3">$18,000</td>
</tr>
<tr>
<td></td>
<td>
Benchmark comparison<br>
<small>(S&P 500 index fund)</small>
</td>
<td class="right" id="label-hbench1">$11,000</td>
<td class="right" id="label-hbench2">$11,000</td>
<td class="right" id="label-hbench3">$12,000</td>
</tr>
</table>
</div>
<div class="col-md-3">
<div class="small-top-pad"></div>
<div align="right">
<input id="label-growth-pct" class="pct-display" size="4" maxlength="4" placeholder="7.5" readonly>
<span class="pct-display-after">%</span>
<p class="pct-desc"><b>Annual growth </b><span class="glyphicon glyphicon-info-sign blue" id="tip-historical-pct" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="Yearly growth this fund based on historical data."></span></p>
</div>
</div>
</div>
<div class="row thin-top">
<div class="col-md-9">
<table id="estimates-label" class="table label-table">
<col width="4%">
<col width="36%">
<col width="20%">
<col width="20%">
<col width="20%">
<tr>
<td><span class="glyphicon glyphicon-info-sign blue" id="tip-growth" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Investment scenarios that show how this fund may fluctuate over time."></span></td>
<th>Growth estimates</th>
<td class="right"><i><span class="label-year1head">1</span> year estimate</i></td>
<td class="right"><i><span class="label-year2head">5</span> year estimate</i></td>
<td class="right"><i><span class="label-year3head">10</span> year estimate</i></td>
</tr>
<tr>
<td><span class="glyphicon glyphicon-info-sign blue" id="tip-best" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Estimated performance of this fund in a best case scenario."></span></td>
<td>Best case</td>
<td id="label-best1" class="right">$14,000</td>
<td id="label-best2" class="right">$17,000</td>
<td id="label-best3" class="right">$22,000</td>
</tr>
<tr>
<td><span class="glyphicon glyphicon-info-sign blue" id="tip-likely" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Estimated performance of this fund in an average case scenario."></span></td>
<td>Average case</td>
<td id="label-likely1" class="right">$12,000</td>
<td id="label-likely2" class="right">$15,000</td>
<td id="label-likely3" class="right">$18,000</td>
</tr>
<tr>
<td><span class="glyphicon glyphicon-info-sign blue" id="tip-worst" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Estimated performance of this fund in a worst case scenario."></span></td>
<td>Worst case</td>
<td id="label-worst1" class="right">$10,000</td>
<td id="label-worst2" class="right">$11,000</td>
<td id="label-worst3" class="right">$22,000</td>
</tr>
</table>
</div>
<div class="col-md-3">
<div class="small-top-pad"></div>
<div class="volatility-pct-display" align="right">
<input id="label-volatility-pct" class="pct-display" size="4" maxlength="4" placeholder="4.0" readonly><span class="plus-minus">+/-</span>
<span class="pct-display-after">%</span>
<p class="pct-desc"><b>Volatility </b><span class="glyphicon glyphicon-info-sign blue" id="tip-volatility-pct" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="Shows the likely fluctuation of this fund on a yearly basis based on historical data."></span></p>
</div>
</div>
</div>
<div class="row thin-top">
<div class="col-md-9">
<table id="fees-label" class="table label-table">
<col width="4%">
<col width="36%">
<col width="20%">
<col width="20%">
<col width="20%">
<tr>
<td><span class="glyphicon glyphicon-info-sign blue" id="tip-fees" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Fees you pay for owning this fund such as management fees or redemption fees."></span></td>
<th>Fees and costs</th>
<td class="right"><i><span class="label-year1head">1</span> year</i></td>
<td class="right"><i><span class="label-year2head">5</span> year</i></td>
<td class="right"><i><span class="label-year3head">10</span> year</i></td>
</tr>
<tr>
<td><span class="glyphicon glyphicon-info-sign blue" id="tip-fees-over-time" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="The expense ratio is the annual fee that all funds charge. It expresses the percentage of assets deducted each fiscal year for fund expenses."></span></td>
<td>
Fees over time<br>
<small>(<span id="expense-ratio">0.17%</span> expense ratio)</small>
</td>
<td class="right">-<span id="label-fee1">$17</span></td>
<td class="right">-<span id="label-fee2">$85</span></td>
<td class="right">-<span id="label-fee3">$170</span></td>
</tr>
<tr>
<td></td>
<td nowrap>
Benchmark comparison<br>
<small>(0.8% expense ratio for S&P 500 index funds)</small>
</td>
<td class="right">-<span id="label-lbench1">$30</span></td>
<td class="right">-<span id="label-lbench2">$160</span></td>
<td class="right">-<span id="label-lbench3">$340</span></td>
</tr>
</table>
</div>
<div class="col-md-3">
<div class="small-top-pad"></div>
<div align="right">
<input id="label-fee-pct" class="pct-display" size="4" maxlength="4" placeholder="0.3" readonly>
<span class="pct-display-after">%</span>
<p class="pct-desc"><b>Annual fees </b><span class="glyphicon glyphicon-info-sign blue" id="tip-fees-pct" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="Percentage of fund used to pay for fees each year."></span></p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 right small-bottom-pad">
<button type="button" id="apply-btn" class="btn btn-primary">Apply changes</button>
</div>
</div>
<div class="error-label alert alert-danger" style="display: none;" role="alert">
<div class="error-label" style="display: none;">
<span class="glyphicon glyphicon-exclamation-sign"></span> Please enter percentages into the fields.
</div>
</div>
<div id="label-bottom" class="row thin-top">
<div class="col-md-6">
<div class="right-divider">
<p>
<h3 class="label-title">Ratings and risk</h3>
<!--<small>(Provided by Morningstar)</small>-->
</p>
<table class="ratings-risk">
<col width="120px">
<col width="120px">
<col width="120px">
<tr>
<td>3 year rating</td>
<td><big id="label-3rating"></big></td>
<td>
<div class="label-option">
<div class="label-inner-option">
<div class="label-option-card">
<p id="label-3return">A</p>
</div>
</div>
<div class="label-option-details">
<p>Return</p>
</div>
</div>
</td>
<td>
<div class="center">
<div class="label-inner-option">
<div class="label-option-card">
<p id="label-3risk">B</p>
</div>
</div>
<div class="label-option-details">
<p>Risk</p>
</div>
</div>
</td>
</tr>
<tr>
<td>5 year rating</td>
<td><big id="label-5rating"></big></td>
<td>
<div class="center">
<div class="label-inner-option">
<div class="label-option-card">
<p id="label-5return">A</p>
</div>
</div>
<div class="label-option-details">
<p>Return</p>
</div>
</div>
</td>
<td>
<div class="center">
<div class="label-inner-option">
<div class="label-option-card">
<p id="label-5risk">B</p>
</div>
</div>
<div class="label-option-details">
<p>Risk</p>
</div>
</div>
</td>
</tr>
<tr>
<td>10 year rating</td>
<td><big id="label-10rating"></big></td>
<td>
<div class="center">
<div class="label-inner-option">
<div class="label-option-card">
<p id="label-10return">A</p>
</div>
</div>
<div class="label-option-details">
<p>Return</p>
</div>
</div>
</td>
<td>
<div class="center">
<div class="label-inner-option">
<div class="label-option-card">
<p id="label-10risk">B</p>
</div>
</div>
<div class="label-option-details">
<p>Risk</p>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="col-md-6">
<div class="recommendation-label">
<h3 class="label-title">Recommendation</h3>
<div class="row">
<div class="col-md-4">
<i class="fa fa-check-circle green recommend-icon"></i>
<i class="fa fa-times-circle red reject-icon"></i>
</div>
<div class="col-md-7 recommend-text">
<p>
<h4 id="label-recommend-head">Recommended to you for</h4>
<span id="label-recommend">Retirement saving</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>