Really fix it
This commit is contained in:
parent
9c9511b95e
commit
aec212e754
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ ready = function() {
|
||||||
barcode = $(this).find("input[type=number]").val();
|
barcode = $(this).find("input[type=number]").val();
|
||||||
$("#from_barcode_form")[0].reset();
|
$("#from_barcode_form")[0].reset();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/barcodes/" + barcode,
|
url: $("#from_barcode_form").data("url") + "/barcodes/" + barcode,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
increment_product(data["id"]);
|
increment_product(data["id"]);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.col-md-6.col-md-offset-1.barcode-wrapper
|
.col-md-6.col-md-offset-1.barcode-wrapper
|
||||||
.center
|
.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", data: { url: URI.join(root_url, "barcodes").to_s } 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" } }
|
||||||
|
|
Loading…
Reference in a new issue