forked from linnovate/mean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.html
28 lines (27 loc) · 1.54 KB
/
edit.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
<section data-ng-controller="ArticlesController" data-ng-init="findOne()">
<form name="articleForm" class="form-horizontal col-md-6" role="form" data-ng-submit="update(articleForm.$valid)" novalidate>
<div class="form-group" ng-class="{ 'has-error' : submitted && articleForm.title.$invalid }">
<label mean-token="'edit-title'" for="title" class="col-md-2 control-label">Title</label>
<div class="col-md-10">
<input name="title" type="text" class="form-control" data-ng-model="article.title" id="title" placeholder="Title" required>
<div ng-show="submitted && articleForm.title.$invalid" class="help-block">
<p ng-show="articleForm.title.$error.required">Title is required</p>
</div>
</div>
</div>
<div class="form-group" ng-class="{ 'has-error' : submitted && articleForm.content.$invalid }">
<label mean-token="'edit-content'" for="content" class="col-md-2 control-label">Content</label>
<div class="col-md-10">
<textarea name="content" data-ng-model="article.content" id="content" cols="30" rows="10" placeholder="Content" class="form-control" required></textarea>
<div ng-show="submitted && articleForm.content.$invalid" class="help-block">
<p ng-show="articleForm.content.$error.required">Content is required</p>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<button mean-token="'edit-submit'" type="submit" class="btn btn-default">Submit</button>
</div>
</div>
</form>
</section>