Sha256: dc84df98933579240f1d65aff16f33b8bb9ea1d618403f83354f8c61aac2865d
Contents?: true
Size: 1.28 KB
Versions: 34
Compression:
Stored size: 1.28 KB
Contents
- unless defined? required - required = false - if !(defined? id) || id.blank? - id = "#{name}_#{rand(1000)}" - unless defined? placeholder - placeholder = "Selecciona..." - unless defined? clazz - clazz = nil - unless defined? selected_elements - selected_elements = [] - if selected_elements.nil? - selected_elements = [] - selected_elements = selected_elements.collect { |element| element.to_s } -if required .form-group.has-success label.fg-label #{placeholder} select.chosen id="#{id}" class="#{clazz}" name="#{name}[]" data-placeholder=("#{placeholder}") chosen="" multiple="" style=("display: none;") required="" -for element in elements -if selected_elements.include?(element[:value].to_s) option value="#{element[:value]}" selected="" #{element[:text]} -else option value="#{element[:value]}" #{element[:text]} -else .form-group label.fg-label #{placeholder} select.chosen id="#{id}" name="#{name}[]" data-placeholder=("#{placeholder}") chosen="" multiple="" style=("display: none;") -for element in elements -if selected_elements.include?(element[:value].to_s) option value="#{element[:value]}" selected="" #{element[:text]} -else option value="#{element[:value]}" #{element[:text]}
Version data entries
34 entries across 34 versions & 1 rubygems