From 92578322d62e7390f95978f8d7386fdf4419cc2a Mon Sep 17 00:00:00 2001 From: wooferguy Date: Sun, 5 Feb 2023 13:56:26 +1300 Subject: [PATCH] Add new UI elements to Email In node Locale for en-US Added Auth type and Token field to Email IN Dynamically appear based on selection --- social/email/61-email.html | 27 +++++++++++++++++++++++- social/email/locales/en-US/61-email.json | 2 ++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/social/email/61-email.html b/social/email/61-email.html index 552e7bbe..3d3bdd8f 100644 --- a/social/email/61-email.html +++ b/social/email/61-email.html @@ -143,13 +143,25 @@
+ + +
+
-
+
+
@@ -222,6 +234,17 @@ } checkPorts(); }); + + $("#node-input-authtype").change(function() { + var protocol = $("#node-input-authtype").val(); + if (protocol === "BASIC") { + $(".node-input-password").show(); + $(".node-input-token").hide(); + } else { + $(".node-input-password").hide(); + $(".node-input-token").show(); + } + }); @@ -237,6 +260,7 @@ useSSL: {value: true}, autotls: {value: "never"}, port: {value:"993",required:true}, + authentication: {value: "BASIC", required:true}, box: {value:"INBOX"}, // For IMAP, The mailbox to process disposition: { value: "Read" }, // For IMAP, the disposition of the read email criteria: {value: "UNSEEN"}, @@ -247,6 +271,7 @@ credentials: { userid: {type:"text"}, password: {type: "password"}, + token: {type:"text"}, global: { type:"boolean"} }, inputs: 0, diff --git a/social/email/locales/en-US/61-email.json b/social/email/locales/en-US/61-email.json index 73f25cba..311b7c04 100644 --- a/social/email/locales/en-US/61-email.json +++ b/social/email/locales/en-US/61-email.json @@ -31,6 +31,8 @@ "unflagged": "Unflagged", "unseen": "Unseen", "autotls": "Start TLS?", + "authtype": "Auth type", + "token": "Token", "never": "never", "required": "if required", "always": "always",