Skip to content

Commit 1479f74

Browse files
committed
add add.html view
based on Step 7
1 parent 8cc00ce commit 1479f74

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

public/views/add.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="container">
2+
<div class="panel panel-default">
3+
<div class="panel-heading">Add TV Show</div>
4+
<div class="panel-body">
5+
<form class="form" method="post" ng-submit="addShow()" name="addForm">
6+
<div class="form-group" ng-class="{ 'has-success' : addForm.showName.$valid && addForm.showName.$dirty, 'has-error' : addForm.showName.$invalid && addForm.showName.$dirty }">
7+
<input class="form-control" type="text" name="showName" ng-model="showName" placeholder="Enter TV show name" required autofocus>
8+
<div class="help-block text-danger" ng-if="addForm.showName.$dirty" ng-messages="addForm.showName.$error">
9+
<div ng-message="required">TV show name is required.</div>
10+
</div>
11+
</div>
12+
<button class="btn btn-primary" type="submit" ng-disabled="addForm.$invalid">Add</button>
13+
</form>
14+
</div>
15+
</div>
16+
</div>

0 commit comments

Comments
 (0)