You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
519 B
10 lines
519 B
- namekey = @name.to_s.gsub('_', '-')
|
|
- typekey = @type.gsub('_', '-').gsub(/^(.*?)(\-field)?$/, '\1-field')
|
|
%div{class: ['field', typekey, 'field-' + namekey, @value ? nil : 'new']}
|
|
- if @options[:help]
|
|
%p.help=_(("form.#{@options[:_controller]}.#{namekey}.help"), :w, 20)
|
|
- @label = @label_template ? (render ('layouts/fields/label_' + @label_template)) : nil
|
|
= @label_position == :before && @label ? @label : ''
|
|
- if @label_position != :inside
|
|
%div=@html
|
|
= @label_position == :after && @label ? '' : @label
|
|
|