Skip to content

A free open source IT asset/license management system

adds translation for editor inputs and sections

Godfrey Mf5d08cc62cb7
diff --git a/app/Http/Controllers/LabelsController.php b/app/Http/Controllers/LabelsController.php
index 482c1466ad..a0bf65a169 100755
--- a/app/Http/Controllers/LabelsController.php
+++ b/app/Http/Controllers/LabelsController.php
@@ -407,6 +407,7 @@ class LabelsController extends Controller
return view('settings.label-edit', [
'config' => $label->toEditorConfig(),
+ 'sections' => $label->getEditorSections(),
'selectedLabel' => null,
'selectedType' => $validated['type'],
'importedConfig' => null,
@@ -542,6 +543,7 @@ class LabelsController extends Controller
return view('settings.label-edit', [
'config' => $config,
+ 'sections' => $customLabel->getEditorSections(),
'selectedLabel' => $customLabel->base_label,
'selectedType' => $customLabel->type,
'importedConfig' => null,
@@ -587,6 +589,7 @@ class LabelsController extends Controller
return view('settings.label-edit', [
'config' => $config,
+ 'sections' => $label->getEditorSections(),
'selectedLabel' => $selectedLabel,
'selectedType' => $type,
'importedConfig' => $importedConfig,
diff --git a/app/Models/Labels/CustomLabels/Concerns/HasCustomLabelEditorSections.php b/app/Models/Labels/CustomLabels/Concerns/HasCustomLabelEditorSections.php
new file mode 100644
index 0000000000..2d12e6e795
--- /dev/null
+++ b/app/Models/Labels/CustomLabels/Concerns/HasCustomLabelEditorSections.php
@@ -0,0 +1,177 @@
+<?php
+
+namespace App\Models\Labels\CustomLabels\Concerns;
+
+trait HasCustomLabelEditorSections
+{
+ public function getEditorSections(): array
+ {
+ return $this->editorSections();
+ }
+
+ protected function editorSections(): array
+ {
+ return [
+ 'supports' => [
+ 'label' => 'admin/labels/general.sections.supports',
+ 'column_span' => 2,
+ 'display' => 'inline',
+ 'fields' => [
+ 'asset_tag' => ['type' => 'checkbox'],
+ 'barcode_1d' => ['type' => 'checkbox'],
+ 'barcode_2d' => ['type' => 'checkbox'],
+ 'fields' => ['type' => 'number'],
+ 'logo' => ['type' => 'checkbox'],
+ 'title' => ['type' => 'checkbox'],
+ ],
+ ],
+ 'content' => [
+ 'label' => 'admin/labels/general.sections.content',
+ 'column_span' => 2,
+ 'groups' => [
+ 'barcode_1d' => [
+ 'label' => 'admin/labels/general.groups.barcode_1d',
+ 'toggle' => 'supports.barcode_1d',
+ 'fields' => [
+ 'barcode_size' => ['type' => 'number'],
+ 'barcode_margin' => ['type' => 'number'],
+ 'barcode1D_v_align' => [
+ 'type' => 'select',
+ 'options' => [
+ 'T' => 'admin/labels/general.options.top',
+ 'M' => 'admin/labels/general.options.middle',
+ 'B' => 'admin/labels/general.options.bottom',
+ ],
+ ],
+ ],
+ ],
+
+ 'barcode_2d' => [
+ 'label' => 'admin/labels/general.groups.barcode_2d',
+ 'toggle' => 'supports.barcode_2d',
+ 'fields' => [
+ 'barcode_2d_size' => ['type' => 'number'],
+ 'barcode2D_h_align' => [
+ 'type' => 'select',
+ 'options' => [
+ 'L' => 'admin/labels/general.options.left',
+ 'C' => 'admin/labels/general.options.center',
+ 'R' => 'admin/labels/general.options.right',
+ ],
+ ],
+ 'barcode2D_v_align' => [
+ 'type' => 'select',
+ 'options' => [
+ 'T' => 'admin/labels/general.options.top',
+ 'M' => 'admin/labels/general.options.middle',
+ 'B' => 'admin/labels/general.options.bottom',
+ ],
+ ],
+ ],
+ ],
+
+ 'tag' => [
+ 'label' => 'admin/labels/general.groups.tag',
+ 'toggle' => 'supports.asset_tag',
+ 'fields' => [
+ 'tag_font' => ['type' => 'text'],
+ 'tag_font_size' => ['type' => 'number'],
+ 'tag_alignment' => [
+ 'type' => 'select',
+ 'options' => [
+ 'L' => 'admin/labels/general.options.left',
+ 'C' => 'admin/labels/general.options.center',
+ 'R' => 'admin/labels/general.options.right',
+ ],
+ ],
+ 'tag_offset_x' => ['type' => 'number'],
+ 'tag_offset_y' => ['type' => 'number'],
+ ],
+ ],
+
+ 'title' => [
+ 'label' => 'admin/labels/general.groups.title',
+ 'toggle' => 'supports.title',
+ 'fields' => [
+ 'title_font' => ['type' => 'text'],
+ 'title_font_size' => ['type' => 'number'],
+ 'title_margin' => ['type' => 'number'],
+ 'title_offset_x' => ['type' => 'number'],
+ ],
+ ],
+
+ 'field_labels' => [
+ 'label' => 'admin/labels/general.groups.field_labels',
+ 'toggle' => 'supports.fields',
+ 'fields' => [
+ 'field_label_font' => ['type' => 'text'],
+ 'field_label_font_size' => ['type' => 'number'],
+ 'field_label_margin' => ['type' => 'number'],
+ ],
+ ],
+
+ 'field_values' => [
+ 'label' => 'admin/labels/general.groups.field_values',
+ 'toggle' => 'supports.fields',
+ 'fields' => [
+ 'field_value_font' => ['type' => 'text'],
+ 'field_value_font_size' => ['type' => 'number'],
+ 'field_value_margin' => ['type' => 'number'],
+ ],
+ ],
+
+ 'logo' => [
+ 'label' => 'admin/labels/general.groups.logo',
+ 'toggle' => 'supports.logo',
+ 'fields' => [
+ 'logo_max_width' => ['type' => 'number'],
+ 'logo_margin' => ['type' => 'number'],
+ 'logo_h_align' => [
+ 'type' => 'select',
+ 'options' => [
+ 'L' => 'admin/labels/general.options.left',
+ 'C' => 'admin/labels/general.options.center',
+ 'R' => 'admin/labels/general.options.right',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'page' => [
+ 'label' => 'admin/labels/general.sections.page',
+ 'fields' => [
+ 'width' => ['type' => 'number'],
+ 'height' => ['type' => 'number'],
+ 'margin_top' => ['type' => 'number'],
+ 'margin_right' => ['type' => 'number'],
+ 'margin_bottom' => ['type' => 'number'],
+ 'margin_left' => ['type' => 'number'],
+ ],
+ ],
+
+ 'grid' => [
+ 'label' => 'admin/labels/general.sections.grid',
+ 'fields' => [
+ 'columns' => ['type' => 'number'],
+ 'rows' => ['type' => 'number'],
+ 'column_spacing' => ['type' => 'number'],
+ 'row_spacing' => ['type' => 'number'],
+ ],
+ ],
+
+ 'label' => [
+ 'label' => 'admin/labels/general.sections.label',
+ 'fields' => [
+ 'width' => ['type' => 'number'],
+ 'height' => ['type' => 'number'],
+ 'border' => ['type' => 'number'],
+ 'padding_top' => ['type' => 'number'],
+ 'padding_right' => ['type' => 'number'],
+ 'padding_bottom' => ['type' => 'number'],
+ 'padding_left' => ['type' => 'number'],
+ ],
+ ],
+ ];
+ }
+}
\ No newline at end of file
diff --git a/app/Models/Labels/CustomLabels/CustomSheetLabel.php b/app/Models/Labels/CustomLabels/CustomSheetLabel.php
index 8a94035f48..510306db55 100644
--- a/app/Models/Labels/CustomLabels/CustomSheetLabel.php
+++ b/app/Models/Labels/CustomLabels/CustomSheetLabel.php
@@ -6,6 +6,7 @@ use App\Helpers\Helper;
use App\Models\Labels\CustomLabels\Concerns\BuildsCustomLabelLayout;
use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelContentProperties;
use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelEditorConfig;
+use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelEditorSections;
use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelSupports;
use App\Models\Labels\CustomLabels\Concerns\RenderCustomLabelContent;
use App\Models\Labels\CustomLabels\Concerns\SeedsCustomLabelFromTemplate;
@@ -18,6 +19,7 @@ abstract class CustomSheetLabel extends RectangleSheet
use HasCustomLabelEditorConfig {
getContentEditorConfig as getBaseContentEditorConfig;
}
+ use HasCustomLabelEditorSections;
use HasCustomLabelSupports;
use SeedsCustomLabelFromTemplate;
use BuildsCustomLabelLayout;
diff --git a/app/Models/Labels/CustomLabels/CustomTapeLabel.php b/app/Models/Labels/CustomLabels/CustomTapeLabel.php
index 475f0f3b2a..ee075f29e4 100644
--- a/app/Models/Labels/CustomLabels/CustomTapeLabel.php
+++ b/app/Models/Labels/CustomLabels/CustomTapeLabel.php
@@ -5,6 +5,7 @@ namespace App\Models\Labels\CustomLabels;
use App\Models\Labels\CustomLabels\Concerns\BuildsCustomLabelLayout;
use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelContentProperties;
use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelEditorConfig;
+use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelEditorSections;
use App\Models\Labels\CustomLabels\Concerns\HasCustomLabelSupports;
use App\Models\Labels\CustomLabels\Concerns\RenderCustomLabelContent;
use App\Models\Labels\CustomLabels\Concerns\SeedsCustomLabelFromTemplate;
@@ -17,6 +18,7 @@ abstract class CustomTapeLabel extends Label
use HasCustomLabelEditorConfig {
getContentEditorConfig as getBaseContentEditorConfig;
}
+ use HasCustomLabelEditorSections;
use HasCustomLabelSupports;
use HasCustomLabelContentProperties;
use SeedsCustomLabelFromTemplate;
diff --git a/app/Services/CustomLabelImportValidator.php b/app/Services/CustomLabelImportValidator.php
index f44bea76ad..d2db968e3c 100644
--- a/app/Services/CustomLabelImportValidator.php
+++ b/app/Services/CustomLabelImportValidator.php
@@ -113,16 +113,16 @@ class CustomLabelImportValidator
'printable_area' => ['required', 'array'],
'content.barcode1D_v_align' => ['nullable', 'string', 'in:T,C,B'],
- 'content.barcode1D_placement' => ['nullable', 'string', 'in:full_width,text_column'],
+ 'content.barcode1D_placement' => ['nullable', 'string', 'in:full_width,text_column,inline'],
- 'content.barcode2D_placement' => ['nullable', 'string', 'in:stacked,text_column'],
+ 'content.barcode2D_placement' => ['nullable', 'string', 'in:stacked,inline,text_column'],
'content.barcode_2d_margin' => ['nullable', 'numeric'],
'content.text_size_mod' => ['nullable', 'numeric'],
'content.text_area_offset_y' => ['nullable', 'numeric'],
'content.logo_max_height' => ['nullable', 'numeric'],
- 'content.logo_placement' => ['nullable', 'string', 'in:text_column'],
+ 'content.logo_placement' => ['nullable', 'string', 'in:inline,text_column'],
'content.tag_position_mode' => ['nullable', 'string', 'in:free,inline'],
'content.field_alignment' => ['nullable', 'string', 'in:L,C,R'],
diff --git a/resources/lang/en-US/admin/labels/general.php b/resources/lang/en-US/admin/labels/general.php
new file mode 100644
index 0000000000..46c48770f8
--- /dev/null
+++ b/resources/lang/en-US/admin/labels/general.php
@@ -0,0 +1,78 @@
+<?php
+return [
+
+ 'sections' => [
+ 'page' => 'Page',
+ 'grid' => 'Grid',
+ 'label' => 'Label',
+ 'content' => 'Content',
+ 'supports' => 'Supports',
+ ],
+
+ 'groups' => [
+ 'barcode_1d' => 'Barcode 1D',
+ 'barcode_2d' => 'Barcode 2D',
+ 'tag' => 'Asset Tag',
+ 'title' => 'Title',
+ 'field_labels' => 'Field Labels',
+ 'field_values' => 'Field Values',
+ 'logo' => 'Logo',
+ ],
+
+ 'fields' => [
+ 'width' => 'Width',
+ 'height' => 'Height',
+ 'margin_top' => 'Top Margin',
+ 'margin_right' => 'Right Margin',
+ 'margin_bottom' => 'Bottom Margin',
+ 'margin_left' => 'Left Margin',
+ 'columns' => 'Columns',
+ 'rows' => 'Rows',
+ 'column_spacing' => 'Column Spacing',
+ 'row_spacing' => 'Row Spacing',
+ 'border' => 'Border',
+ 'padding_top' => 'Top Padding',
+ 'padding_right' => 'Right Padding',
+ 'padding_bottom' => 'Bottom Padding',
+ 'padding_left' => 'Left Padding',
+ 'barcode_size' => 'Barcode Size',
+ 'barcode_margin' => 'Barcode Margin',
+ 'barcode_2d_size' => '2D Barcode Size',
+ 'barcode1D_v_align' => 'Vertical Alignment',
+ 'barcode2D_h_align' => 'Horizontal Alignment',
+ 'barcode2D_v_align' => 'Vertical Alignment',
+ 'tag_font' => 'Font',
+ 'tag_font_size' => 'Font Size',
+ 'tag_alignment' => 'Alignment',
+ 'tag_offset_x' => 'Offset X',
+ 'tag_offset_y' => 'Offset Y',
+ 'title' => 'Title',
+ 'title_font' => 'Font',
+ 'title_font_size' => 'Font Size',
+ 'title_margin' => 'Margin',
+ 'title_offset_x' => 'Offset X',
+ 'field_label_font' => 'Font',
+ 'field_label_font_size' => 'Font Size',
+ 'field_label_margin' => 'Margin',
+ 'field_value_font' => 'Font',
+ 'field_value_font_size' => 'Font Size',
+ 'field_value_margin' => 'Margin',
+ 'logo_max_width' => 'Maximum Width',
+ 'logo_margin' => 'Margin',
+ 'logo_h_align' => 'Horizontal Alignment',
+ 'asset_tag' => 'Asset Tag',
+ 'barcode_1d' => '1D Barcode',
+ 'barcode_2d' => '2D Barcode',
+ 'fields' => 'Fields',
+ 'logo' => 'Logo',
+ ],
+
+ 'options' => [
+ 'left' => 'Left',
+ 'center' => 'Center',
+ 'right' => 'Right',
+ 'top' => 'Top',
+ 'middle' => 'Middle',
+ 'bottom' => 'Bottom',
+ ],
+];
\ No newline at end of file
diff --git a/resources/views/settings/label-edit.blade.php b/resources/views/settings/label-edit.blade.php
index 6dde2bdf6a..836bfb4b43 100644
--- a/resources/views/settings/label-edit.blade.php
+++ b/resources/views/settings/label-edit.blade.php
@@ -134,221 +134,173 @@
Unit: {{ $config['unit'] }} (applies to all dimensions)
</p>
</div>
+ <div class="row">
+ @foreach ($sections as $sectionKey => $section)
+ @continue(empty($section))
- @if(!empty($config['page']))
- <div class="panel box box-default label-config-panel">
- <div class="box-header with-border">
- <h3 class="box-title">Page</h3>
- <div class="box-tools pull-right">
- <button type="button" class="btn btn-box-tool" data-toggle="collapse"
- data-target="#page-config">
- <i class="fa fa-minus"></i>
- </button>
- </div>
- </div>
- <div id="page-config" class="box-body collapse in">
- @foreach($config['page'] as $key => $value)
- <div class="form-group">
- <label class="col-md-5 control-label">{{ $key }}</label>
- <div class="col-md-7">
- <input type="number" step="0.001" name="page[{{ $key }}]"
- value="{{ $value }}" class="form-control">
- </div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
- @if(!empty($config['tape']))
- <div class="panel box box-default label-config-panel">
- <div class="box-header with-border">
- <h3 class="box-title">Tape</h3>
- </div>
- <div id="tape-config" class="box-body collapse in">
- @foreach($config['tape'] as $key => $value)
- <div class="form-group">
- <label class="col-md-5 control-label">{{ $key }}</label>
- <div class="col-md-7">
- <input type="number" step="0.001" name="tape[{{ $key }}]"
- value="{{ $value }}" class="form-control">
- </div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
- @if(!empty($config['grid']))
- <div class="panel box box-default label-config-panel">
- <div class="box-header with-border">
- <h3 class="box-title">Grid</h3>
- <div class="box-tools pull-right">
- <button type="button" class="btn btn-box-tool" data-toggle="collapse"
- data-target="#grid-config">
- <i class="fa fa-minus"></i>
- </button>
- </div>
- </div>
- <div id="grid-config" class="box-body collapse in">
- @foreach($config['grid'] as $key => $value)
- <div class="form-group">
- <label class="col-md-5 control-label">{{ $key }}</label>
- <div class="col-md-7">
- <input type="number" step="0.001" name="grid[{{ $key }}]"
- value="{{ $value }}" class="form-control">
- </div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
-
- @if(!empty($config['label']))
- <div class="panel box box-default label-config-panel">
- <div class="box-header with-border">
- <h3 class="box-title">Label</h3>
- <div class="box-tools pull-right">
- <button type="button" class="btn btn-box-tool" data-toggle="collapse"
- data-target="#label-config">
- <i class="fa fa-minus"></i>
- </button>
- </div>
- </div>
- <div id="label-config" class="box-body collapse in">
- @foreach($config['label'] as $key => $value)
- <div class="form-group">
- <label class="col-md-5 control-label">{{ $key }}</label>
- <div class="col-md-7">
- <input type="number" step="0.001" name="label[{{ $key }}]"
- value="{{ $value }}" class="form-control">
- </div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
-
- @if(!empty($printable))
- <div class="panel box box-default label-config-panel">
- <div class="box-header with-border">
- <h3 class="box-title">Printable Area</h3>
- <div class="box-tools pull-right">
- <button type="button" class="btn btn-box-tool" data-toggle="collapse"
- data-target="#printable-config">
- <i class="fa fa-minus"></i>
- </button>
+ @php
+ $isFullWidth = ($section['column_span'] ?? 1) === 2;
+
+ $sectionClass = ($section['column_span'] ?? 1) === 2
+ ? 'col-md-12'
+ : 'col-md-6';
+
+ $inlineFields = ($section['display'] ?? null) === 'inline';
+ @endphp
+ @if ($isFullWidth)
+ </div>
+ <div class="row">
+ @endif
+
+ <div class="{{ $sectionClass }}">
+ <div class="box box-default">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ trans($section['label']) }}</h3>
</div>
- </div>
- <div id="printable-config" class="box-body collapse in">
- @foreach($printable as $key => $value)
- <div class="form-group">
- <label class="col-md-5 control-label">{{ $key }}</label>
- <div class="col-md-7">
- <input type="number" step="0.001" value="{{ $value }}"
- class="form-control" disabled>
+
+ <div class="box-body">
+ @if ($inlineFields)
+ <div class="row">
+ @foreach ($section['fields'] as $fieldKey => $field)
+ @php
+ $name = "{$sectionKey}[{$fieldKey}]";
+ $value = data_get($config, "{$sectionKey}.{$fieldKey}");
+ @endphp
+
+ <div class="col-md-2">
+ @if ($field['type'] === 'checkbox')
+ <input type="hidden" name="{{ $name }}" value="0">
+
+ <label>
+ <input
+ type="checkbox"
+ name="{{ $name }}"
+ value="1"
+ @checked((bool) $value)
+ >
+ {{ trans("admin/labels/general.fields.{$fieldKey}") }}
+ </label>
+ @else
+ <label>
+ {{ trans("admin/labels/general.fields.{$fieldKey}") }}
+ </label>
+
+ <input
+ type="{{ $field['type'] }}"
+ name="{{ $name }}"
+ value="{{ $value }}"
+ class="form-control"
+ >
+ @endif
+ </div>
+ @endforeach
</div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
-
- @if(!empty($config['content']))
- <div class="panel box box-default label-config-panel">
- <div class="box-header with-border">
- <h3 class="box-title">Content</h3>
- <div class="box-tools pull-right">
- <button type="button" class="btn btn-box-tool" data-toggle="collapse"
- data-target="#content-config">
- <i class="fa fa-minus"></i>
- </button>
- </div>
- </div>
- <div id="content-config" class="box-body collapse in">
- @foreach($config['content'] as $key => $value)
- @if(in_array($key, ['barcode1D_placement', 'barcode2D_placement', 'logo_placement']))
- <input type="hidden" name="content[{{ $key }}]" value="{{ $value }}">
- @continue
+ @elseif (isset($section['groups']))
+ @foreach ($section['groups'] as $groupKey => $group)
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <strong>{{ trans($group['label']) }}</strong>
+ </div>
+
+ <div class="panel-body">
+ @foreach ($group['fields'] as $fieldKey => $field)
+ @php
+ $name = "{$sectionKey}[{$fieldKey}]";
+ $value = data_get($config, "{$sectionKey}.{$fieldKey}");
+ @endphp
+
+ <div class="form-group">
+ <label class="col-md-4 control-label">
+ {{ trans("admin/labels/general.fields.{$fieldKey}") }}
+ </label>
+
+ <div class="col-md-4">
+ @if ($field['type'] === 'checkbox')
+ <input type="hidden" name="{{ $name }}"
+ value="0">
+
+ <input
+ type="checkbox"
+ name="{{ $name }}"
+ value="1"
+ @checked((bool) $value)
+ >
+ @elseif ($field['type'] === 'select')
+ <select name="{{ $name }}"
+ class="form-control">
+ @foreach ($field['options'] as $optionValue => $optionLabel)
+ <option
+ value="{{ $optionValue }}"
+ @selected($value == $optionValue)
+ >
+ {{ trans($optionLabel) }}
+ </option>
+ @endforeach
+ </select>
+ @else
+ <input
+ type="{{ $field['type'] }}"
+ name="{{ $name }}"
+ value="{{ $value }}"
+ class="form-control"
+ >
+ @endif
+ </div>
+ </div>
+ @endforeach
+ </div>
+ </div>
+ @endforeach
+ @else
+ @foreach ($section['fields'] as $fieldKey => $field)
+ @php
+ $name = "{$sectionKey}[{$fieldKey}]";
+ $value = data_get($config, "{$sectionKey}.{$fieldKey}");
+ @endphp
+
+ <div class="form-group">
+ <label class="col-md-4 control-label">
+ {{ trans("admin/labels/general.fields.{$fieldKey}") }}
+ </label>
+
+ <div class="col-md-4">
+ @if ($field['type'] === 'checkbox')
+ <input type="hidden" name="{{ $name }}" value="0">
+
+ <input
+ type="checkbox"
+ name="{{ $name }}"
+ value="1"
+ @checked((bool) $value)
+ >
+ @elseif ($field['type'] === 'select')
+ <select name="{{ $name }}" class="form-control">
+ @foreach ($field['options'] as $optionValue => $optionLabel)
+ <option
+ value="{{ $optionValue }}"
+ @selected($value == $optionValue)
+ >
+ {{ trans($optionLabel) }}
+ </option>
+ @endforeach
+ </select>
+ @else
+ <input
+ type="{{ $field['type'] }}"
+ name="{{ $name }}"
+ value="{{ $value }}"
+ class="form-control"
+ >
+ @endif
+ </div>
+ </div>
+ @endforeach
@endif
- <div class="form-group">
- <label class="col-md-5 control-label">{{ $key }}</label>
- <div class="col-md-7">
- @if($key === 'tag_alignment' || $key === 'logo_h_align' || $key === 'barcode2D_h_align')
- <select name="content[{{ $key }}]" class="form-control align-sync"
- data-key="{{ $key }}">
- <option value="L" {{ $value === 'L' ? 'selected' : '' }}>
- Left
- </option>
- <option value="R" {{ $value === 'R' ? 'selected' : '' }}>
- Right
- </option>
- </select>
- @elseif($key === 'logo_v_align' || $key === 'barcode2D_v_align')
- <select name="content[{{ $key }}]" class="form-control">
- <option value="T" {{ $value === 'T' ? 'selected' : '' }}>
- Top
- </option>
- <option value="C" {{ $value === 'C' ? 'selected' : '' }}>
- Center
- </option>
- <option value="B" {{ $value === 'B' ? 'selected' : '' }}>
- Bottom
- </option>
- </select>
- @elseif($key === 'barcode1D_v_align')
- <select name="content[{{ $key }}]" class="form-control">
- <option value="T" {{ $value === 'T' ? 'selected' : '' }}>
- Top
- </option>
- <option value="B" {{ $value === 'B' ? 'selected' : '' }}>
- Bottom
- </option>
- </select>
- @else
- <input type="number" step="1" name="content[{{ $key }}]"
- value="{{ $value }}" class="form-control">
- @endif
- </div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
-
- @if(!empty($config['supports']))
- <div class="panel box box-default label-config-panel">
- <div class="box-header with-border">
- <h3 class="box-title">Supports</h3>
- <div class="box-tools pull-right">
- <button type="button" class="btn btn-box-tool" data-toggle="collapse"
- data-target="#supports-config">
- <i class="fa fa-minus"></i>
- </button>
</div>
</div>
- <div id="supports-config" class="box-body collapse in">
- @foreach($config['supports'] as $key => $value)
- <div class="form-group">
- <label class="col-md-5 control-label">{{ $key }}</label>
- <div class="col-md-7">
- @if(is_bool($value))
- <input type="hidden" name="supports[{{ $key }}]" value="0">
- <label class="form-control" style="height:auto; min-height:34px;">
- <input type="checkbox" name="supports[{{ $key }}]"
- value="1" {{ $value ? 'checked' : '' }}>
- {{ $key }}
- </label>
- @else
- <input type="number" step="1" name="supports[{{ $key }}]"
- value="{{ $value }}" class="form-control">
- @endif
- </div>
- </div>
- @endforeach
- </div>
</div>
- @endif
-
-
+ @endforeach
+ </div>
</div>
</form>