Sha256: 1ea5b0d9dd091f9cf23df27965027eb967c3f51344049b9f9fa2dc8cb51de7d1

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

- input_descriptions ||= {}
- input_defaults ||= {}
- input_types ||= {}
- values ||= {}
- jobname ||= false
- email ||= false
- method ||= "post"
- hide_inputs ||= []
- action ||= ''
- klass ||= ''
- enctype = method == 'post' ? "multipart/form-data" : ""

%form(class=klass action=action method=method id=id enctype=enctype)
  - if inputs.empty?
    %input(type="hidden" name="noinputs" value="noinputs")

  - inputs.each do |name|
    - input_id = File.join(id, name.to_s)
    - input_type = input_types[name]
    - default = input_defaults[name]
    - value = values[name] || default
    - description = input_descriptions[name]
    - hide = hide_inputs.include? name
    = input(input_type, name, :id => input_id, :value => value, :default => default, :description => description, :default => default, :hide => hide)

  %div.submit_job
    - if jobname
      %span.jobname(id="jobname_#{id}")
        Optional Job Name
        %input(class="jobname" name="jobname" id="jobname_#{id}")
      - if email
        Email
        %input(class="email" name="email" id="email_#{id}")

    %input(type="submit" id="submit_#{id}")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbbt-views-1.0.0 share/views/partials/_form.haml