1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-24 07:37:04 +00:00
This commit is contained in:
David Duque 2020-04-16 12:45:55 +01:00
parent 7b60c0850c
commit 03472788fd
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A

View File

@ -13,7 +13,7 @@
<h3>SMTP Relay Configuration</h3> <h3>SMTP Relay Configuration</h3>
<form class="form-horizontal" role="form" onsubmit="return false;"> <form class="form-horizontal" role="form" onsubmit="return false;">
<div class="form-group"> <div class="form-group">
<table style="width: 600px"> <table id="smtp-relays" class="table" style="width: 600px">
<tr> <tr>
<td> <td>
<label for="use_relay" class="col-sm-1 control-label">Use Relay?</label> <label for="use_relay" class="col-sm-1 control-label">Use Relay?</label>
@ -97,19 +97,22 @@
relay_auth_pass.disabled = !(relay_enabled && auth_enabled) relay_auth_pass.disabled = !(relay_enabled && auth_enabled)
} }
$(api( function show_smtp_relays() {
"/system/smtp/relay", $('#smtp-relays tbody').html("<tr><td colspan='2' class='text-muted'>Loading...</td></tr>")
"GET", api(
{}, "/system/smtp/relay",
data => { "GET",
console.log("Hi!") {},
use_relay.checked = data.enabled data => {
relay_host.value = data.host console.log("Hi!")
relay_use_auth.checked = data.auth_enabled use_relay.checked = data.enabled
relay_auth_user.value = data.user relay_host.value = data.host
relay_auth_pass.value = "" relay_use_auth.checked = data.auth_enabled
relay_auth_user.value = data.user
relay_auth_pass.value = ""
checkfields() checkfields()
} }
)) )
}
</script> </script>