mirror of
https://github.com/myvesta/vesta
synced 2025-07-10 15:23:15 -07:00
Added "admin_" prefix for ftp user names
Affected pages: Add/Edit Web entity for admin and user points
This commit is contained in:
parent
0593df0f83
commit
7c81fe71c5
9 changed files with 2593 additions and 1222 deletions
23
web/js/pages/edit.web.js
Normal file
23
web/js/pages/edit.web.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
|
||||
if (hint.trim() == '') {
|
||||
$(elm).parent().find('.ftp_username_hint').html('');
|
||||
}
|
||||
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
|
||||
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
|
||||
}
|
||||
$(elm).parent().find('.ftp_username_hint').html(GLOBAL.FTP_USER_PREFIX + hint);
|
||||
}
|
||||
|
||||
App.Listeners.WEB.keypress_ftp_username = function() {
|
||||
$('input[name="v_ftp_user"]').bind('keypress', function(evt) {
|
||||
clearTimeout(window.frp_usr_tmt);
|
||||
window.frp_usr_tmt = setTimeout(function() {
|
||||
var elm = $(evt.target);
|
||||
App.Actions.WEB.update_ftp_username_hint(elm, $(elm).val());
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// Page entry point
|
||||
App.Listeners.WEB.keypress_ftp_username();
|
Loading…
Add table
Add a link
Reference in a new issue