Skip to content

Commit

Permalink
Fixes issue where thymeleaf is checking to see if errors are present.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsadam committed May 2, 2018
1 parent 3bc9955 commit b146793
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/webapp/pages/groups/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<main layout:fragment="page">
<div class="row">
<div class="col-md-8 col-md-offset-2 mrgn-tp-lg wb-frmvld">
<div class="col-md-8 col-md-offset-2">
<form role="form" action="/groups/1/edit"
th:action="@{/groups/{id}/edit(id=${group.id})}" method="post">
<section class="panel panel-default">
Expand All @@ -19,13 +19,13 @@ <h3 class="panel-title" th:text="#{group.create.details}">_Create Group_</h3>
<div class="panel-body">
<div class="form-group">
<label class="control-label" th:text="#{group.name}" for="name">_Group Name_</label>
<div th:if="${#maps.containsKey(#vars, 'errors') and #maps.containsKey(errors, 'name')}" th:text="${errors} ? ${errors.name} :''" class="alert alert-warning">_Group Name Error_</div>
<div th:if="${errors != null and #maps.containsKey(errors, 'name')}" th:text="${errors.name}" class="alert alert-warning">_Group Name Error_</div>
<input type="text" id="name" name="name" class="form-control input-full" required="required"
th:placeholder="#{group.name}" th:value="${given_name}" />
</div>
<div class="form-group">
<label class="control-label" th:text="#{group.description}" for="description">_Group Description_</label>
<div th:if="${#maps.containsKey(#vars, 'errors') and #maps.containsKey(errors, 'description')}" th:text="${errors} ? ${errors.description} :''" class="alert alert-warning">_Group Description Error_</div>
<div th:if="${errors != null and #maps.containsKey(errors, 'description')}" th:text="${errors.description}" class="alert alert-warning">_Group Description Error_</div>
<textarea class="form-control input-full" name="description" id="description"
rows="3" th:text="${given_description}"></textarea>
</div>
Expand Down

0 comments on commit b146793

Please sign in to comment.