BigW Consortium Gitlab

Commit 057d45fb by Marin Jankovski

Use password field default password masking.

parent 31565d78
...@@ -248,16 +248,6 @@ module ProjectsHelper ...@@ -248,16 +248,6 @@ module ProjectsHelper
end end
end end
def service_field_value(type, value)
return value unless type == 'password'
if value.present?
"***********"
else
nil
end
end
def user_max_access_in_project(user, project) def user_max_access_in_project(user, project)
level = project.team.max_member_access(user) level = project.team.max_member_access(user)
......
- name = field[:name] - name = field[:name]
- title = field[:title] || name.humanize - title = field[:title] || name.humanize
- value = service_field_value(field[:type], @service.send(name)) - value = @service.send(name)
- type = field[:type] - type = field[:type]
- placeholder = field[:placeholder] - placeholder = field[:placeholder]
- choices = field[:choices] - choices = field[:choices]
...@@ -19,6 +19,6 @@ ...@@ -19,6 +19,6 @@
- elsif type == 'select' - elsif type == 'select'
= form.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" } = form.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" }
- elsif type == 'password' - elsif type == 'password'
= form.password_field name, placeholder: value, class: 'form-control' = form.password_field name, value: value, class: 'form-control'
- if help - if help
%span.help-block= help %span.help-block= help
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment