diff --git a/app/views/i18n/_text_field.haml b/app/views/i18n/_text_field.haml index fb0c89c..4494077 100644 --- a/app/views/i18n/_text_field.haml +++ b/app/views/i18n/_text_field.haml @@ -2,14 +2,14 @@ - key = keys.pop - form_keys = keys.map { |k| "[#{k.to_s}]" }.join('') - form_help = (keys.size > 0) ? [keys,key].flatten.join('.') : key - - value = @site.data[@lang_to] + - value_to = @site.data[@lang_to] - [keys,key].flatten.each do |k| - - value = value[k] + - value_to = value_to[k] = label_tag "i18n[#{@lang_to}]#{form_keys}", value - if value.length > 140 - = text_area "i18n[#{@lang_to}]#{form_keys}", key, value: value, + = text_area "i18n[#{@lang_to}]#{form_keys}", key, value: value_to, class: 'form-control' - else - = text_field "i18n[#{@lang_to}]#{form_keys}", key, value: value, + = text_field "i18n[#{@lang_to}]#{form_keys}", key, value: value_to, class: 'form-control' %small.text-muted.form-text= form_help