{{-- ------------------ code LEderhos Header ---------------------- |--------------------------------------------------------------------------- * _ _ __ _ _ _ __ * | | ___ ___ __| | ___| _| | ___ __| | ___ _ __| |__ ___ __|_ | * / __)/ __/ _ \ / _` |/ _ \ || | / _ \/ _` |/ _ \ '__| '_ \ / _ \/ __| | * \__ \ (_| (_) | (_| | __/ || |__| __/ (_| | __/ | | | | | (_) \__ \ | * ( /\___\___/ \__,_|\___| ||_____\___|\__,_|\___|_| |_| |_|\___/|___/ | * |_| |__| |__| ? @date: 2023-12-16 @version 3.0 @project: Okis 3.0 - dynamic custom input components ? @author: Code[Lederhos] ? Stanislaw Lederhos ? mail: codelederhos@gmail.com * $debugPicasso = [ 0 => 'Crafting a masterpiece out of chaos', * 1 => 'the art of flawless functionality' ]; |--------------------------------------------------------------------------> --------------------------------------------------------------- 2023-12-16 ----}} @php $inputKey = array_key_first( $input ); $inputId = $inputKey . '_' . uniqid(); $inputElement = $input[$inputKey]; $inputType = $inputElement['type'] ?? 'text'; $inputName = $inputElement['name'] ?? $inputKey; $inputValue = $inputElement['value'] ?? ''; $inputAttr = extractDynAttr($inputElement); $isRequired = !empty($inputElement['required']) ? ' required' : ''; $isDisabled = !empty($inputElement['disabled']) ? ' disabled' : ''; $labelElement = handleElem($inputElement['label'] ?? [], ['pill', 'text', 'html_text']); $pillElement = handleElem($labelElement['pill'] ?? [], ['text', 'html_text']); @endphp @if(!empty($labelElement)) @endif {{-- START Text input --}} {{-- @example: @input(['auth_user_id' => [ 'label' => [ 'text' => 'Mitarbeiter Nr.', 'class' => 'inputlabel-class', ], 'type' => 'text', // not required 'required' => true, 'placeholder' => 'Mitarbeiter Nr.', 'class' => 'text-center', ]]) --}} @if ($inputType === 'text') {{-- START Password input --}} @elseif ($inputType === 'password') {{-- Sichtbares Textfeld für die Eingabe --}} {{-- Verstecktes Feld für das tatsächliche Passwort --}} {{-- JS --}} {{-- START Simple formated Number input --}} @elseif ($inputType === 'number') @php $dataFormatSpacing = $inputAttr['data-format-spacing'] ?? '0'; @endphp {{-- END INPUTS --}} @endif