mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Applied .blade.php formatting rules
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@if($mode == 'edit')
|
||||
@section('title', $__t('Edit Barcode'))
|
||||
@section('title', $__t('Edit Barcode'))
|
||||
@else
|
||||
@section('title', $__t('Create Barcode'))
|
||||
@section('title', $__t('Create Barcode'))
|
||||
@endif
|
||||
|
||||
@section('viewJsName', 'productbarcodesform')
|
||||
@@ -20,50 +20,71 @@
|
||||
|
||||
<h3 class="text-muted">{{ $__t('Barcode for product') }} <strong>{{ $product->name }}</strong></h3>
|
||||
|
||||
<script>Grocy.EditMode = '{{ $mode }}';</script>
|
||||
<script>
|
||||
Grocy.EditMode = '{{ $mode }}';
|
||||
</script>
|
||||
|
||||
@if($mode == 'edit')
|
||||
<script>Grocy.EditObjectId = {{ $barcode->id }};</script>
|
||||
<script>
|
||||
Grocy.EditObjectId = {{ $barcode->id }};
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<form id="barcode-form" novalidate>
|
||||
<form id="barcode-form"
|
||||
novalidate>
|
||||
|
||||
<input type="hidden" name="product_id" value="{{ $product->id }}">
|
||||
<input type="hidden"
|
||||
name="product_id"
|
||||
value="{{ $product->id }}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">{{ $__t('Barcode') }}<i class="fas fa-barcode"></i></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control barcodescanner-input" required id="barcode" name="barcode" value="@if($mode == 'edit'){{ $barcode->barcode }}@endif" data-target="#scanned_barcode">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
class="form-control barcodescanner-input"
|
||||
required
|
||||
id="barcode"
|
||||
name="barcode"
|
||||
value="@if($mode == 'edit'){{ $barcode->barcode }}@endif"
|
||||
data-target="#scanned_barcode">
|
||||
@include('components.barcodescanner')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php if($mode == 'edit') { $value = $barcode->qu_factor_purchase_to_stock; } else { $value = 1; } @endphp
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'qu_factor_purchase_to_stock',
|
||||
'label' => 'Factor purchase to stock quantity unit',
|
||||
'min' => 1,
|
||||
'value' => $value,
|
||||
'isRequired' => true,
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
|
||||
'additionalCssClasses' => 'input-group-qu',
|
||||
'id' => 'qu_factor_purchase_to_stock',
|
||||
'label' => 'Factor purchase to stock quantity unit',
|
||||
'min' => 1,
|
||||
'value' => $value,
|
||||
'isRequired' => true,
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
|
||||
'additionalCssClasses' => 'input-group-qu',
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<div class="form-group">
|
||||
<label for="shopping_location_id_id">{{ $__t('Default store') }}</label>
|
||||
<select class="form-control" id="shopping_location_id" name="shopping_location_id">
|
||||
<select class="form-control"
|
||||
id="shopping_location_id"
|
||||
name="shopping_location_id">
|
||||
<option></option>
|
||||
@foreach($shoppinglocations as $store)
|
||||
<option @if($mode == 'edit' && $store->id == $product->shopping_location_id) selected="selected" @endif value="{{ $store->id }}">{{ $store->name }}</option>
|
||||
<option @if($mode=='edit'
|
||||
&&
|
||||
$store->id == $product->shopping_location_id) selected="selected" @endif value="{{ $store->id }}">{{ $store->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@else
|
||||
<input type="hidden" name="shopping_location_id" id="shopping_location_id" value="1">
|
||||
<input type="hidden"
|
||||
name="shopping_location_id"
|
||||
id="shopping_location_id"
|
||||
value="1">
|
||||
@endif
|
||||
|
||||
<button id="save-barcode-button" class="btn btn-success">{{ $__t('Save') }}</button>
|
||||
<button id="save-barcode-button"
|
||||
class="btn btn-success">{{ $__t('Save') }}</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user