// Installer improvements

This commit is contained in:
Damien Metzger
2013-06-18 14:46:24 +02:00
parent 3daf4cdb99
commit c6878bc06d
6 changed files with 17 additions and 59 deletions
-50
View File
@@ -36,54 +36,4 @@ $(document).ready(function()
}
});
});
// Check mails configuration
if (!$('#set_stmp').prop('checked'))
$("div#mailSMTPParam").hide();
$("#set_stmp").click(function()
{
if ($("input#set_stmp").prop('checked'))
$("div#mailSMTPParam").slideDown('slow');
else
$("div#mailSMTPParam").slideUp('slow');
});
// Send test email
$('#btVerifyMail').click(function()
{
$("#mailResultCheck").slideUp('slow');
$.ajax({
url: 'index.php',
data: {
'sendMail': 'true',
'smtpSrv': $('#smtpSrv').val(),
'smtpEnc': $('#smtpEnc').val(),
'smtpPort': $('#smtpPort').val(),
'smtpLogin': $('#smtpLogin').val(),
'smtpPassword': $('#smtpPassword').val(),
'testEmail': $('#smtpSrv').val(),
'testEmail': $('#testEmail').val(),
'smtpChecked': ($('#set_stmp').prop('checked') ? 'true' : 'false')
},
dataType: 'json',
cache: false,
success: function(json)
{
$("#mailResultCheck")
.addClass((json.success) ? 'infosBlock' : 'errorBlock')
.removeClass((json.success) ? 'errorBlock' : 'infosBlock')
.html(json.message)
.slideDown('slow');
},
error: function(xhr)
{
$("#mailResultCheck")
.addClass('errorBlock')
.removeClass('infosBlock')
.html('An error occurred:<br /><br />'+xhr.responseText)
.slideDown('slow');
}
});
});
});