Applied .blade.php formatting rules

This commit is contained in:
Bernd Bestel
2020-08-31 20:32:50 +02:00
parent ea9ba0b2be
commit 33325d5560
90 changed files with 4000 additions and 2091 deletions

View File

@@ -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>