Sha256: 38dddb36caffbb87bfe61db770fb29f01ce31079bea93bf0573191703361b046

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 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'), params[:return_to] ? params[:return_to] : page_path(@platform.page_name), class: 'cancel'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bhf-0.9.8 app/views/bhf/entries/_form.haml
bhf-0.9.7 app/views/bhf/entries/_form.haml