ldc-com-app-bo/resources/views/bo/partials/inputs/varchar-password.blade.php
Jérémy Munsch 62dfba632d
Closes #21
2023-09-13 16:04:12 +02:00

26 lines
1.2 KiB
PHP

@if (!empty($label))
<label class="col-form-label" for="{{ $id }}">
<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
class="form-control @if ($errors->has($name)) is-invalid @endif @if (!empty($hasWordCounter ?? false)) need-word-counter-password @endif"
id="{{ $id }}" id="{{ $id }}" name="{{ $name }}" type="password"
value="{{ old($name, $model->{$name} ?? '') }}" 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 d-flex justify-content-center align-items-center @if (!empty($hasWordCounter ?? false)) need-word-counter-password-btn @endif w-fit p-0"
data-json='@json($dataPassword)'>
</span>
</div>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => $id . 'Help',
'helper' => $helper,
])