Sha256: 9622933fd16b0d55acc3a98a664f794608db8ad858415a1af62a45f6da66d4ad

Contents?: true

Size: 893 Bytes

Versions: 6

Compression:

Stored size: 893 Bytes

Contents

- if builder.options[:html] && builder.options[:html][:class] =~ /form-horizontal|form-vertical/
  .control-group{:class => ('error' if error_messages.present?)}
    - if label_text.present?
      = builder.label(method, label_text, :class => 'control-label')
    .controls
      - if prepend.present?
        .input-prepend
          %span.add-on= prepend
          = field
      - elsif append.present?
        .input-append
          = field
          %span.add-on= append
      - else
        = field


      - if error_messages.present?
        %span.help-inline= error_messages

      - if help_block.present?
        %p.help-block= help_block
  
- else
  - if label_text.present?
    = builder.label(method, label_text, :class => 'control-label')
  = field

  - if error_messages.present?
    %span.help-inline= error_messages

  - if help_block.present?
    %p.help-block= help_block

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bootstrap_builder-0.4.0 app/views/bootstrap_builder/_default_field.html.haml
bootstrap_builder-0.3.3 app/views/bootstrap_builder/_default_field.html.haml
bootstrap_builder-0.3.2 app/views/bootstrap_builder/_default_field.html.haml
bootstrap_builder-0.3.1 app/views/bootstrap_builder/_default_field.html.haml
bootstrap_builder-0.3.0 app/views/bootstrap_builder/_default_field.html.haml
bootstrap_builder-0.2.6 app/views/bootstrap_builder/_default_field.html.haml