Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (101 sloc) 9.51 KB
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--<![endif]-->
<head>
<title>Form Validation Demo | Carey Development Demos</title>
<meta content="Form Validation Demo" name="description" />
<object th:include="fragments/head :: head" th:remove="tag"></object>
<link th:href="@{/assets/pages/css/profile.min.css}" rel="stylesheet" type="text/css" />
</head>
<body class="page-container-bg-solid">
<div th:include="fragments/topmenuheader :: header"></div>
<div class="page-container">
<div class="page-content-wrapper">
<div class="page-head" style="background-color:#eff3f8;padding-top:40px">
<div class="container">
<div class="row">
<div class="col-md-6 ">
<div class="portlet box blue ">
<div class="portlet-title">
<div class="caption">
<i class="icon-user"></i>
<span class="caption-subject" style="position:relative;top:2px">Employee Form</span>
</div>
</div>
<div class="portlet-body form">
<form id="employeeForm" th:action="@{/form}" th:object="${employee}" method="POST">
<div class="form-body">
<div class="form-group" th:classappend="${#fields.hasErrors('firstName')} ? has-error : ''">
<label>First Name</label>
<div th:classappend="${#fields.hasErrors('firstName')} ? 'input-icon right' : ''">
<i th:if="${#fields.hasErrors('firstName')}" class="fa fa-exclamation tooltips" data-original-title="please enter a valid first name" data-container="body"></i>
<input type="text" class="form-control" maxlength="32" th:field="*{firstName}" placeholder="Between 1 and 32 characters"/>
<span th:if="${#fields.hasErrors('firstName')}" class="help-block" th:errors="*{firstName}"></span>
</div>
</div>
<div class="form-group" th:classappend="${#fields.hasErrors('lastName')} ? has-error : ''">
<label>Last Name</label>
<div th:classappend="${#fields.hasErrors('lastName')} ? 'input-icon right' : ''">
<i th:if="${#fields.hasErrors('lastName')}" class="fa fa-exclamation tooltips" data-original-title="please enter a valid last name" data-container="body"></i>
<input type="text" class="form-control" maxlength="32" th:field="*{lastName}" placeholder="Between 1 and 32 characters"/>
<span th:if="${#fields.hasErrors('lastName')}" class="help-block" th:errors="*{lastName}"></span>
</div>
</div>
<div class="form-group" th:classappend="${#fields.hasErrors('ssn')} ? has-error : ''">
<label>SSN</label>
<div th:classappend="${#fields.hasErrors('ssn')} ? 'input-icon right' : ''">
<i th:if="${#fields.hasErrors('ssn')}" class="fa fa-exclamation tooltips" data-original-title="please enter a valid ssn" data-container="body"></i>
<input type="text" class="form-control" maxlength="11" th:field="*{ssn}" placeholder="Be sure to include dashes"/>
<span th:if="${#fields.hasErrors('ssn')}" class="help-block" th:errors="*{ssn}"></span>
</div>
</div>
<div class="form-group" th:classappend="${#fields.hasErrors('emailAddress')} ? has-error : ''">
<label>Email Address</label>
<div th:classappend="${#fields.hasErrors('emailAddress')} ? 'input-icon right' : ''">
<i th:if="${#fields.hasErrors('emailAddress')}" class="fa fa-exclamation tooltips" data-original-title="please enter a valid email address" data-container="body"></i>
<input type="text" class="form-control" maxlength="64" th:field="*{emailAddress}" placeholder="For example: joe@xyz.com"/>
<span th:if="${#fields.hasErrors('emailAddress')}" class="help-block" th:errors="*{emailAddress}"></span>
</div>
</div>
<div class="form-group" th:classappend="${#fields.hasErrors('hoursPerWeek')} ? has-error : ''">
<label>Hours Per Week</label>
<div th:classappend="${#fields.hasErrors('hoursPerWeek')} ? 'input-icon right' : ''">
<i th:if="${#fields.hasErrors('hoursPerWeek')}" class="fa fa-exclamation tooltips" data-original-title="please enter a valid number of hours per week" data-container="body"></i>
<input type="text" class="form-control" maxlength="2" th:field="*{hoursPerWeek}" placeholder="A number between 10 and 40"/>
<span th:if="${#fields.hasErrors('hoursPerWeek')}" class="help-block" th:errors="*{hoursPerWeek}"></span>
</div>
</div>
<div class="form-group" th:classappend="${#fields.hasErrors('department')} ? has-error : ''">
<label>Department</label>
<div th:classappend="${#fields.hasErrors('department')} ? 'input-icon right' : ''">
<i th:if="${#fields.hasErrors('department')}" class="fa fa-exclamation tooltips" data-original-title="please select a department" data-container="body"></i>
<select class="form-control" th:field="*{department}">
<option value="">-SELECT-</option>
<option value="Accounting">Accounting</option>
<option value="Finance">Finance</option>
<option value="Marketing">Marketing</option>
<option value="IT">IT</option>
</select>
<span th:if="${#fields.hasErrors('department')}" class="help-block" th:errors="*{department}"></span>
</div>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn blue">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div th:include="fragments/homefooter :: footer"></div>
<script th:src="@{/assets/pages/scripts/profile.js}" type="text/javascript"></script>
</body>
</html>