Added some form and status widgets

This commit is contained in:
Deon George 2022-08-01 20:29:57 +10:00
parent 9ef7e8e626
commit 2e512cc3ed
5 changed files with 52 additions and 22 deletions

View File

@ -0,0 +1,12 @@
<!-- Errors -->
@if ($errors->any())
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-ban"></i> Whoops!</h5>
<ul>
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
</div>
@endif

View File

@ -0,0 +1,14 @@
<div class="form-group">
<label for="{{ $id }}">{{ $label }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa-fw {{ $icon ?? 'fas fa-calendar' }}"></i></span>
</div>
<input type="date" class="form-control @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?? $id}}" value="{{ old($id,$value) }}">
<span class="invalid-feedback" role="alert">
@error($id)
{{ $message }}
@enderror
</span>
</div>
</div>

View File

@ -0,0 +1,14 @@
<div class="form-group">
<label for="{{ $id }}">{{ $label }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa-fw {{ $icon }}"></i></span>
</div>
<input type="text" class="form-control @error($id) is-invalid @enderror" id="{{ $id }}" name="{{ $name ?: $id}}" value="{{ old($old ?? $name,$value) }}">
<span class="invalid-feedback" role="alert">
@error($id)
{{ $message }}
@enderror
</span>
</div>
</div>

View File

@ -1,23 +1,3 @@
<!-- Success -->
@if(session()->has('success'))
<div class="alert alert-success alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-check"></i> Success!</h5>
<ul>
<li>{{ session()->get('success') }}</li>
</ul>
</div>
@endif
@include('adminlte::widget.success')
<!-- Errors -->
@if ($errors->any())
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-ban"></i> Whoops!</h5>
<ul>
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
</div>
@endif
@include('adminlte::widget.errors')

View File

@ -0,0 +1,10 @@
<!-- Success -->
@if(session()->has('success'))
<div class="alert alert-success alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-check"></i> Success!</h5>
<ul>
<li>{{ session()->get('success') }}</li>
</ul>
</div>
@endif