Edit workshop locale warning

This commit is contained in:
Godwin
2017-08-06 08:50:39 -07:00
parent 2185129e55
commit b74b3062e8
9 changed files with 42 additions and 13 deletions
+2 -1
View File
@@ -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 = {}
+19
View File
@@ -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