mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
Sending mail credentials to email
This commit is contained in:
parent
a68dce9bec
commit
8c1deb80f7
4 changed files with 64 additions and 7 deletions
|
@ -90,14 +90,37 @@ randomString = function() {
|
|||
$('#v_password').text(randomstring);
|
||||
else
|
||||
$('#v_password').text(Array(randomstring.length+1).join('*'));
|
||||
generate_mail_credentials();
|
||||
}
|
||||
|
||||
generate_mail_credentials = function() {
|
||||
var div = $('.mail-infoblock').clone();
|
||||
div.find('#mail_configuration').remove();
|
||||
var pass=div.find('#v_password').text();
|
||||
if (pass=="") div.find('#v_password').html(' ');
|
||||
var output = div.text();
|
||||
output=output.replace(/(?:\r\n|\r|\n|\t)/g, "|");
|
||||
output=output.replace(/ /g, "");
|
||||
output=output.replace(/\|\|/g, "|");
|
||||
output=output.replace(/\|\|/g, "|");
|
||||
output=output.replace(/\|\|/g, "|");
|
||||
output=output.replace(/^\|+/g, "");
|
||||
output=output.replace(/\|$/, "");
|
||||
output=output.replace(/ $/, "");
|
||||
output=output.replace(/:\|/g, ": ");
|
||||
output=output.replace(/\|/g, "\n");
|
||||
//console.log(output);
|
||||
$('#v_credentials').val(output);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#v_account').text($('input[name=v_account]').val());
|
||||
$('#v_password').text($('input[name=v_password]').val());
|
||||
generate_mail_credentials();
|
||||
|
||||
$('input[name=v_account]').change(function(){
|
||||
$('#v_account').text($(this).val());
|
||||
generate_mail_credentials();
|
||||
});
|
||||
|
||||
$('input[name=v_password]').change(function(){
|
||||
|
@ -105,6 +128,7 @@ $(document).ready(function() {
|
|||
$('#v_password').text($(this).val());
|
||||
else
|
||||
$('#v_password').text(Array($(this).val().length+1).join('*'));
|
||||
generate_mail_credentials();
|
||||
});
|
||||
|
||||
$('.toggle-psw-visibility-icon').click(function(){
|
||||
|
@ -112,6 +136,7 @@ $(document).ready(function() {
|
|||
$('#v_password').text($('input[name=v_password]').val());
|
||||
else
|
||||
$('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*'));
|
||||
generate_mail_credentials();
|
||||
});
|
||||
|
||||
$('#mail_configuration').change(function(evt){
|
||||
|
@ -144,5 +169,6 @@ $(document).ready(function() {
|
|||
$('#td_smtp_encryption').html(opt.attr('no_encryption'));
|
||||
break;
|
||||
}
|
||||
generate_mail_credentials();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue