File tree Expand file tree Collapse file tree 3 files changed +1
-31
lines changed Expand file tree Collapse file tree 3 files changed +1
-31
lines changed Original file line number Diff line number Diff line change 19
19
</span>
20
20
</div>
21
21
22
- <div class="inline field {{if .Err_Auth}}error{{end}}">
23
- <label for="auth_username">{{.i18n.Tr "username"}}</label>
24
- <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
25
- </div>
26
- <input class="fake" type="password">
27
- <div class="inline field {{if .Err_Auth}}error{{end}}">
28
- <label for="auth_password">{{.i18n.Tr "password"}}</label>
29
- <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
30
- </div>
31
22
<div class="inline field {{if .Err_Auth}}error{{end}}">
32
23
<label for="auth_token">{{.i18n.Tr "access_token"}}</label>
33
24
<input id="auth_token" name="auth_token" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
Original file line number Diff line number Diff line change 19
19
</span>
20
20
</div>
21
21
22
- <div class="inline field {{if .Err_Auth}}error{{end}}">
23
- <label for="auth_username">{{.i18n.Tr "username"}}</label>
24
- <input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
25
- </div>
26
- <input class="fake" type="password">
27
- <div class="inline field {{if .Err_Auth}}error{{end}}">
28
- <label for="auth_password">{{.i18n.Tr "password"}}</label>
29
- <input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
30
- </div>
31
22
<div class="inline field {{if .Err_Auth}}error{{end}}">
32
23
<label for="auth_token">{{.i18n.Tr "access_token"}}</label>
33
24
<input id="auth_token" name="auth_token" value="{{.auth_token}}" {{if not .auth_token}}data-need-clear="true"{{end}}>
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ const $items = $('#migrate_items').find('.field');
7
7
export default function initMigration ( ) {
8
8
checkAuth ( ) ;
9
9
10
- $service . on ( 'change' , checkAuth ) ;
11
10
$user . on ( 'keyup' , ( ) => { checkItems ( false ) } ) ;
12
11
$pass . on ( 'keyup' , ( ) => { checkItems ( false ) } ) ;
13
12
$token . on ( 'keyup' , ( ) => { checkItems ( true ) } ) ;
@@ -23,19 +22,8 @@ export default function initMigration() {
23
22
24
23
function checkAuth ( ) {
25
24
const serviceType = $service . val ( ) ;
26
- const tokenAuth = $ ( `#service-${ serviceType } ` ) . data ( 'token' ) ;
27
25
28
- if ( tokenAuth ) {
29
- $user . parent ( ) . addClass ( 'disabled' ) ;
30
- $pass . parent ( ) . addClass ( 'disabled' ) ;
31
- $token . parent ( ) . removeClass ( 'disabled' ) ;
32
- } else {
33
- $user . parent ( ) . removeClass ( 'disabled' ) ;
34
- $pass . parent ( ) . removeClass ( 'disabled' ) ;
35
- $token . parent ( ) . addClass ( 'disabled' ) ;
36
- }
37
-
38
- checkItems ( tokenAuth ) ;
26
+ checkItems ( serviceType !== 1 ) ;
39
27
}
40
28
41
29
function checkItems ( tokenAuth ) {
You can’t perform that action at this time.
0 commit comments