Edit workshop locale warning
This commit is contained in:
@@ -137,7 +137,8 @@ module FormHelper
|
||||
|
||||
if options[:warning].present?
|
||||
description_id ||= "#{id}-desc"
|
||||
html += content_tag(:div, _(options[:warning], :s, 2), id: description_id, class: 'warning-info')
|
||||
# html += content_tag(:div, _(options[:warning], :s, 2), id: description_id, class: 'warning-info')
|
||||
html += status_bubble(_(options[:warning], :s, 2), :warning, id: description_id)
|
||||
end
|
||||
|
||||
aria = {}
|
||||
|
||||
@@ -326,4 +326,23 @@ module WidgetsHelper
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def strong(text)
|
||||
content_tag(:strong, text)
|
||||
end
|
||||
|
||||
def phone_link(number)
|
||||
content_tag(:a, number, href: "tel:#{number}")
|
||||
end
|
||||
|
||||
def email_link(email)
|
||||
content_tag(:a, email, href: "mailto:#{email}")
|
||||
end
|
||||
|
||||
def status_bubble(text, status, attributes = {})
|
||||
attributes[:class] ||= []
|
||||
attributes[:class] = [attributes[:class]] unless attributes[:class].is_a?(Array)
|
||||
attributes[:class] << "#{status}-info"
|
||||
content_tag(:div, text.html_safe, attributes)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user