1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

Add IP-based SMTP authentication (#1149)

هذا الالتزام موجود في:
Charlie Smurthwaite
2020-07-17 11:43:51 +01:00
ملتزم من قبل GitHub
الأصل 5c7802d218
التزام 9a3d568b27
9 ملفات معدلة مع 103 إضافات و14 حذوفات

عرض الملف

@@ -53,3 +53,21 @@ $ ->
$(element, $link.parent()).toggle()
false
toggleCredentialInputs = (type)->
$('[data-credential-key-type]').hide()
$('[data-credential-key-type] input').attr('disabled', true)
if type == 'SMTP-IP'
$('[data-credential-key-type=smtp-ip]').show()
$('[data-credential-key-type=smtp-ip] input').attr('disabled', false)
else
$('[data-credential-key-type=all]').show()
$(document).on 'change', 'select#credential_type', ->
value = $(this).val()
toggleCredentialInputs(value)
$(document).on 'turbolinks:load', ->
credentialTypeInput = $('select#credential_type')
if credentialTypeInput.length
toggleCredentialInputs(credentialTypeInput.val())