enable/disable mail protocol

This commit is contained in:
MJ Isip
2019-12-05 18:47:42 +08:00
parent 4fe1d9f4ae
commit 47041706ec
2 changed files with 17 additions and 1 deletions

View File

@ -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
}
}
}
});