File tree Expand file tree Collapse file tree 13 files changed +6236
-4
lines changed
artifacts/SoftwareDeveloping_PJ_war_exploded
classes/fudan/sd/project/utils
production/SoftwareDeveloping-PJ/fudan/sd/project/utils Expand file tree Collapse file tree 13 files changed +6236
-4
lines changed Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ function submitForm ( ) {
2
+ console . log ( $ ( "#pass" ) . val ( ) ) ;
3
+ // Encrypt with the public key...
4
+ var hash = md5 ( $ ( '#pass' ) . val ( ) ) ;
5
+ if ( document . getElementById ( "pass" ) . value !== '' ) {
6
+ document . getElementById ( "pass" ) . value = hash ;
7
+ }
8
+ if ( document . getElementById ( "passwordConfirm" ) !== null ) {
9
+ if ( document . getElementById ( "passwordConfirm" ) . value !== '' ) {
10
+ document . getElementById ( "passwordConfirm" ) . value = hash ;
11
+ }
12
+ }
13
+ return true ;
14
+ }
Original file line number Diff line number Diff line change 47
47
<h1 class =" mb-1" >Welcome back</h1 >
48
48
<span >Enter your account details below</span >
49
49
</div >
50
- <form action =" /SoftwareDeveloping_PJ_war_exploded/account/login" method =" post" id =" formLogin" >
50
+ <form action =" /SoftwareDeveloping_PJ_war_exploded/account/login" method =" post" id =" formLogin" onsubmit = " return submitForm() " >
51
51
<div class =" form-group" >
52
52
<input type =" text" name =" userName" id =" userName" placeholder =" User Name" class =" form-control" value =" ${ param. userName } " >
53
53
</div >
99
99
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/bootstrap.js" ></script >
100
100
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/bootstrapValidator.min.js" ></script >
101
101
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/async-google-recaptcha.js" ></script >
102
+ <script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/md5.js" ></script >
103
+ <script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/myEncrypt.js" ></script >
102
104
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/login.js" ></script >
103
105
104
106
<script >
109
111
}
110
112
$ (' .g-recaptcha' ).asyncReCAPTCHA ({
111
113
})
114
+
115
+ $ (' #formLogin' ).submit (function (e ) {
116
+ if (e .isDefaultPrevented ()) return false ;
117
+ submitForm ();
118
+ })
119
+
112
120
})
113
121
function robotVerified (token ){
114
122
console .log (token);
Original file line number Diff line number Diff line change 46
46
<h1 class =" mb-1" >Create Account</h1 >
47
47
<span >No credit card required</span >
48
48
</div >
49
- <form action =" /SoftwareDeveloping_PJ_war_exploded/account/register" method =" post" id =" formRegister" >
49
+ <form action =" /SoftwareDeveloping_PJ_war_exploded/account/register" method =" post" id =" formRegister" onsubmit = " return submitForm() " >
50
50
<div class =" form-group" >
51
51
<input type =" text" name =" userName" id =" userName" placeholder =" User Name" class =" form-control" >
52
52
</div >
127
127
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/bootstrapValidator.min.js" ></script >
128
128
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/register.js" ></script >
129
129
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/async-google-recaptcha.js" ></script >
130
+ <script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/md5.js" ></script >
131
+ <script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/myEncrypt.js" ></script >
130
132
<script type =" text/javascript" src =" /SoftwareDeveloping_PJ_war_exploded/js/theme.js" ></script >
131
133
132
134
<script >
142
144
}
143
145
$ (' .g-recaptcha' ).asyncReCAPTCHA ({
144
146
})
147
+
148
+ $ (' #formRegister' ).submit (function (e ) {
149
+ if (e .isDefaultPrevented ()) return false ;
150
+ submitForm ();
151
+ })
145
152
})
146
153
</script >
147
154
</body >
You can’t perform that action at this time.
0 commit comments