<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<title>Angular Forms</title>
	<link rel="stylesheet" href="../libs/bootstrap/dist/css/bootstrap.min.css">
	<style>
		.ng-valid.ng-dirty {
			border-color: green;
		}

		.ng-invalid.ng-dirty {
			border-color: red;
		}
	</style>
</head>

<body ng-app="formApp">
	<div class="container" ng-controller="formKontrol as forma">
		<div class="col-md-6 col-md-offset-3">

			<div class="page-header">
				<h1><span class="glyphicon glyphicon-envelope"></span> Kontakt</h1>
			</div>

			<div ng-show="forma.obavestenje" class="well">{{ forma.obavestenje }}</div>

			<form ng-submit="forma.obradi()">

				<div class="form-group">
					<label>Ime</label>
					<input type="text" name="ime" class="form-control" placeholder="Bruce Wayne" ng-model="forma.podaci.ime">
				</div>

				<div class="form-group">
					<label>Umetničko ime</label>
					<input type="text" name="nadimak" class="form-control" placeholder="Caped Crusader" ng-model="forma.podaci.nadimak">
				</div>

				<button type="submit" class="btn btn-success btn-lg btn-block">
        	<span class="glyphicon glyphicon-send"></span> Pošalji!
        </button>
			</form>

			<span class="help-block" ng-show="forma.greska">{{ forma.greska }}</span>

		</div>
	</div>

	<script src="../libs/angular-1.4.0/angular.min.js"></script>
	<script src="formKontrol.js"></script>
</body>

</html>
