|
|
|
@ -8,46 +8,44 @@
|
|
|
|
|
|
|
|
|
|
var l = abp.localization.getResource('AbpSettingManagement');
|
|
|
|
|
|
|
|
|
|
abp.event.on('Abp.SettingManagement.View.Render.Volo.Abp.EmailSetting', function (eventData) {
|
|
|
|
|
$("#EmailSettingsForm").on('submit', function (event) {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
$("#EmailSettingsForm").on('submit', function (event) {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
if (!$(this).valid()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var form = $(this).serializeFormToObject();
|
|
|
|
|
volo.abp.settingManagement.emailSettings.update(form).then(function (result) {
|
|
|
|
|
$(document).trigger("AbpSettingSaved");
|
|
|
|
|
});
|
|
|
|
|
if (!$(this).valid()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var form = $(this).serializeFormToObject();
|
|
|
|
|
volo.abp.settingManagement.emailSettings.update(form).then(function (result) {
|
|
|
|
|
$(document).trigger("AbpSettingSaved");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#SmtpUseDefaultCredentials').change(function () {
|
|
|
|
|
if (this.checked) {
|
|
|
|
|
$('#HideSectionWhenUseDefaultCredentialsIsChecked').slideUp();
|
|
|
|
|
} else {
|
|
|
|
|
$('#HideSectionWhenUseDefaultCredentialsIsChecked').slideDown();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_sendTestEmailModal.onOpen(function () {
|
|
|
|
|
var $form = _sendTestEmailModal.getForm();
|
|
|
|
|
_sendTestEmailModal.getForm().off('abp-ajax-success');
|
|
|
|
|
$('#SmtpUseDefaultCredentials').change(function () {
|
|
|
|
|
if (this.checked) {
|
|
|
|
|
$('#HideSectionWhenUseDefaultCredentialsIsChecked').slideUp();
|
|
|
|
|
} else {
|
|
|
|
|
$('#HideSectionWhenUseDefaultCredentialsIsChecked').slideDown();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$form.on('abp-ajax-success', function () {
|
|
|
|
|
_sendTestEmailModal.setResult();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
_sendTestEmailModal.onOpen(function () {
|
|
|
|
|
var $form = _sendTestEmailModal.getForm();
|
|
|
|
|
_sendTestEmailModal.getForm().off('abp-ajax-success');
|
|
|
|
|
|
|
|
|
|
_sendTestEmailModal.onResult(function () {
|
|
|
|
|
abp.notify.success(l('SuccessfullySent'));
|
|
|
|
|
$form.on('abp-ajax-success', function () {
|
|
|
|
|
_sendTestEmailModal.setResult();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
_sendTestEmailModal.onResult(function () {
|
|
|
|
|
abp.notify.success(l('SuccessfullySent'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#SendTestEmailButton").click(function (e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
_sendTestEmailModal.open();
|
|
|
|
|
});
|
|
|
|
|
$("#SendTestEmailButton").click(function (e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
_sendTestEmailModal.open();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|