File tree 4 files changed +6
-6
lines changed
4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -48,5 +48,4 @@ public Result deleteById( @PathVariable(value = "contactId") Integer id){
48
48
return service .deleteById (id );
49
49
}
50
50
51
-
52
51
}
Original file line number Diff line number Diff line change 7
7
8
8
@ Service
9
9
public class LoginService {
10
+
10
11
@ Autowired
11
12
Session session ;
12
13
Original file line number Diff line number Diff line change 20
20
Add
21
21
</ button >
22
22
< button type ="button "
23
- class ="btn btn-warning mb-2 "
23
+ class ="btn btn-warning mb-2 float-right "
24
24
id ="logout ">
25
25
Logout
26
26
</ button >
@@ -118,8 +118,8 @@ <h5 class="modal-title">Are you sure to delete this contact?</h5>
118
118
if ( contactName . val ( ) . length < 5 || contactNumber . val ( ) . length != 12 ) {
119
119
validateName . show ( 500 ) ;
120
120
validateNumber . show ( 500 ) ;
121
- setTimeout ( function ( ) {
122
- validateName . hide ( 500 ) ;
121
+ setTimeout ( function ( ) {
122
+ validateName . hide ( 500 ) ;
123
123
validateNumber . hide ( 500 ) ;
124
124
} , 4000 )
125
125
} else {
@@ -165,7 +165,7 @@ <h5 class="modal-title">Are you sure to delete this contact?</h5>
165
165
contactModal . find ( '.modal-title' ) . text ( 'Add contact' ) ;
166
166
contactModal . modal ( 'toggle' ) ;
167
167
contactForm [ 0 ] . reset ( ) ;
168
- } )
168
+ } ) ;
169
169
logout . click ( function ( ) {
170
170
if ( confirm ( 'Are you sure to logout' ) ) {
171
171
$ . ajax ( {
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ <h3 class="alert-info" style="display: none" id="error"> Login or Password is wr
31
31
var error = $ ( "#error" ) ;
32
32
var authForm = $ ( "#authForm" ) ;
33
33
var btnAuth = $ ( "#btnAuth" ) ;
34
+
34
35
$ ( document ) . ready ( function ( ) {
35
36
btnAuth . click ( function ( event ) {
36
37
event . preventDefault ( ) ;
@@ -43,7 +44,6 @@ <h3 class="alert-info" style="display: none" id="error"> Login or Password is wr
43
44
if ( data . success ) {
44
45
document . location = '/index' ;
45
46
} else {
46
- alert ( data . message ) ;
47
47
error . show ( 500 ) ;
48
48
}
49
49
}
You can’t perform that action at this time.
0 commit comments