<html xmlns:th="http://www.thymeleaf.org"
  th:replace="~{fragments/layout :: layout (~{::body},'parents')}">

<body>

  <h2>Parent</h2>
  <form th:object="${parent}" class="form-horizontal" id="add-parent-form" method="post">
    <div class="form-group has-feedback">
      <input
        th:replace="~{fragments/inputField :: input ('First Name', 'firstName')}" />
      <input
        th:replace="~{fragments/inputField :: input ('Last Name', 'lastName')}" />
      <input
        th:replace="~{fragments/inputField :: input ('Address', 'address')}" />
      <input
        th:replace="~{fragments/inputField :: input ('City', 'city')}" />
      <input
        th:replace="~{fragments/inputField :: input ('Telephone', 'telephone')}" />
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button
          th:with="text=${parent['new']} ? 'Add Parent' : 'Update Parent'"
          class="btn btn-default" type="submit" th:text="${text}">Add
          Parent</button>
      </div>
    </div>
  </form>
</body>
</html>
