Some view changes to make stuff more obvious
This commit is contained in:
parent
e6264fd6c8
commit
4c1a630415
3 changed files with 12 additions and 8 deletions
|
@ -2,8 +2,6 @@ class WelcomeController < ApplicationController
|
||||||
skip_before_filter :verify_authenticity_token, only: :token_sign_in
|
skip_before_filter :verify_authenticity_token, only: :token_sign_in
|
||||||
|
|
||||||
def index
|
def index
|
||||||
user = User.find_by(name: "benji")
|
|
||||||
sign_in_and_redirect user
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def token_sign_in
|
def token_sign_in
|
||||||
|
|
|
@ -37,7 +37,12 @@ class FormattedFormBuilder < ActionView::Helpers::FormBuilder
|
||||||
options[:value] = number_with_precision(options[:value], precision: 2)
|
options[:value] = number_with_precision(options[:value], precision: 2)
|
||||||
|
|
||||||
form_group_builder(name, options) do
|
form_group_builder(name, options) do
|
||||||
number_field_without_format(name, options)
|
content_tag :div, class: "input-group" do
|
||||||
|
content_tag(:span, class: "input-group-addon") do
|
||||||
|
content_tag :span, nil, class: "glyphicon glyphicon-euro"
|
||||||
|
end +
|
||||||
|
number_field_without_format(name, options)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
.center
|
.row
|
||||||
.row
|
.col-md-6.col-md-offset-1.barcode-wrapper
|
||||||
.col-md-6.col-md-offset-1.barcode-wrapper
|
.center
|
||||||
%h1 Order for #{@user.name}
|
%h1 Order for #{@user.name}
|
||||||
= form_tag nil, id: "from_barcode_form" do
|
= form_tag nil, id: "from_barcode_form" do
|
||||||
%input.center-block{ type: :number, name: :id, autofocus: true }
|
%input.center-block{ type: :number, name: :id, autofocus: true }
|
||||||
= "- OR -"
|
= "- OR -"
|
||||||
%button.btn.btn-default.center-block{ data: { toggle: :modal, target: "#products_modal" } }
|
%button.btn.btn-default.center-block{ data: { toggle: :modal, target: "#products_modal" } }
|
||||||
Select Product Without Barcode
|
Select Product Without Barcode
|
||||||
.col-md-4.col-md-offset-1
|
.col-md-4.col-md-offset-1
|
||||||
|
= form_for [@user, @order] do |f|
|
||||||
|
= render 'errors', object: @order
|
||||||
#current_order
|
#current_order
|
||||||
.div.center
|
.div.center
|
||||||
= image_tag "logo.png"
|
= image_tag "logo.png"
|
||||||
= form_for [@user, @order] do |f|
|
|
||||||
%table
|
%table
|
||||||
%tr.margin
|
%tr.margin
|
||||||
= f.fields_for :order_items do |ff|
|
= f.fields_for :order_items do |ff|
|
||||||
|
|
Loading…
Reference in a new issue