File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1491,10 +1491,10 @@ $(function () {
1491
1491
1492
1492
// Parse SSH Key
1493
1493
$ ( "#ssh-key-content" ) . on ( 'change paste keyup' , function ( ) {
1494
- var value = $ ( this ) . val ( ) ;
1495
- var arrays = value . split ( " " ) ;
1496
- if ( arrays . length === 3 && arrays [ 2 ] !== "" ) {
1497
- $ ( "#ssh-key- title" ) . val ( arrays [ 2 ] ) ;
1494
+ var arrays = $ ( this ) . val ( ) . split ( " " ) ;
1495
+ var $title = $ ( "#ssh-key-title" )
1496
+ if ( $title . val ( ) === "" && arrays . length === 3 && arrays [ 2 ] !== "" ) {
1497
+ $title . val ( arrays [ 2 ] ) ;
1498
1498
}
1499
1499
} ) ;
1500
1500
} ) ;
Original file line number Diff line number Diff line change 57
57
</div>
58
58
<div class="field {{if .Err_Title}}error{{end}}">
59
59
<label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
60
- <input id="title" name="title" value="{{.title}}" autofocus required>
60
+ <input id="ssh-key- title" name="title" value="{{.title}}" autofocus required>
61
61
</div>
62
62
<div class="field {{if .Err_Content}}error{{end}}">
63
63
<label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
64
- <textarea id="content" name="content" required>{{.content}}</textarea>
64
+ <textarea id="ssh-key- content" name="content" required>{{.content}}</textarea>
65
65
</div>
66
66
<button class="ui green button">
67
67
{{.i18n.Tr "repo.settings.add_deploy_key"}}
You can’t perform that action at this time.
0 commit comments