Sha256: aeffced208087c1608af2be6b7a37c57cd6fe41bdda0a2c2c21dd7456a7a9856
Contents?: true
Size: 1.29 KB
Versions: 14
Compression:
Stored size: 1.29 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| = 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 (f.object.new_record? && @platform.hide_create) || (!f.object.new_record? && @platform.hide_edit) = 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', data: ({turbolinks: false} if params[:return_to])
Version data entries
14 entries across 14 versions & 1 rubygems