diff --git a/frontend/src/views/settings/smtp.vue b/frontend/src/views/settings/smtp.vue index dd764efb5..0bd10517d 100644 --- a/frontend/src/views/settings/smtp.vue +++ b/frontend/src/views/settings/smtp.vue @@ -62,6 +62,7 @@ @@ -160,7 +161,7 @@
-
+
+ @click.prevent="() => doSMTPTest(item, n)"> {{ $t('settings.smtp.sendTest') }} @@ -296,7 +297,18 @@ export default Vue.extend({ } }, - doSMTPTest(item) { + doSMTPTest(item, n) { + if (!this.isTestEnabled(item)) { + this.$utils.toast(this.$t('settings.smtp.testEnterEmail'), 'is-danger'); + this.$nextTick(() => { + const i = document.querySelector(`.password-${n}`); + i.focus(); + i.select(); + }); + return; + } + + this.errMsg = ''; this.$api.testSMTP({ ...item, email: this.testEmail }).then(() => { this.$utils.toast(this.$t('campaigns.testSent')); @@ -319,13 +331,13 @@ export default Vue.extend({ isTestEnabled(item) { if (!item.host || !item.port) { - return true; + return false; } if (item.auth_protocol !== 'none' && !item.password.trim()) { - return true; + return false; } - return false; + return true; }, fillSettings(n, key) { diff --git a/i18n/cs-cz.json b/i18n/cs-cz.json index 76775510e..f41a10026 100644 --- a/i18n/cs-cz.json +++ b/i18n/cs-cz.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Naplánovaná", "campaigns.statusChanged": "\"{name}\" je {status}", "campaigns.subject": "Předmět", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-maily", "campaigns.testSent": "Testovací zpráva odeslána", "campaigns.timestamps": "Časová razítka", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Odeslat e-mail", "settings.smtp.setCustomHeaders": "Nastavit vlastní záhlaví", "settings.smtp.testConnection": "Ověřit spojení", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "Na e-mail", "settings.title": "Nastavení", "settings.updateAvailable": "Nová aktualizace {version} je k dispozici.", diff --git a/i18n/de.json b/i18n/de.json index 9ed8bc11a..868df67fe 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Geplant", "campaigns.statusChanged": "\"{name}\" ist {status}", "campaigns.subject": "Betreff", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-Mails", "campaigns.testSent": "Testnachricht gesendet", "campaigns.timestamps": "Zeitstempel", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "E-mail senden", "settings.smtp.setCustomHeaders": "Benutzerdefinierten Header verwenden", "settings.smtp.testConnection": "Verbindung testen", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "Empfänger E-mail", "settings.title": "Einstellungen", "settings.updateAvailable": "Ein neues Update auf {version} ist verfügbar.", diff --git a/i18n/en.json b/i18n/en.json index fedeb2328..7237397da 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -457,6 +457,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Set custom headers", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Settings", "settings.updateAvailable": "A new update {version} is available.", diff --git a/i18n/es.json b/i18n/es.json index ff84f5a0c..dd8ef0109 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Agendada", "campaigns.statusChanged": "\"{name}\" está {status}", "campaigns.subject": "Asunto", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "Correos electrónicos de prueba", "campaigns.testSent": "Mensaje de prueba enviado", "campaigns.timestamps": "Marcas de timepo", @@ -108,8 +109,8 @@ "email.unsub": "Des-subscribir", "email.unsubHelp": "¿No quiere recibir estos correos electrónicos?", "email.viewInBrowser": "Ver en el navegador", - "forms.formHTMLHelp": "Use este código HTML para mostrar el formulario de subscripción en un sitio web. El formulario debe contener el campo `email` y uno o más campos `l` (UUID de lista). El campo `name` es opcional.", "forms.formHTML": "Formulario HTML", + "forms.formHTMLHelp": "Use este código HTML para mostrar el formulario de subscripción en un sitio web. El formulario debe contener el campo `email` y uno o más campos `l` (UUID de lista). El campo `name` es opcional.", "forms.noPublicLists": "No hay listas públicas para generar formularios", "forms.publicLists": "Listas públicas", "forms.publicSubPage": "Página pública de subscripción", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Enviar correo electrónico de prueba", "settings.smtp.setCustomHeaders": "Configurar encabezados personalizados.", "settings.smtp.testConnection": "Probar conexión", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "Correo electrónico del destinatario", "settings.title": "Configuraciones", "settings.updateAvailable": "Una actualización {version} está disponible.", diff --git a/i18n/fi.json b/i18n/fi.json index b7afcf996..015d4c1ff 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Scheduled", "campaigns.statusChanged": "\"{name}\" is {status}", "campaigns.subject": "Subject", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mails", "campaigns.testSent": "Test message sent", "campaigns.timestamps": "Timestamps", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Lähetä e-mail", "settings.smtp.setCustomHeaders": "Set custom headers", "settings.smtp.testConnection": "Testaa yhteyttä", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "Vastaanottajan e-mail", "settings.title": "Settings", "settings.updateAvailable": "A new update {version} is available.", diff --git a/i18n/fr.json b/i18n/fr.json index 7529e7bfa..81849788c 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "planifiée", "campaigns.statusChanged": "La campagne « {name} » est {status}", "campaigns.subject": "Objet", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mails de test", "campaigns.testSent": "Message de test envoyé", "campaigns.timestamps": "Horodatages", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Envoyer un e-mail", "settings.smtp.setCustomHeaders": "Définir des en-têtes personnalisés", "settings.smtp.testConnection": "Tester la connexion", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "E-mail du destinataire", "settings.title": "Paramètres", "settings.updateAvailable": "Une nouvelle version ({version}) est disponible.", diff --git a/i18n/hu.json b/i18n/hu.json index ffcfc3bd1..1c75d3190 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Ütemezett", "campaigns.statusChanged": "\"{name}\" van {status}", "campaigns.subject": "Tárgy", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mail", "campaigns.testSent": "Tesztüzenet elküldve", "campaigns.timestamps": "Időbélyegek", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Egyéni fejlécek beállítása", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Beállítások", "settings.updateAvailable": "Új frissítés {version} elérhető.", diff --git a/i18n/it.json b/i18n/it.json index c5ae51b64..65cd2d7cf 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Programmata", "campaigns.statusChanged": "\"{name}\" e {status}", "campaigns.subject": "Oggetto", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "Emails di prova", "campaigns.testSent": "Messaggio di prova inviato", "campaigns.timestamps": "Marcatura temporale ", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Definisci intestazioni personalizzate", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Impostazioni", "settings.updateAvailable": "È a disposizione una nuova versione {version}.", diff --git a/i18n/jp.json b/i18n/jp.json index 8733a9596..2ca3aa4fe 100644 --- a/i18n/jp.json +++ b/i18n/jp.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "スケジュールされている", "campaigns.statusChanged": "\"{name}\" は {status}", "campaigns.subject": "件名", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "メール", "campaigns.testSent": "テストメッセージ送信済み", "campaigns.timestamps": "タイムスタンプ", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "カスタムヘッダー設定", "settings.smtp.testConnection": "接続テスト", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "メール宛", "settings.title": "設定", "settings.updateAvailable": "新しい {version} の更新が可能です。", diff --git a/i18n/ml.json b/i18n/ml.json index 53394a958..2828c0f6d 100644 --- a/i18n/ml.json +++ b/i18n/ml.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "ആസൂത്രണം ചെയ്തു", "campaigns.statusChanged": "\"{name}\" {status} ആണ്", "campaigns.subject": "വിഷയം", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "ഈ-മെയിലുകൾ", "campaigns.testSent": "ടെസ്റ്റ് സന്ദേശം അയച്ചു", "campaigns.timestamps": "സമയം", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "ഇഷ്‌ടാനുസൃത തലക്കെട്ടുകൾ നൽകുക", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "ക്രമീകരണങ്ങൾ", "settings.updateAvailable": "A new update {version} is available.", diff --git a/i18n/nl.json b/i18n/nl.json index e833bd0c6..995249911 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Gepland", "campaigns.statusChanged": "\"{name}\" is {status}", "campaigns.subject": "Onderwerp", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mails", "campaigns.testSent": "Testbericht verzonden", "campaigns.timestamps": "Tijdstippen", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Stuur e-mail", "settings.smtp.setCustomHeaders": "Stel custom headers in", "settings.smtp.testConnection": "Test verbinding", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "Naar e-mail", "settings.title": "Instellingen", "settings.updateAvailable": "Een nieuwe update {version} is beschikbaar.", diff --git a/i18n/pl.json b/i18n/pl.json index 0f90994a5..ef5bc2368 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Zaplanowana", "campaigns.statusChanged": "\"{name}\" jest {status}", "campaigns.subject": "Temat", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-maile", "campaigns.testSent": "Wiadomość testowa wysłana", "campaigns.timestamps": "Sygnatury czasowe", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Ustaw niestandardowe nagłówki", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Ustawienia", "settings.updateAvailable": "Nowa wersja {version} jest dostępna.", diff --git a/i18n/pt-BR.json b/i18n/pt-BR.json index 1d376529e..e0a15e60e 100644 --- a/i18n/pt-BR.json +++ b/i18n/pt-BR.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Agendado", "campaigns.statusChanged": "O status da campanha \"{name}\" é {status}", "campaigns.subject": "Assunto", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mails", "campaigns.testSent": "Mensagem de teste enviada", "campaigns.timestamps": "Data e hora", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Enviar e-mail", "settings.smtp.setCustomHeaders": "Definir cabeçalhos personalizados", "settings.smtp.testConnection": "Testar conexões", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Configurações", "settings.updateAvailable": "Atualização: a nova versão {version} já está disponível.", diff --git a/i18n/pt.json b/i18n/pt.json index d76330353..2b4ab1621 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Agendada", "campaigns.statusChanged": "\"{name}\" está {status}", "campaigns.subject": "Assunto", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mails", "campaigns.testSent": "Mensagem de teste enviada", "campaigns.timestamps": "Carimbo de hora", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Colocar headers customizados", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Definições", "settings.updateAvailable": "A new update {version} is available.", diff --git a/i18n/ro.json b/i18n/ro.json index 5a79abe80..774720114 100644 --- a/i18n/ro.json +++ b/i18n/ro.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Programat", "campaigns.statusChanged": "\"{nume}\" este {stare}", "campaigns.subject": "Subiect", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "Emailuri", "campaigns.testSent": "Mesaju de test a fost trimis", "campaigns.timestamps": "Marcaje de timp", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Setează anteturi personalizate", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Setări", "settings.updateAvailable": "Este disponibilă o nouă actualizare {versiune}.", diff --git a/i18n/ru.json b/i18n/ru.json index 10fff8042..6708e8f3f 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Запланирована", "campaigns.statusChanged": "\"{name}\" {status}", "campaigns.subject": "Тема", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mails", "campaigns.testSent": "Тестовое сообщение отправлено", "campaigns.timestamps": "Метки времени", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Установка настраиваемых заголовков", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Параметры", "settings.updateAvailable": "Доступна новая версия: {version}.", diff --git a/i18n/tr.json b/i18n/tr.json index 78584eb7b..ab2af004c 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Zamanlandı", "campaigns.statusChanged": "\"{name}\" durumu {status}", "campaigns.subject": "Konu", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-postalar", "campaigns.testSent": "Test mesajı gönderildi", "campaigns.timestamps": "Zaman etiketi", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Özel başlık tanımla", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Ayarlar", "settings.updateAvailable": "Yeni bir güncel sürüm {version} mevcuttur.", diff --git a/i18n/vi.json b/i18n/vi.json index 42b578b33..c65a40b78 100644 --- a/i18n/vi.json +++ b/i18n/vi.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "Đã lên lịch", "campaigns.statusChanged": "\"{name}\" là {status}", "campaigns.subject": "Tiêu đề", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "E-mails", "campaigns.testSent": "Gửi tin nhắn thử", "campaigns.timestamps": "Dấu thời gian", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "Đặt tiêu đề tùy chỉnh", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "Cài đặt", "settings.updateAvailable": "Đã có bản cập nhật mới {version}.", diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json index c6fcef846..fb15afe6f 100644 --- a/i18n/zh-CN.json +++ b/i18n/zh-CN.json @@ -81,6 +81,7 @@ "campaigns.status.scheduled": "已安排", "campaigns.statusChanged": " “{name}”是 {status}", "campaigns.subject": "主题", + "campaigns.testDisabled": "Enter password to test", "campaigns.testEmails": "电子邮件", "campaigns.testSent": "已发送测试消息", "campaigns.timestamps": "时间戳", @@ -457,6 +458,7 @@ "settings.smtp.sendTest": "Send e-mail", "settings.smtp.setCustomHeaders": "设置自定义标头", "settings.smtp.testConnection": "Test connection", + "settings.smtp.testEnterEmail": "Enter password to test", "settings.smtp.toEmail": "To e-mail", "settings.title": "设置", "settings.updateAvailable": "有新的更新 {version} 可用。",