Merge pull request #480 from vlad-ya/fix-ftp-user-names

Fix for the ftp user name prefix corruption
This commit is contained in:
Serghey Rodin 2015-11-04 21:32:52 +02:00
commit 5e3a3bc901
2 changed files with 4 additions and 4 deletions

View file

@ -3,11 +3,11 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
$(elm).parent().find('.hint').html('');
}
//hint = hint.replace(/[^\w\d]/gi, '');
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
}
hint = hint.replace(/[^\w\d]/gi, '');
$(elm).parent().find('.v-ftp-user').val(hint);
$(elm).parent().find('.hint').text(GLOBAL.FTP_USER_PREFIX + hint);
}

View file

@ -3,11 +3,11 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
$(elm).parent().find('.hint').html('');
}
//hint = hint.replace(/[^\w\d]/gi, '');
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
}
hint = hint.replace(/[^\w\d]/gi, '');
$(elm).parent().find('.v-ftp-user').val(hint);
$(elm).parent().find('.hint').text(GLOBAL.FTP_USER_PREFIX + hint);
}