Sha256: 78b3aa3f0c57c12b55a65aa76c9d15ab1a9773b8ffc98e70b45252bc42024433

Contents?: true

Size: 962 Bytes

Versions: 5

Compression:

Stored size: 962 Bytes

Contents

- unless field.multiple?
  = form.input field.method_name, collection: field.enum, label: field.label, hint: field.help, required: field.required?, 
      input_html: { data: { select: {} } }.deep_merge(field.html_attributes)
- else
  :ruby
    js_data = {
        :xhr => false,
        :sortable => false,
        :cacheAll => true,
        :regional => {
          :chooseAll => t("admin.misc.chose_all"),
          :chosen    => t("admin.misc.chosen", :name => config.label_plural),
          :clearAll  => t("admin.misc.clear_all"),
          :search    => t("admin.misc.search"),
          :up        => t("admin.misc.up"),
          :down      => t("admin.misc.down")
        }
      }
  = form.input field.method_name, :collection => field.enum , label: field.label, hint: field.help, required: field.required?, input_html: field.html_attributes.reverse_merge({:data => { :filteringmultiselect => true, :options => js_data.to_json }, :multiple => true})

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
basepack-1.0.1 app/views/forms/edit/_form_enumeration.html.haml
basepack-1.0.0 app/views/forms/edit/_form_enumeration.html.haml
basepack-1.0.0.pre.0 app/views/forms/edit/_form_enumeration.html.haml
basepack-0.2.0 app/views/forms/edit/_form_enumeration.html.haml
basepack-0.1.0 app/views/forms/edit/_form_enumeration.html.haml