activeadmin-mongoid-localize 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -42,8 +42,15 @@ module Formtastic
|
|
42
42
|
::I18n.available_locales.each do |locale|
|
43
43
|
args[:value] = (t.nil? || t[locale.to_s].nil?) ? '' : t[locale.to_s]
|
44
44
|
# locale.to_s
|
45
|
-
|
46
|
-
|
45
|
+
|
46
|
+
label = CGI.escapeHTML(self.object.class.human_attribute_name(name)) + " #{template.image_tag "aml/flags/#{locale.to_s}.png", alt: locale.to_s, title: locale.to_s}"
|
47
|
+
if args[:as] == :ckeditor
|
48
|
+
form_buffers.last << "<h3 style='margin: 10px 0px 0px 10px;'>#{label}</h3>".html_safe
|
49
|
+
args[:label] = false
|
50
|
+
else
|
51
|
+
args[:label] = label.html_safe
|
52
|
+
end
|
53
|
+
|
47
54
|
form_buffers.last << lf.input(locale, args)
|
48
55
|
form_buffers.last
|
49
56
|
end
|