gitlab-org--gitlab-foss/app/views/profiles/keys/new.html.haml
Dmitriy Zaporozhets 010a770b3f
Migrate forms and inputs pt1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-31 02:50:36 +02:00

16 lines
506 B
Text

%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_ssh_path}.
%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 );
}
});