Open susheelbhai opened 4 weeks ago
Add Toggle show/hide eye button in password input
Add Toggle show/hide eye button in password input
@if ($type == 'text' || $type == 'number' || $type == 'file' || $type == 'email')
<input class="form-control" type="{{ $type }}" name="{{ $name }}" id="{{ $name }}"
placeholder="{{ $placeholder }}" value="{{ old($name, $value) }}" {{ $required }} {{ $attributes }}>
@endif
@if ($type == 'password')
<style>
.tooglePassword {
position: relative;
cursor: pointer;
}
.tooglePasswordDiv {
float: right;
position: relative;
top: -32px;
right: 14px;
}
</style>
<label for="{{ $name }}" class="form-label">
<strong>{{ $label }}</strong>
{!! $required == 'required' ? "<span class='text-danger'>*</span>" : '' !!}
</label>
<input class="form-control" type="{{ $type }}" name="{{ $name }}" id="{{ $name }}"
placeholder="{{ $placeholder }}" value="{{ old($name, $value) }}" {{ $required }}
{{ $attributes }}>
<div class="tooglePasswordDiv">
<i class="fa fa-eye" class="tooglePassword" onclick="tooglePassword_{{ $name }}()"> </i>
</div>
<script>
function tooglePassword_{{ $name }}() {
var x = document.getElementById("{{ $name }}");
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
}
}
</script>
@endif
Admin should have option to add new partner