mirror of
https://github.com/grocy/grocy.git
synced 2026-04-04 20:06:16 +02:00
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
@once
|
|
@push('componentScripts')
|
|
<script src="{{ $U('/viewjs/components/locationpicker.js', true) }}?v={{ $version }}"></script>
|
|
@endpush
|
|
@endonce
|
|
|
|
@php
|
|
if (empty($prefillByName)) {
|
|
$prefillByName = '';
|
|
}
|
|
@endphp
|
|
@php
|
|
if (empty($prefillById)) {
|
|
$prefillById = '';
|
|
}
|
|
@endphp
|
|
@php
|
|
if (!isset($isRequired)) {
|
|
$isRequired = true;
|
|
}
|
|
@endphp
|
|
@php
|
|
if (empty($hint)) {
|
|
$hint = '';
|
|
}
|
|
@endphp
|
|
@php
|
|
if (empty($nextInputSelector)) {
|
|
$nextInputSelector = '';
|
|
}
|
|
@endphp
|
|
|
|
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}"
|
|
data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
|
|
<label for="location_id">{{ $__t('Location') }}
|
|
@if (!empty($hint))
|
|
<i class="fas fa-question-circle text-muted" data-toggle="tooltip" data-trigger="hover click"
|
|
title="{{ $hint }}"></i>
|
|
@endif
|
|
</label>
|
|
{{-- TODO: Select2: dynamic data: locations --}}
|
|
<select class="form-control location-combobox" id="location_id" name="location_id"
|
|
@if ($isRequired) required @endif>
|
|
<option value=""></option>
|
|
@foreach ($locations as $location)
|
|
<option value="{{ $location->id }}">{{ $location->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
<div class="invalid-feedback">{{ $__t('You have to select a location') }}</div>
|
|
</div>
|