diff --git a/resources/assets/js/views/settings/settings.js b/resources/assets/js/views/settings/settings.js index 91d400ee9..b7c218850 100644 --- a/resources/assets/js/views/settings/settings.js +++ b/resources/assets/js/views/settings/settings.js @@ -30,5 +30,21 @@ const app = new Vue({ form: new Form('setting'), bulk_action: new BulkAction('settings') } + }, + + methods: { + onProtocolChange(protocol) { + if (protocol === 'smtp') { + document.getElementById('smtp_host').disabled = false + document.getElementById('smtp_port').disabled = false + document.getElementById('smtp_username').disabled = false + document.getElementById('smtp_password').disabled = false + } else { + document.getElementById('smtp_host').disabled = true + document.getElementById('smtp_port').disabled = true + document.getElementById('smtp_username').disabled = true + document.getElementById('smtp_password').disabled = true + } + } } }); diff --git a/resources/views/settings/email/edit.blade.php b/resources/views/settings/email/edit.blade.php index bc43d5da4..e2ca24dd2 100644 --- a/resources/views/settings/email/edit.blade.php +++ b/resources/views/settings/email/edit.blade.php @@ -252,7 +252,7 @@