Sha256: 8136bb21c77ed9d8039d550f1dfc834d5aa13427a1b5ec9603cfd4ae2e549316

Contents?: true

Size: 1.05 KB

Versions: 24

Compression:

Stored size: 1.05 KB

Contents

<%
  remote = field_setting(model, field, :remote)
  unless remote.blank?
    field_remote_name = remote[:field]
    fk = remote[:fk] || field.to_s
    onchange = "updateFieldRemote('#{model_link(application, model)}', '#{model.underscore}', '#{fk}', '#{field_remote_name}', $('##{field.to_s}').val())"
  end
  onchangesettings = field_setting(model, field, :onchange)
  onchange = onchangesettings unless onchangesettings.blank?

	collection = field_collection(application, model, field, object)
	
	start_blank = field_setting(model, field, :start_blank)
	start_blank = true if start_blank.nil?
	
	collection.insert(0, ['',0]) if start_blank
	
	collection_selected = object.send(field.to_s)
	
	klass = field_setting(model, field, :class) || "input-xlarge"
%>
<%= form.select field, options_for_select(collection, collection_selected), {}, { :onchange => onchange, :class => "select2-me #{klass}", "data-placeholder" => "Selecione" } %>
<%#= select_tag "#{model.underscore}[#{field.to_s}]", options_for_select(collection, collection_selected), { :onchange => onchange } %>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
my_admin-0.1.13 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.12 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.11 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.10 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.9 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.8 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.7 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.6 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.5 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.4 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.3 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.2 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.1.1 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.0.12 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.0.11 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.0.10 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.0.9 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.0.8 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.0.7 app/views/my_admin/fields/edit/type/list.html.erb
my_admin-0.0.6 app/views/my_admin/fields/edit/type/list.html.erb