Sha256: 080f9b925aa09cdd57cd81eb9e7821d0cf049424aaabea67df4a314bd5d27718
Contents?: true
Size: 1.66 KB
Versions: 73
Compression:
Stored size: 1.66 KB
Contents
- id = nil unless defined? id - action = nil unless defined? action - klass = nil unless defined? klass - method = 'post' unless (defined?(method) and not method.nil?) - enctype = 'multipart/form-data' unless defined? enctype - info = {} unless defined? info - locals = {} unless defined? locals - klass = "#{klass} custom" - if defined?(description) and description .form_description =description %hr %form.ui.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="field #{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] || locals[input], descriptions[input], input_id, input_options) .input.field.submit %input.ui.submit.button(type="submit") - if klass =~ /workflow_task/ %input.jobname(type='text' name='jobname' placeholder='optional job name' value="#{locals[:jobname]}") %select.format(name="_format") - [:html, :json, :raw, :binary].each do |format| %option(value=format)= format.to_s
Version data entries
73 entries across 73 versions & 1 rubygems