Sha256: 1b8678887cf491e0d2575e5db8288a7d6920b35784900f8b74c79c65fe5beef3

Contents?: true

Size: 1.52 KB

Versions: 43

Compression:

Stored size: 1.52 KB

Contents

- id      = nil unless defined? id
- action  = nil unless defined? action
- klass   = nil unless defined? klass
- method  = 'post' unless defined? method
- enctype = 'multipart/form-data' unless defined? enctype
- info    = {} unless defined? info

- klass = "#{klass} custom"

- if defined?(description) and description
  .form_description
    =description
  %hr

%form(class=klass action=action method=method id=id enctype=enctype)

  - inputs       = consume_parameter(:inputs, info) || []
  - types        = consume_parameter(:input_types, info) || {}
  - defaults     = consume_parameter(:input_defaults, info) || {}
  - descriptions = consume_parameter(:input_descriptions, info) || {}
  - options      = consume_parameter(:input_options, info) || {}
  - values       = consume_parameter(:values, info) || {}

  - inputs.each do |input|
    - input_id = id.nil? ? nil : id + "__" << input.to_s
    - hide = (options[input] != nil and options[input][:hide])
    %div(class="input #{types[input]} #{input} #{hide ? 'hide' : ''}")
      - input_options = options[input]
      - input_options = input_options.dup unless input_options.nil?
      != form_input(input, types[input], defaults[input], values[input], descriptions[input], input_id, input_options)


  .input.submit
    - if klass =~ /workflow_task/
      %input.jobname(type='text' name='jobname' placeholder='optional job name')
      %select.format(name="_format")
        - [:html, :json, :raw, :binary].each do |format|
          %option(value=format)= format.to_s
    %input(type="submit")

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
rbbt-rest-1.4.10 share/views/partials/form.haml
rbbt-rest-1.4.9 share/views/partials/form.haml
rbbt-rest-1.4.8 share/views/partials/form.haml
rbbt-rest-1.4.7 share/views/partials/form.haml
rbbt-rest-1.4.6 share/views/partials/form.haml
rbbt-rest-1.4.5 share/views/partials/form.haml
rbbt-rest-1.4.4 share/views/partials/form.haml
rbbt-rest-1.4.3 share/views/partials/form.haml
rbbt-rest-1.4.2 share/views/partials/form.haml
rbbt-rest-1.4.1 share/views/partials/form.haml
rbbt-rest-1.4.0 share/views/partials/form.haml
rbbt-rest-1.3.32 share/views/partials/form.haml
rbbt-rest-1.3.31 share/views/partials/form.haml
rbbt-rest-1.3.30 share/views/partials/form.haml
rbbt-rest-1.3.29 share/views/partials/form.haml
rbbt-rest-1.3.28 share/views/partials/form.haml
rbbt-rest-1.3.27 share/views/partials/form.haml
rbbt-rest-1.3.26 share/views/partials/form.haml
rbbt-rest-1.3.25 share/views/partials/form.haml
rbbt-rest-1.3.24 share/views/partials/form.haml