diff options
Diffstat (limited to 'settings/js/admin.js')
-rw-r--r-- | settings/js/admin.js | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index 923e267513e..e2bc125b8f5 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -37,9 +37,27 @@ $(document).ready(function(){ $('#mail_smtpauth').change(function() { if (!this.checked) { - $('#mail_credentials').toggle(false); + $('#mail_credentials').addClass('hidden'); } else { - $('#mail_credentials').toggle(true); + $('#mail_credentials').removeClass('hidden'); + } + }); + + $('#mail_smtpmode').change(function() { + if ($(this).val() != 'smtp') { + $('#setting_smtpauth').addClass('hidden'); + $('#setting_smtphost').addClass('hidden'); + $('#mail_smtpsecure_label').addClass('hidden'); + $('#mail_smtpsecure').addClass('hidden'); + $('#mail_credentials').addClass('hidden'); + } else { + $('#setting_smtpauth').removeClass('hidden'); + $('#setting_smtphost').removeClass('hidden'); + $('#mail_smtpsecure_label').removeClass('hidden'); + $('#mail_smtpsecure').removeClass('hidden'); + if ($('#mail_smtpauth').attr('checked')) { + $('#mail_credentials').removeClass('hidden'); + } } }); |