mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
Added localization support
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@if($mode == 'edit')
|
||||
@section('title', 'Edit product')
|
||||
@section('title', $L('Edit product'))
|
||||
@else
|
||||
@section('title', 'Create product')
|
||||
@section('title', $L('Create product'))
|
||||
@endif
|
||||
|
||||
@section('viewJsName', 'productform')
|
||||
@@ -22,24 +22,24 @@
|
||||
<form id="product-form">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<label for="name">{{ $L('Name') }}</label>
|
||||
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $product->name}}@endif">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<label for="description">{{ $L('Description') }}</label>
|
||||
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $product->description }}@endif</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group tm-group">
|
||||
<label for="barcode-taginput">Barcode(s) <i class="fa fa-barcode"></i></label>
|
||||
<label for="barcode-taginput">{{ $L('Barcode(s)') }} <i class="fa fa-barcode"></i></label>
|
||||
<input type="text" class="form-control tm-input" id="barcode-taginput">
|
||||
<div id="barcode-taginput-container"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="location_id">Location</label>
|
||||
<label for="location_id">{{ $L('Location') }}</label>
|
||||
<select required class="form-control" id="location_id" name="location_id">
|
||||
@foreach($locations as $location)
|
||||
<option @if($mode == 'edit' && $location->id == $product->location_id) selected="selected" @endif value="{{ $location->id }}">{{ $location->name }}</option>
|
||||
@@ -49,19 +49,19 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="min_stock_amount">Minimum stock amount</label>
|
||||
<label for="min_stock_amount">{{ $L('Minimum stock amount') }}</label>
|
||||
<input required min="0" type="number" class="form-control" id="min_stock_amount" name="min_stock_amount" value="@if($mode == 'edit'){{ $product->min_stock_amount }}@else{{0}}@endif">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="default_best_before_days">Default best before days<br><span class="small text-muted">For purchases this amount of days will be added to today for the best before date suggestion</span></label>
|
||||
<label for="default_best_before_days">{{ $L('Default best before days') }}<br><span class="small text-muted">{{ $L('For purchases this amount of days will be added to today for the best before date suggestion') }}</span></label>
|
||||
<input required min="0" type="number" class="form-control" id="default_best_before_days" name="default_best_before_days" value="@if($mode == 'edit'){{ $product->default_best_before_days }}@else{{0}}@endif">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="qu_id_purchase">Quantity unit purchase</label>
|
||||
<label for="qu_id_purchase">{{ $L('Quantity unit purchase') }}</label>
|
||||
<select required class="form-control input-group-qu" id="qu_id_purchase" name="qu_id_purchase">
|
||||
@foreach($quantityunits as $quantityunit)
|
||||
<option @if($mode == 'edit' && $quantityunit->id == $product->qu_id_purchase) selected="selected" @endif value="{{ $quantityunit->id }}">{{ $quantityunit->name }}</option>
|
||||
@@ -71,7 +71,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="qu_id_stock">Quantity unit stock</label>
|
||||
<label for="qu_id_stock">{{ $L('Quantity unit stock') }}</label>
|
||||
<select required class="form-control input-group-qu" id="qu_id_stock" name="qu_id_stock">
|
||||
@foreach($quantityunits as $quantityunit)
|
||||
<option @if($mode == 'edit' && $quantityunit->id == $product->qu_id_stock) selected="selected" @endif value="{{ $quantityunit->id }}">{{ $quantityunit->name }}</option>
|
||||
@@ -81,14 +81,14 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="qu_factor_purchase_to_stock">Factor purchase to stock quantity unit</label>
|
||||
<label for="qu_factor_purchase_to_stock">{{ $L('Factor purchase to stock quantity unit') }}</label>
|
||||
<input required min="1" type="number" class="form-control input-group-qu" id="qu_factor_purchase_to_stock" name="qu_factor_purchase_to_stock" value="@if ($mode == 'edit'){{ $product->qu_factor_purchase_to_stock }}@else{{1}}@endif">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<p id="qu-conversion-info" class="help-block text-muted"></p>
|
||||
|
||||
<button id="save-product-button" type="submit" class="btn btn-default">Save</button>
|
||||
<button id="save-product-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user