-
Notifications
You must be signed in to change notification settings - Fork 1
/
addentry.html
41 lines (41 loc) · 2.11 KB
/
addentry.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<div class="container-fluid addentrypage">
<form id="addentryform" class="form-horizontal row-fluid" name="addentryform" novalidate>
<div class="centeralign">
<div class="formarea">
<div class="col-sm-6 col-md-6">
<label for="date" class="control-label">Date</label>
<input type="date" required class="form-control" ng-model="newEntry.todayDate" min="0001-01-01" max="9999-12-31" id="date" placeholder="Entry Date (yyyy-MM-dd)">
</div>
<div class="col-sm-6 col-md-6">
<label for="desc" class="control-label">Expense Description</label>
<input type="text" required class="form-control" ng-model="newEntry.description" id="desc" placeholder="Description">
</div>
<div class="col-sm-6 col-md-6">
<label for="amount" class="control-label">Amount</label>
<input type="number" required class="form-control" ng-model="newEntry.amount" id="amount" placeholder="Amount">
</div>
<div class="col-sm-6 col-md-6">
<label for="type" class="control-label">Type</label>
<select class="form-control" ng-model="newEntry.typeOfTransaction" ng-change="(newEntry.typeOfTransaction != 'Deposit') ? category='Cash' : category" id="type">
<option>Debit</option>
<option>Transfer</option>
<option>Credit</option>
</select>
</div>
<div class="col-sm-6 col-md-6" ng-class="{disable:(newEntry.typeOfTransaction != 'Debit')}">
<label for="category" class="control-label">Category</label>
<select class="form-control" id="category" ng-model="newEntry.category" required>
<option ng-repeat="category in categories.data">{{category.name}}</option>
</select>
</div>
<div class="col-sm-6 col-md-6 hidden-xs">
<input type="button" value="Add Entry" ng-click="addEntry()" class="btn btn-primary"/>
</div>
</div>
<div class="alert validationmsg" ng-class="{'alert-danger':addentryform.$invalid,'scale':bounceValidation,'alert-success':addentryform.$valid}" role="alert">
<span ng-show="!addentryform.$valid">Enter the required details to proceed.</span>
<span ng-show="addentryform.$valid"><b>Success!! </b>you are ready to proceed.</span>
</div>
</div>
</form>
</div>