مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
Add IP-based SMTP authentication (#1149)
هذا الالتزام موجود في:
ملتزم من قبل
GitHub
الأصل
5c7802d218
التزام
9a3d568b27
@@ -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())
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم