Skip to content
Snippets Groups Projects
Commit ea9d910c authored by Patricio Cano's avatar Patricio Cano
Browse files

Refactor clone button sanitation to its own method to avoid duplication.

parent 82652013
No related branches found
No related tags found
1 merge request!4696Add setting that allows admins to choose which Git access protocols are enabled.
Loading
Loading
@@ -47,12 +47,16 @@ module ApplicationSettingsHelper
def enabled_project_tooltip(project, protocol)
case protocol
when 'ssh'
sanitize(ssh_clone_button(project), tags: %w(a), attributes: %w(id class title data-html data-container data-placement data-title data-original-title aria-describedby))
sanitize_clone_button(ssh_clone_button(project))
else
sanitize(http_clone_button(project), tags: %w(a), attributes: %w(id class title data-html data-container data-placement data-title data-original-title aria-describedby))
sanitize_clone_button(http_clone_button(project))
end
end
 
def sanitize_clone_button(input)
sanitize(input, tags: %w(a), attributes: %w(id class title data-html data-container data-placement data-title data-original-title aria-describedby))
end
# Return a group of checkboxes that use Bootstrap's button plugin for a
# toggle button effect.
def restricted_level_checkboxes(help_block_id)
Loading
Loading
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