Sha256: 7ad680c91db7585bf2b04202612a1712ce0be00a55cd08c06b6ac4d3e4409c3d

Contents?: true

Size: 763 Bytes

Versions: 8

Compression:

Stored size: 763 Bytes

Contents

<% chosen_class = "chzn-select-#{attribute_id}" %>

<li id="<%= attribute_id %>_field">
  <%= form.label attribute, label_text %>
  <%= hidden_field_tag related_ids %>
  <%= select_tag related_ids,
                 options_from_collection_for_select(values.all, "id", "to_label", related_items.map(&:id)),
                 html_options.merge(:multiple => true,
                                    :id => attribute_id,
                                    :class => chosen_class,
                                    :style => "width: 550px;",
                                    "data-placeholder" => Typus::I18n.t("Select Some Options")) %>
</li>

<script type="text/javascript">
  $(document).ready(function () { $(".<%= chosen_class %>").chosen(); });
</script>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
typus-3.1.10 app/views/admin/templates/_has_and_belongs_to_many.html.erb
typus-3.1.9 app/views/admin/templates/_has_and_belongs_to_many.html.erb
typus-3.1.8 app/views/admin/templates/_has_and_belongs_to_many.html.erb
typus-3.1.7 app/views/admin/templates/_has_and_belongs_to_many.html.erb
typus-3.1.6 app/views/admin/templates/_has_and_belongs_to_many.html.erb
typus-3.1.5 app/views/admin/templates/_has_and_belongs_to_many.html.erb
typus-3.1.4 app/views/admin/templates/_has_and_belongs_to_many.html.erb
typus-3.1.3 app/views/admin/templates/_has_and_belongs_to_many.html.erb