Skip to content
Snippets Groups Projects
Unverified Commit 6c3c1e78 authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

Merge pull request #1148 from noesya/access_token

Affichage du access token
parents ee807aa9 5479be66
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ module ApplicationHelper
def masked_string(string)
string = string.to_s # in case it was nil
mask_length = [(string.length - 5), 0].max
mask_length = 30 if mask_length > 30
string.to_s.gsub(/.+(?=.{5})/, '•' * mask_length)
end
......
......@@ -19,12 +19,18 @@
<div class="col-xl-6">
<%= f.input :git_provider, include_blank: false %>
<%= f.input :git_endpoint %>
<%= f.input :deployment_status_badge, as: :string %>
<%= f.input :deployment_status_badge,
as: :string,
autocomplete: 'off',
role: 'presentation'
%>
</div>
<div class="col-xl-6">
<%= f.input :access_token,
as: :password,
placeholder: masked_string(f.object.access_token),
autocomplete: 'off',
role: 'presentation',
hint: t("simple_form.hints.communication_website.access_token_#{f.object.access_token.blank? ? 'without' : 'with'}_existing").html_safe
%>
<%= f.input :repository %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment