@php require_frontend_packages(['bootstrap-select']); @endphp @once @push('componentScripts') @endpush @endonce @if(count($userfields) > 0)

{{ $__t('Userfields') }}

@foreach($userfields as $userfield) @if($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_SINGLE_LINE_TEXT)
input_required == 1) required @endif>
{{ $__t('Mandatory Userfield') }}
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_SINGLE_MULTILINE_TEXT)
{{ $__t('Mandatory Userfield') }}
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_NUMBER_INT) @include('components.numberpicker', array( 'id' => $userfield->name, 'label' => $userfield->caption, 'noNameAttribute' => true, 'min' => 0, 'isRequired' => $userfield->input_required == 1, 'additionalCssClasses' => 'userfield-input', 'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"', 'value' => '' )) @elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_NUMBER_DECIMAL) @include('components.numberpicker', array( 'id' => '', 'label' => $userfield->caption, 'noNameAttribute' => true, 'min' => 0, 'decimals' => 4, 'isRequired' => $userfield->input_required == 1, 'additionalCssClasses' => 'userfield-input', 'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"', 'value' => '' )) @elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_NUMBER_CURRENCY) @include('components.numberpicker', array( 'id' => '', 'label' => $userfield->caption, 'noNameAttribute' => true, 'min' => 0, 'decimals' => 4, 'isRequired' => $userfield->input_required == 1, 'additionalCssClasses' => 'userfield-input locale-number-input locale-number-currency', 'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"', 'value' => '' )) @elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_DATE) @include('components.datetimepicker2', array( 'id' => $userfield->name, 'label' => $userfield->caption, 'noNameAttribute' => true, 'format' => 'YYYY-MM-DD', 'initWithNow' => false, 'limitEndToNow' => false, 'limitStartToNow' => false, 'additionalGroupCssClasses' => 'date-only-datetimepicker2', 'isRequired' => $userfield->input_required == 1, 'additionalCssClasses' => 'userfield-input', 'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"' )) @elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_DATETIME) @include('components.datetimepicker2', array( 'id' => $userfield->name, 'label' => $userfield->caption, 'noNameAttribute' => true, 'format' => 'YYYY-MM-DD HH:mm:ss', 'initWithNow' => false, 'limitEndToNow' => false, 'limitStartToNow' => false, 'isRequired' => $userfield->input_required == 1, 'additionalCssClasses' => 'userfield-input', 'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"' )) @elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
input_required == 1) required @endif>
{{ $__t('Mandatory Userfield') }}
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_LIST)
{{ $__t('Mandatory Userfield') }}
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_CHECKLIST)
{{ $__t('Mandatory Userfield') }}
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_LINK)
input_required == 1) required @endif>
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_LINK_WITH_TITLE)
input_required == 1) required @endif>
input_required == 1) required @endif>
{{ $__t('Mandatory Userfield') }}
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_FILE)
input_required == 1) required @endif>
{{ $__t('Mandatory Userfield') }}
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_IMAGE)
input_required == 1) required @endif>
{{ $__t('Mandatory Userfield') }}
{{ $userfield->name }}
@endif @endforeach
@endif