Sha256: da92dc500319fb069cba4dd28c59b2ea39beb922e7d37a7f3769934a12633501
Contents?: true
Size: 989 Bytes
Versions: 2
Compression:
Stored size: 989 Bytes
Contents
- unless defined? required - required = false - if !(defined? id) || id.blank? - id = "#{name}_#{rand(1000)}" - unless defined? placeholder - placeholder = "Selecciona..." -if required .form-group.has-success label #{placeholder} select.chosen.form-control id="#{id}" name="#{name}" data-placeholder=("#{placeholder}") style=("display: none;") required="" -for element in elements -if chosen == element[:value] option value="#{element[:value]}" selected="" #{element[:text]} -else option value="#{element[:value]}" #{element[:text]} .help-block.with-errors -else .form-group label #{placeholder} select.chosen id="#{id}" name="#{name}" data-placeholder=("#{placeholder}") style=("display: none;") -for element in elements -if chosen == element[:value] option value="#{element[:value]}" selected="" #{element[:text]} -else option value="#{element[:value]}" #{element[:text]}
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sinatra-hexacta-0.0.2 | lib/sinatra/views/inputs/select.slim |
sinatra-hexacta-0.0.1 | lib/sinatra/views/inputs/select.slim |