From 8b53b24e66dc2ed83419fa64a76aec263251afca Mon Sep 17 00:00:00 2001 From: Austin Miller Date: Thu, 18 Jul 2024 11:56:46 -0700 Subject: [PATCH] Hiding the slack webhook URL (#122) --- .../integrations/channel/slack/v3/_form_options.html.erb | 9 ++++++--- .../integrations/channel/slack/v3/_show_options.html.erb | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/pager_tree/integrations/channel/slack/v3/_form_options.html.erb b/app/views/pager_tree/integrations/channel/slack/v3/_form_options.html.erb index 46979d2..46e8ecd 100644 --- a/app/views/pager_tree/integrations/channel/slack/v3/_form_options.html.erb +++ b/app/views/pager_tree/integrations/channel/slack/v3/_form_options.html.erb @@ -1,8 +1,11 @@
-
+
<%= form.label :option_incoming_webhook_url %> - <%= form.text_field :option_incoming_webhook_url, class: "form-control" %> -

<%== t("pager_tree.integrations.common.option_incoming_webhook_url_hint_html") %>

+ <%= form.password_field :option_incoming_webhook_url, value: form.object.option_incoming_webhook_url, class: "form-control", data: { password_visibility_target: "input"} %> +
+

<%== t("pager_tree.integrations.common.option_incoming_webhook_url_hint_html") %>

+ <%= render partial: "shared/password_visibility_button" %> +
<% diff --git a/app/views/pager_tree/integrations/channel/slack/v3/_show_options.html.erb b/app/views/pager_tree/integrations/channel/slack/v3/_show_options.html.erb index cd26de8..2910696 100644 --- a/app/views/pager_tree/integrations/channel/slack/v3/_show_options.html.erb +++ b/app/views/pager_tree/integrations/channel/slack/v3/_show_options.html.erb @@ -5,7 +5,7 @@

- <%= integration.option_incoming_webhook_url %> + <%= mask integration.option_incoming_webhook_url %>