forked from realpython/materials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.html
75 lines (68 loc) · 2.09 KB
/
notes.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
{% extends "parent.html" %}
{% block title %}Notes{% endblock %}
{% block head %}
{{ super() }}
<link rel="stylesheet" href="/static/css/notes.css">
{% endblock %}
{% block page_name %}Person Note Create/Update/Delete Page{% endblock %}
{% block body %}
<div class="container">
<input id="url_person_id" type="hidden" value="{{ person_id }}" />
<input id="url_note_id" type="hidden" value="{{ note_id }}" />
<div class="section display">
<div>
<span>Person ID:</span>
<span id="person_id"></span>
</div>
<div>
<span>First Name:</span>
<span id="fname"></span>
</div>
<div>
<span>Last Name:</span>
<span id="lname"></span>
</div>
<div>
<span>Timestamp:</span>
<span id="timestamp"></span>
</div>
</div>
<div class="section editor">
<div>
<span>Note ID:</span>
<span id="note_id"></span>
</div>
<label for="note">Note
<input id="note" type="text" maxlength="200"/>
</label>
<br />
<button id="create">Create</button>
<button id="update">Update</button>
<button id="delete">Delete</button>
<button id="reset">Reset</button>
</div>
</div>
<div class="notes">
<table>
<caption>Notes</caption>
<thead>
<tr>
<th class="timestamp">Update Time</th>
<th class="content">Content</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="error"></div>
{% endblock %}
{% block javascript %}
{{ super() }}
<script type="module">
// Give the imported MVC components a namespace
import * as MVC from "/static/js/notes.js";
// Create an intentional global variable referencing the import
window.mvc = MVC;
</script>
{% endblock %}