Added a camera-barcode-scanner-button to the barcodes field on the product edit page (closes #723)

This commit is contained in:
Bernd Bestel
2020-04-13 15:55:27 +02:00
parent c6e06ab07c
commit 10f890ef89
8 changed files with 33 additions and 8 deletions

View File

@@ -23,7 +23,7 @@
<div class="form-group">
<label for="scanned_barcode">{{ $__t('Scan field') }}</label>
<div class="input-group">
<input type="text" class="form-control barcodescanner-input" id="scanned_barcode" name="scanned_barcode" value="" disabled>
<input type="text" class="form-control barcodescanner-input" id="scanned_barcode" name="scanned_barcode" value="" disabled data-target="#scanned_barcode">
</div>
</div>

View File

@@ -14,7 +14,7 @@
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-disallow-add-product-workflows="{{ BoolToString($disallowAddProductWorkflows) }}" data-disallow-all-product-workflows="{{ BoolToString($disallowAllProductWorkflows) }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
<label for="product_id">{{ $__t($label) }} <i class="fas fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted d-none"> {{ $__t('Barcode lookup is disabled') }}</span>&nbsp;&nbsp;<span class="small text-muted">{{ $hint }}</span></label>
<select class="form-control product-combobox barcodescanner-input" id="product_id" name="product_id" @if($isRequired) required @endif @if($disabled) disabled @endif>
<select class="form-control product-combobox barcodescanner-input" id="product_id" name="product_id" @if($isRequired) required @endif @if($disabled) disabled @endif data-target="@productpicker">
<option value=""></option>
@foreach($products as $product)
<option data-additional-searchdata="{{ $product->barcode }}@if(!empty($product->barcode)),@endif" value="{{ $product->id }}">{{ $product->name }}</option>

View File

@@ -69,7 +69,9 @@
<div class="form-group tm-group">
<label for="barcode-taginput">{{ $__t('Barcode(s)') }}&nbsp;&nbsp;<i class="fas fa-barcode"></i></label>
<input type="text" class="form-control tm-input" id="barcode-taginput">
<div class="input-group">
<input type="text" class="form-control tm-input barcodescanner-input" id="barcode-taginput" data-target="#barcode-taginput">
</div>
<div id="barcode-taginput-container"></div>
</div>