{{set . "title" "Register"}}
{{template "header.html" .}}

<h1>Register:</h1>

<form action="{{url "Application.SaveUser"}}" method="POST">
  {{with $field := field "user.Username" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>Username:</strong>
      <input type="text" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> *
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  {{with $field := field "user.Name" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>Real name:</strong> <input type="text" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> *
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  {{with $field := field "user.Password" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>Password:</strong> <input type="password" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> *
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  {{with $field := field "verifyPassword" .}}
    <p class="{{$field.ErrorClass}}">
      <strong>Verify password:</strong> <input type="password" name="{{$field.Name}}" size="16" value="{{$field.Flash}}"> *
      <span class="error">{{$field.Error}}</span>
    </p>
  {{end}}
  <p class="buttons">
    <input type="submit" value="Register"> <a href="{{url "Application.Index"}}">Cancel</a>
  </p>
</form>

{{template "footer.html" .}}
