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.6.4 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.6.3 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.6.2 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.6.1 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.6.0 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.5.3 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.5.2 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.5.1 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.5.0 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.4.4 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.4.3 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.4.2 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.4.1 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.4.0 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.3.0 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.2.10 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.2.9 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.2.8 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.2.7 lib/sinatra/views/inputs/input.slim
sinatra-hexacta-1.2.6 lib/sinatra/views/inputs/input.slim