CSS fixes, BS5 doesnt have ml/mr,pl/pr. Fix remember me. Style consistencies. Added Error 500 page.

This commit is contained in:
Deon George 2021-07-24 14:12:10 +10:00
parent bbbb06d0a2
commit 29a707831e
15 changed files with 55 additions and 30 deletions

View File

@ -45,7 +45,7 @@ class LoginController extends Controller
{ {
$this->validateLogin($request); $this->validateLogin($request);
if (Auth::attempt(array_merge($this->credentials($request),['active'=>TRUE]))) { if (Auth::attempt(array_merge($this->credentials($request),['active'=>TRUE]),TRUE)) {
$request->session()->regenerate(); $request->session()->regenerate();
return $this->sendLoginResponse($request); return $this->sendLoginResponse($request);

View File

@ -67,7 +67,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">Sign In</button> <button type="submit" name="submit" class="btn btn-success float-end">Sign In</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -43,7 +43,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">Reset</button> <button type="submit" name="submit" class="btn btn-success float-end">Reset</button>
</div> </div>
</div> </div>

View File

@ -74,7 +74,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">Sign In</button> <button type="submit" name="submit" class="btn btn-success float-end">Sign In</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -79,7 +79,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">Sign In</button> <button type="submit" name="submit" class="btn btn-success float-end">Sign In</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -100,7 +100,7 @@
<div class="col-12"> <div class="col-12">
<a href="{{ url('ftn/domain') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('ftn/domain') }}" class="btn btn-danger">Cancel</a>
@can('admin',$o) @can('admin',$o)
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($o->exists)Save @else Add @endif</button> <button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
@endcan @endcan
</div> </div>
</div> </div>

View File

@ -0,0 +1,18 @@
@extends('layouts.auth')
@section('htmlheader_title')
500
@endsection
@section('content')
<div class="row">
<div class="col-6 m-auto">
<h3>500 - Server Error?</h3>
<p>Sorry, something went bad. Try again?</p>
<span class="mb-3 btn btn-sm btn-danger" role="alert" style="text-align: left;">
{{ $exception->getMessage() }}
</span>
<p><a href="{{ url('/') }}" class="goback">Home</a></p>
</div>
</div>
@endsection

View File

@ -25,7 +25,7 @@
@auth @auth
<ul class="float-end" id="searchbar"> <ul class="float-end" id="searchbar">
<li><input type="text" id="q" name="search" placeholder="Search..."><i class="bi bi-search"></i><div id="search_results"></div></li> <li><input type="text" class="ps-2" id="q" name="search" placeholder="Search..."><i class="bi bi-search"></i><div id="search_results"></div></li>
</ul> </ul>
@endauth @endauth

View File

@ -28,7 +28,7 @@
@if($errors->count()) @if($errors->count())
<div class="row"> <div class="row">
<span class="pl-5 btn btn-sm btn-danger" role="alert" style="text-align: left;"> <span class="btn btn-sm btn-danger" role="alert" style="text-align: left;">
There were errors with the submission. There were errors with the submission.
<ul> <ul>
@foreach ($errors->all() as $error) @foreach ($errors->all() as $error)
@ -42,7 +42,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">Process</button> <button type="submit" name="submit" class="btn btn-success float-end">Process</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -164,17 +164,24 @@ use App\Models\Setup;
</div> </div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-2">
<a href="{{ url('ftn/domain') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('ftn/domain') }}" class="btn btn-danger">Cancel</a>
@if($errors->count()) </div>
<span class="pl-5 btn btn-sm btn-danger" role="alert">
There were errors with the submission. <span class="col-6 mt-auto mx-auto text-center align-bottom">
@dump($errors) @if($errors->count())
</span> <span class="btn btn-sm btn-danger" role="alert">
@endif There were errors with the submission.
@can('admin',$o) @dump($errors)
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($o->exists)Save @else Add @endif</button> </span>
@endcan @endif
</span>
@can('admin',$o)
<div class="col-2">
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
</div>
@endcan
</div> </div>
</div> </div>
</form> </form>

View File

@ -84,7 +84,7 @@
<div class="input-group has-validation"> <div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-hash"></i></span> <span class="input-group-text"><i class="bi bi-hash"></i></span>
<input type="text" style="width: 35%;" class="form-control @error('node_id') is-invalid @enderror" id="node_id" placeholder="Node" name="node_id" value="{{ old('node_id',$o->node_id) }}" @cannot('admin',$o)disabled @endcannot> <input type="text" style="width: 35%;" class="form-control @error('node_id') is-invalid @enderror" id="node_id" placeholder="Node" name="node_id" value="{{ old('node_id',$o->node_id) }}" @cannot('admin',$o)disabled @endcannot>
<span class="input-group-text ml-1 mr-1 p-0">.</span> <span class="input-group-text p-0">.</span>
<input type="text" class="form-control @error('point_id') is-invalid @enderror" id="point_id" placeholder="0" name="point_id" value="{{ old('point_id',$o->point_id) ?: 0 }}" @cannot('admin',$o)disabled @endcannot style="padding-left: 0;"> <input type="text" class="form-control @error('point_id') is-invalid @enderror" id="point_id" placeholder="0" name="point_id" value="{{ old('point_id',$o->point_id) ?: 0 }}" @cannot('admin',$o)disabled @endcannot style="padding-left: 0;">
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@error('node_id') @error('node_id')
@ -98,7 +98,7 @@
</div> </div>
<!-- Region Address --> <!-- Region Address -->
<div class="pl-0 col-3 d-none" id="region-address"> <div class="col-3 ps-0 d-none" id="region-address">
<label for="region_id_new" class="form-label">Region Address</label> <label for="region_id_new" class="form-label">Region Address</label>
<div class="input-group has-validation"> <div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-hash"></i></span> <span class="input-group-text"><i class="bi bi-hash"></i></span>
@ -115,12 +115,12 @@
</div> </div>
<!-- Host Address --> <!-- Host Address -->
<div class="pl-0 col-3 d-none" id="host-address"> <div class="col-3 ps-0 d-none" id="host-address">
<label for="host_id_new" class="form-label">Host Address</label> <label for="host_id_new" class="form-label">Host Address</label>
<div class="input-group has-validation"> <div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-hash"></i></span> <span class="input-group-text"><i class="bi bi-hash"></i></span>
<input type="text" class="form-control @error('host_id_new') is-invalid @enderror" id="host_id_new" placeholder="Host #" name="host_id_new" value="{{ old('host_id_new') }}" @cannot('admin',$o)disabled @endcannot> <input type="text" class="form-control @error('host_id_new') is-invalid @enderror" id="host_id_new" placeholder="Host #" name="host_id_new" value="{{ old('host_id_new') }}" @cannot('admin',$o)disabled @endcannot>
<span class="input-group-text ml-1 mr-1 p-0">/</span> <span class="input-group-text p-0">/</span>
<input type="text" class="form-control @error('node_id_new') is-invalid @enderror" id="node_id_new" placeholder="Node #" name="node_id_new" value="{{ old('node_id_new') }}" @cannot('admin',$o)disabled @endcannot> <input type="text" class="form-control @error('node_id_new') is-invalid @enderror" id="node_id_new" placeholder="Node #" name="node_id_new" value="{{ old('node_id_new') }}" @cannot('admin',$o)disabled @endcannot>
<span class="input-group-text">.0</span> <span class="input-group-text">.0</span>
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -160,7 +160,7 @@
<span class="col-6 mt-auto mx-auto text-center align-bottom"> <span class="col-6 mt-auto mx-auto text-center align-bottom">
@if($errors->count()) @if($errors->count())
<span class="pl-5 btn btn-sm btn-danger" role="alert"> <span class="btn btn-sm btn-danger" role="alert">
There were errors with the submission. There were errors with the submission.
</span> </span>
@endif @endif
@ -168,7 +168,7 @@
@can('admin',$o) @can('admin',$o)
<div class="col-2"> <div class="col-2">
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">Add</button> <button type="submit" name="submit" class="btn btn-success float-end">Add</button>
</div> </div>
@endcan @endcan
</div> </div>

View File

@ -109,7 +109,7 @@
<span class="col-6 mt-auto mx-auto text-center align-bottom"> <span class="col-6 mt-auto mx-auto text-center align-bottom">
@if($errors->count()) @if($errors->count())
<span class="pl-5 btn btn-sm btn-danger" role="alert"> <span class="btn btn-sm btn-danger" role="alert">
There were errors with the submission. There were errors with the submission.
</span> </span>
@endif @endif
@ -117,7 +117,7 @@
@can('admin',$o) @can('admin',$o)
<div class="col-2"> <div class="col-2">
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">Add</button> <button type="submit" name="submit" class="btn btn-success float-end">Add</button>
</div> </div>
@endcan @endcan
</div> </div>

View File

@ -171,7 +171,7 @@
<div class="col-12"> <div class="col-12">
<a href="{{ url('ftn/system') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('ftn/system') }}" class="btn btn-danger">Cancel</a>
@can('admin',$o) @can('admin',$o)
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($o->exists)Save @else Add @endif</button> <button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
@endcan @endcan
</div> </div>
</div> </div>

View File

@ -89,7 +89,7 @@
<div class="col-12"> <div class="col-12">
<a href="{{ url('user/list') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('user/list') }}" class="btn btn-danger">Cancel</a>
@can('admin',$o) @can('admin',$o)
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($o->exists)Save @else Add @endif</button> <button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
@endcan @endcan
</div> </div>
</div> </div>

View File

@ -147,7 +147,7 @@
<div class="col-12"> <div class="col-12">
<a href="{{ url('ftn/zone') }}" class="btn btn-danger">Cancel</a> <a href="{{ url('ftn/zone') }}" class="btn btn-danger">Cancel</a>
@can('admin',$o) @can('admin',$o)
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($o->exists)Save @else Add @endif</button> <button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
@endcan @endcan
</div> </div>
</div> </div>