Sha256: 11da2e71ddd07f45754e10c6763d52e1dba006314db810ad8763102b6c1fd828

Contents?: true

Size: 916 Bytes

Versions: 8

Compression:

Stored size: 916 Bytes

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::Form::Builder, 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/entries/form/#{field.macro}/#{field.form_type}", locals: {f: f, field: field}

  - unless @quick_edit
    - if @platform.return_to
      - if (val = eval(@platform.return_to))
        = hidden_field :return_to, :option, name: :return_to, value: val
      -# TODO: remove eval
      
    .node
      .label
      .input
        = f.submit f.object.new_record? ? new_t(@platform) : edit_t(@platform)
        = link_to t('bhf.helpers.entry.cancel'), page_path(@platform.page_name), class: 'cancel'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bhf-0.7.1 app/views/bhf/entries/_form.haml
bhf-0.7.0.rc3 app/views/bhf/entries/_form.haml
bhf-0.7.0.rc2 app/views/bhf/entries/_form.haml
bhf-0.7.0.rc1 app/views/bhf/entries/_form.haml
bhf-0.6.32 app/views/bhf/entries/_form.haml
bhf-0.6.31 app/views/bhf/entries/_form.haml
bhf-0.6.30 app/views/bhf/entries/_form.haml
bhf-0.6.29 app/views/bhf/entries/_form.haml