gitlab-org--gitlab-foss/app/views/profiles/keys/new.html.haml

17 lines
527 B
Plaintext
Raw Normal View History

%h3.page-title Add an SSH Key
%p.light
Paste your public key here. Read more about how to generate a key on #{link_to "the SSH help page", help_page_path("ssh", "README")}.
%hr
2011-10-08 17:36:38 -04:00
= render 'form'
:javascript
2014-06-14 10:28:59 -04:00
$('#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);
if( key_mail && key_mail.length > 0 && title.val() == '' ){
$('#key_title').val( key_mail );
}
2014-09-30 10:41:48 -04:00
});