Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <%= simple_form_for @physical_store, :url => api_physical_stores_path, :method => :post, remote: true, :wrapper => :bootstrap3_horizontal, html: { class: 'form-horizontal', accept: 'application/json', multipart: true } do |f| %>
  2. <%= f.input :day_from, :collection => DAYS_SF, default: 'Monday', required: true %>
  3. <%= f.input :day_to, :collection => DAYS_SF, default: 'Friday', required: true %>
  4. <%= f.input :time_from, required: true %>
  5. <%= f.input :time_to, required: true %>
  6. <%= end %>
  7.  
  8. config.wrappers :bootstrap3_horizontal, tag: 'div', class: 'form-group', error_class: 'has-error',
  9. defaults: { input_html: { class: 'form-group default_class' } } do |b|
  10.  
  11. b.use :html5
  12. b.use :min_max
  13. b.use :maxlength
  14. b.use :placeholder
  15.  
  16. b.optional :pattern
  17. b.optional :readonly
  18.  
  19. b.use :label, wrap_with: { tag: 'div', class: 'col-md-6' }
  20.  
  21. b.wrapper tag: 'div', class: 'col-md-6' do |input_block|
  22. input_block.use :input
  23. input_block.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
  24. input_block.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' }
  25. end
  26. end
  27.  
  28. <div class="form-group string required physical_store_time_from">
  29. <div class="col-md-6"><label class="string required control-label" for="physical_store_time_from">Store Hours <abbr title="required">*</abbr></label></div>
  30. <div class="col-md-3"><input class="string required form-control" id="physical_store_time_from" name="physical_store[time_from]" type="text"></div>
  31. <div class="col-md-3"><input class="string required form-control" id="physical_store_time_to" name="physical_store[time_to]" type="text"></div>
  32. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement