ldc-com-app-bo/resources/views/bo/partials/inputs/varchar-password.blade.php
2023-03-31 15:14:48 +02:00

29 lines
1.2 KiB
PHP

@if(!empty($label))
<label for="{{ $id }}" class="col-form-label">
<b>{{ $label }} {{ $required ? '*' : '' }}</b>
</label>
@endif
@if(!empty($hasWordCounter ?? false))
<div class="word-counter" data-json='@json(['id'=> "$id"])'></div>
@endif
<div class="col-12 input-group d-flex w-100 justify-content-center">
<input id="{{ $id }}"
name="{{ $name }}"
type="password"
value="{{ old($name, $model->{$name} ?? '') }}"
class="form-control @if($errors->has($name)) is-invalid @endif @if(!empty($hasWordCounter ?? false)) need-word-counter-password @endif"
id="{{ $id }}"
aria-describedby="{{ $id }}Help"
placeholder="{{ $placeholder ?? __('Un beau mot de passe') }}"
autocomplete="current-password"
@if(!empty($required))required @endif>
@php $dataPassword = ['inputId' => $id]; @endphp
<span class="btn btn-primary password-visibility w-fit d-flex justify-content-center align-items-center p-0 @if(!empty($hasWordCounter ?? false)) need-word-counter-password-btn @endif"
data-json='@json($dataPassword)'>
</span>
</div>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => $id . 'Help',
'helper' => $helper
])