Spaces:
Runtime error
Runtime error
Vinay Jose
commited on
Create new.html
Browse files- templates/new.html +34 -0
templates/new.html
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{% extends 'layout.html' %}
|
2 |
+
|
3 |
+
{% block content %}
|
4 |
+
|
5 |
+
<form action="/contacts/new" 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 or '' }}"/>
|
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 or '' }}"/>
|
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 or '' }}"/>
|
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 or '' }}"/>
|
26 |
+
<span class="error">{{ contact.errors['phone'] }}</span>
|
27 |
+
</p>
|
28 |
+
<button>Save</button>
|
29 |
+
</fieldset>
|
30 |
+
</form>
|
31 |
+
<p>
|
32 |
+
<a href="/contacts">Back</a>
|
33 |
+
</p>
|
34 |
+
{% endblock %}
|