Sha256: f93b4f75fb30f46162982c3c06d60a23cfdf1ee2c1f10a880e5e8cc7ddd8ba65
Contents?: true
Size: 1.33 KB
Versions: 1
Compression:
Stored size: 1.33 KB
Contents
<%= form_for(@order) do |f| %> <% if @order.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@order.errors.count, "error") %> prohibited this order from being saved:</h2> <ul> <% @order.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <%= text_field_tag :notes %> <br> <%= text_field_tag :client %> <div class="actions"> <%= f.submit %> </div> <% end %> <br><br> <h2>Simple form:</h2> <%= simple_form_for(@order) do |f| %> <% if @order.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@order.errors.count, "error") %> prohibited this order from being saved:</h2> <ul> <% @order.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <%= f.input :notes %> <br> <%#= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_orders_url, :items => 2, :minLength=>1, :afterSelect=>'after_select_client' %> <%= f.input :client, :as => :autocomplete, :source_query => autocomplete_client_name_clients_url %> <div class="actions"> <%= f.submit %> </div> <% end %> <script> function after_select_client(item){ console.log('item is selected'); console.log(item); } </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bootstrap3_autocomplete_input-0.1.8 | test/dummy/app/views/orders/_form.html.erb |