new.gohtml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {{define "new.html"}}
  2. {% extends 'layout.html' %}
  3. {{ block "content" . }}
  4. <form action="/contacts/new" method="post">
  5. <fieldset>
  6. <legend>Contact Values</legend>
  7. <div class="table rows">
  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_name">First Name</label>
  15. <input name="first_name" id="first_name" type="text" placeholder="First Name" value="{{ .contact.first }}">
  16. <span class="error">{{ .contact.errors.first }}</span>
  17. </p>
  18. <p>
  19. <label for="last_name">Last Name</label>
  20. <input name="last_name" id="last_name" 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="error">{{ .contact.errors.phone }}</span>
  27. </p>
  28. </div>
  29. <button>Save</button>
  30. </fieldset>
  31. </form>
  32. <p>
  33. <a href="/contacts">Back</a>
  34. </p>
  35. {{ end }}
  36. {{end}}