Commit 971101b7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ssh-key-title-fix' into 'master'

Title fix for new SSH Key

What does this MR do?
Wait until the user "finished" his input in the key field (focus lost) before copying the mail part to the title.

Are there points in the code the reviewer needs to double check?
No.

Why was this MR needed?
It is annoying that the title is updated while typing and never changed any more.

See #335
parents eadaa300 c92ce615
......@@ -5,7 +5,7 @@
= render 'form'
:javascript
$('#key_key').on('keyup', function(){
$('#key_key').on('focusout', function(){
var title = $('#key_title'),
val = $('#key_key').val(),
key_mail = val.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+|\.[a-zA-Z0-9._-]+)/gi);
......@@ -13,4 +13,4 @@
if( key_mail && key_mail.length > 0 && title.val() == '' ){
$('#key_title').val( key_mail );
}
});
});
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment