Sha256: 9ee5890994c8c88d45ac6fd10fd348928c7b62c7d9a32894f823f394717f2f97

Contents?: true

Size: 1.25 KB

Versions: 62

Compression:

Stored size: 1.25 KB

Contents

- unless defined? required
  - required = false
- if !(defined? id) || id.blank? 
  - id = "#{name}_#{rand(1000)}"
- unless defined? placeholder
  - placeholder = "..."
-unless defined? onkeyup
  -onkeyup = ''
-unless defined? readonly
  -readonly = false
- unless defined? clazz
  - clazz = nil
- unless defined? step
  - step = 1

-if required
  .form-group.has-feedback.has-success
    label #{title}
    .fg-line
      -if readonly
        input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}" readonly='' step="#{step}"
      -else
        input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}" step="#{step}"

-else
  .form-group
    label #{title}
    .fg-line
      -if readonly
        input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}" readonly='' step="#{step}"
      -else
        input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}" step="#{step}"

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
sinatra-hexacta-1.7.20 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.19 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.18 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.17 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.16 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.15 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.14 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.13 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.12 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.11 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.10 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.9 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.8 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.7 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.6 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.5 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.4 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.3 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.2 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.7.0 lib/sinatra/views/inputs/input.slim