This repository was archived by the owner on Aug 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
public/modules/articles/views Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 3
3
< h1 > New Article</ h1 >
4
4
</ div >
5
5
< div class ="col-md-12 ">
6
- < form name ="articleForm " class ="form-horizontal " data-ng-submit ="create(articleForm.$valid ) " novalidate >
6
+ < form name ="articleForm " class ="form-horizontal " data-ng-submit ="create() " novalidate >
7
7
< fieldset >
8
- < div class ="form-group " ng-class ="{ 'has-error' : submitted && articleForm.title.$invalid} ">
8
+ < div class ="form-group " ng-class ="{ 'has-error': articleForm.title.$dirty && articleForm.title.$invalid } ">
9
9
< label class ="control-label " for ="title "> Title</ label >
10
10
< div class ="controls ">
11
11
< input name ="title " type ="text " data-ng-model ="title " id ="title " class ="form-control " placeholder ="Title " required >
12
12
</ div >
13
- < div ng-show ="submitted && articleForm.title.$invalid " class ="help-block ">
14
- < p ng-show ="articleForm.title.$error.required " class ="text-danger "> Title is required</ p >
15
- </ div >
16
13
</ div >
17
- < div class ="form-group " ng-class =" { 'has-error' : submitted && articleForm.content.$invalid} " >
14
+ < div class ="form-group ">
18
15
< label class ="control-label " for ="content "> Content</ label >
19
16
< div class ="controls ">
20
- < textarea name ="content " data-ng-model ="content " id ="content " class ="form-control " cols ="30 " rows ="10 " placeholder ="Content " required > </ textarea >
21
- </ div >
22
- < div ng-show ="submitted && articleForm.content.$invalid " class ="help-block ">
23
- < p ng-show ="articleForm.content.$error.required " class ="text-danger "> Content is required</ p >
17
+ < textarea name ="content " data-ng-model ="content " id ="content " class ="form-control " cols ="30 " rows ="10 " placeholder ="Content "> </ textarea >
24
18
</ div >
25
19
</ div >
26
20
< div class ="form-group ">
@@ -32,4 +26,4 @@ <h1>New Article</h1>
32
26
</ fieldset >
33
27
</ form >
34
28
</ div >
35
- </ section >
29
+ </ section >
You can’t perform that action at this time.
0 commit comments