提交 9ed5a1af 编写于 作者: D Dmitriy Zaporozhets

Merge pull request #617 from iamntz/ssh_key_improvements

Automagically fills the email on add ssh key page
%h3 New key
%hr
= render 'form'
:javascript
$('#key_key').on('keyup', 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);
if( key_mail && key_mail.length > 0 && title.val() == '' ){
$('#key_title').val( key_mail );
}
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册