<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
</div>
<div class="panel-body">
<form method="get" action="${query}">
- <p><input type="checkbox" name="option" value="AllDates" checked="checked" onclick="hide(this, 'date');"> Query for all dates<br>
- <div id='date' style="visibility:hidden;">
- <p>
- Jobs executed
- from <input type="text" name="date1" value="${date1}" style="width: 145px;" />
- to <input type="text" name="date2" value="${date2}" style="width: 145px;" />
- </p>
- </div>
- <input type="hidden" name="option" value="off" />
- <input type="submit" name="Search" value="Search" />
+ <c:choose>
+ <c:when test="${error == null}">
+ <div class="form-group">
+ <p><input type="checkbox" name="option" value="AllDates" checked="checked" onclick="hide(this, 'date');"> Query for all dates<br>
+ <div id='date' style="visibility:hidden;">
+ <p>
+ Jobs executed
+ from <input type="text" name="date1" value="${date1}" style="width: 145px;" />
+ to <input type="text" name="date2" value="${date2}" style="width: 145px;" />
+ </p>
+ </div>
+ <input type="hidden" name="option" value="off" />
+ <input type="submit" name="Search" value="Search" />
+ </div>
+ </c:when>
+ <c:otherwise>
+ <div class="form-group has-error">
+ <p><input type="checkbox" name="option" value="AllDates" onclick="hide(this, 'dateError');"> Query for all dates<br>
+ <div id='dateError' style="visibility:visible;">
+ <p>
+ Jobs executed
+ from <input type="text" name="date1" value="${date1}" style="width: 145px;" />
+ to <input type="text" name="date2" value="${date2}" style="width: 145px;" />
+ </p>
+ <p class="help-block">${error}</p>
+ </div>
+ <input type="hidden" name="option" value="off" />
+ <input type="submit" name="Search" value="Search" />
+ </div>
+ </c:otherwise>
+ </c:choose>
</form>
</div>
</div>