Spaces:
Runtime error
Runtime error
Vinay Jose
commited on
Create edit.html
Browse files- templates/edit.html +37 -0
templates/edit.html
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{% extends 'layout.html' %}
|
2 |
+
|
3 |
+
{% block content %}
|
4 |
+
|
5 |
+
<form action="/contacts/{{ contact.id }}/edit" method="post">
|
6 |
+
<fieldset>
|
7 |
+
<legend>Contact Info</legend>
|
8 |
+
<p>
|
9 |
+
<label for="email">Email</label>
|
10 |
+
<input name="email" id="email" type="text" placeholder="Email" value="{{ contact.email }}"/>
|
11 |
+
<span class="error">{{ contact.errors["email"] }}</span>
|
12 |
+
</p>
|
13 |
+
<p>
|
14 |
+
<label for="first">First Name</label>
|
15 |
+
<input name="first" id="first" type="text" placeholder="First Name" value="{{ contact.first }}"/>
|
16 |
+
<span class="error">{{ contact.errors["first"] }}</span>
|
17 |
+
</p>
|
18 |
+
<p>
|
19 |
+
<label for="last">Last Name</label>
|
20 |
+
<input name="last" id="last" type="text" placeholder="Last Name" value="{{ contact.last }}"/>
|
21 |
+
<span class="error">{{ contact.errors["last"] }}</span>
|
22 |
+
</p>
|
23 |
+
<p>
|
24 |
+
<label for="phone">Phone</label>
|
25 |
+
<input name="phone" id="phone" type="text" placeholder="Phone" value="{{ contact.phone }}"/>
|
26 |
+
<span class="phone">{{ contact.errors["phone"]}}</span>
|
27 |
+
</p>
|
28 |
+
<button>Save</button>
|
29 |
+
</fieldset>
|
30 |
+
</form>
|
31 |
+
<form action="/contacts/{{ contact.id }}/delete" method="post">
|
32 |
+
<button>Delete Contact</button>
|
33 |
+
</form>
|
34 |
+
<p>
|
35 |
+
<a href="/contacts">Back</a>
|
36 |
+
</p>
|
37 |
+
{% endblock %}
|