Sha256: 97a0ba2480059559a4c00473c471ca84d37699c2188c4092fb7dfb08909499af

Contents?: true

Size: 1.18 KB

Versions: 4

Compression:

Stored size: 1.18 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
      = 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

4 entries across 4 versions & 1 rubygems

Version Path
bhf-0.9.6 app/views/bhf/entries/_form.haml
bhf-0.9.5 app/views/bhf/entries/_form.haml
bhf-0.9.4 app/views/bhf/entries/_form.haml
bhf-0.9.3 app/views/bhf/entries/_form.haml