Sha256: b78c35364aafb4c2a160faf4622e8211a916caedf1ef354f37b374d57590c9df
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
- unless defined? required - required = false - if !(defined? id) || id.blank? - id = "#{name}_#{rand(1000)}" - unless defined? placeholder - placeholder = "Selecciona..." - unless defined? chosen - chosen = nil -if required .form-group.has-success label #{placeholder} select.chosen.form-control id="#{id}" class="#{clazz}" 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}" class="#{clazz}" 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sinatra-hexacta-0.3.9 | lib/sinatra/views/inputs/select.slim |