Sha256: 4329c88f67c5f702486051c850de769230bdf8d208bf2ed03f3b9e20c2baafd7

Contents?: true

Size: 1.23 KB

Versions: 9

Compression:

Stored size: 1.23 KB

Contents

- html = { id: (:main_form unless @quick_edit), multipart: (!@quick_edit && @platform.has_file_upload?), class: 'js_bhf_form' }
= form_for @object, url: @form_url, builder: Bhf::ActionView::FormBuilder, html: html do |f|

  - if f.object.errors.any?
    = render partial: 'bhf/entries/validation_errors', locals: {f: f}
    
  - @platform.fields.each do |field|
    - unless field.form_type == :hidden
      - if !field.form_type
        = d field
      = render partial: "bhf/form/#{field.macro}/#{field.form_type}", locals: {f: f, field: field}

  - unless @quick_edit
    
    - if params[:return_to]
      = hidden_field :return, :to, name: :return_to, value: params[:return_to]
    
    .node
      .label
      .input
        - unless @object.class.bhf_embedded?
          = f.submit t('bhf.helpers.form.buttons.save', platform_title: @platform.title_singular)
        - unless @platform.hide_edit
          = f.submit t('bhf.helpers.form.buttons.and_edit'), name: :return_to_edit, class: 'alt_button'
        - unless @platform.hide_create
          = f.submit t('bhf.helpers.form.buttons.and_add'), name: :return_to_new, class: 'alt_button'
        
        = link_to t('bhf.helpers.entry.cancel'), page_path(@platform.page_name), class: 'cancel'

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bhf-0.9.2 app/views/bhf/entries/_form.haml
bhf-0.9.1 app/views/bhf/entries/_form.haml
bhf-0.9.0 app/views/bhf/entries/_form.haml
bhf-0.8.7 app/views/bhf/entries/_form.haml
bhf-0.8.6 app/views/bhf/entries/_form.haml
bhf-0.8.5 app/views/bhf/entries/_form.haml
bhf-0.8.4 app/views/bhf/entries/_form.haml
bhf-0.8.3 app/views/bhf/entries/_form.haml
bhf-0.8.2 app/views/bhf/entries/_form.haml