Sha256: 01643f553d85b819628685e691041e164a654fcf29f91cf4980e6820f82b6f7c
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 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' %> <div class="actions"> <%= f.submit %> </div> <% end %> <script> function after_select_client(item){ console.log('item is selected'); } </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bootstrap3_autocomplete_input-0.0.5 | test/dummy/app/views/orders/_form.html.erb |