enable/disable mail protocol
This commit is contained in:
parent
4fe1d9f4ae
commit
47041706ec
16
resources/assets/js/views/settings/settings.js
vendored
16
resources/assets/js/views/settings/settings.js
vendored
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -252,7 +252,7 @@
|
||||
<div id="collapse10" class="collapse hide" aria-labelledby="heading10" data-parent="#accordion10">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::selectGroup('protocol', trans('settings.email.protocol'), 'share', $email_protocols, !empty($setting['protocol']) ? $setting['protocol'] : null, []) }}
|
||||
{{ Form::selectGroup('protocol', trans('settings.email.protocol'), 'share', $email_protocols, !empty($setting['protocol']) ? $setting['protocol'] : null, ['change' => 'onProtocolChange']) }}
|
||||
|
||||
{{ Form::textGroup('sendmail_path', trans('settings.email.sendmail_path'), 'road', [':disabled' => '(form.protocol == "smtp") || (form.protocol != "sendmail") ? true : false']) }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user