diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index c8813d8..bf5f656 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -64,7 +64,9 @@ class UserController extends Controller 'code', 'Invalid Code!' ); - return back()->withErrors($validator); + return back() + ->withInput() + ->withErrors($validator); } } diff --git a/resources/views/domain/addedit.blade.php b/resources/views/domain/addedit.blade.php index 4870e53..5aa2e26 100644 --- a/resources/views/domain/addedit.blade.php +++ b/resources/views/domain/addedit.blade.php @@ -1,5 +1,5 @@ -@use(App\Models\Echoarea) +@use(App\Models\Echoarea) @extends('layouts.app') @@ -8,7 +8,7 @@ @endsection @section('content') -
+ @csrf
@@ -137,22 +137,12 @@
@if ($o->isManaged()) - -
- - - - @error('nodestatus_id') - {{ $message }} - @enderror - - Add a NEW Echoarea. This echoarea is used to send node status messages. -
+ @php + $helper = (! $o->nodestatus_id) + ? sprintf('Add a NEW Echoarea. This echoarea is used to send node status messages.',url('echoarea/addedit')) + : sprintf('Edit Echoarea',url('echoarea/addedit',[$o->nodestatus_id])); + @endphp + @endif
@@ -195,21 +185,10 @@
@endsection -@section('page-css') - @css('simplemde') - @css('select2') -@append +@pa(simplemde) + @section('page-scripts') - @js('simplemde') - @js('select2') - - @can('admin',$o) - - @endcan + @append \ No newline at end of file diff --git a/resources/views/system/widget/form-address.blade.php b/resources/views/system/widget/form-address.blade.php index 55ae08f..4dd8805 100644 --- a/resources/views/system/widget/form-address.blade.php +++ b/resources/views/system/widget/form-address.blade.php @@ -1,6 +1,6 @@ @use(App\Models\Zone) -
+ @csrf @@ -10,7 +10,7 @@
- +
diff --git a/resources/views/user/link.blade.php b/resources/views/user/link.blade.php index 8604131..36669f0 100644 --- a/resources/views/user/link.blade.php +++ b/resources/views/user/link.blade.php @@ -1,14 +1,14 @@ +@use(App\Models\Address) + @extends('layouts.app') @section('htmlheader_title') Link @endsection @section('content') - + @csrf - -
@@ -18,29 +18,16 @@
- -
- - - - @error('system_id') - {{ $message }} - @else - BBS Name is required. - @enderror - -
+ @php + $options = Address::select(['addresses.id','addresses.host_id','addresses.node_id','addresses.point_id','addresses.zone_id','systems.name']) + ->active() + ->join('systems',['systems.id'=>'addresses.system_id']) + ->whereRaw('systems.id NOT IN (SELECT system_id FROM "system_user")') + ->with(['system','zone']) + ->orderBy('systems.name') + ->cursor() + @endphp +
@@ -72,18 +59,4 @@
-@endsection - -@section('page-css') - @css('select2') -@append -@section('page-scripts') - @js('select2') - @endsection \ No newline at end of file diff --git a/resources/views/user/system/register.blade.php b/resources/views/user/system/register.blade.php index c986578..18331a5 100644 --- a/resources/views/user/system/register.blade.php +++ b/resources/views/user/system/register.blade.php @@ -7,7 +7,7 @@ @endsection @section('content') -
+ @csrf @@ -26,7 +26,7 @@ ->whereRaw('id NOT IN (SELECT system_id FROM "system_user")') ->cursor()) - +
diff --git a/resources/views/zone/addedit.blade.php b/resources/views/zone/addedit.blade.php index fcadccb..5aeb7dc 100644 --- a/resources/views/zone/addedit.blade.php +++ b/resources/views/zone/addedit.blade.php @@ -1,3 +1,7 @@ + +@use(App\Models\Domain) +@use(App\Models\System) + @extends('layouts.app') @section('htmlheader_title') @@ -30,24 +34,12 @@
- -
- - - - @error('domain_id') - {{ $message }} - @else - A domain is required. - @enderror - - Add a NEW Domain -
+ @php + $helper = (! $o->domain_id) + ? sprintf('Add a NEW Domain',url('domain/addedit')) + : sprintf('Edit Domain',url('domain/addedit',[$o->domain_id])); + @endphp +
@@ -84,24 +76,12 @@
- -
- - - - @error('system_id') - {{ $message }} - @else - A system is required. - @enderror - - Add a NEW System. This system is the primary mailer/tosser responsible for managing the zone. -
+ @php + $helper = (! $o->system_id) + ? sprintf('Add a NEW System',url('domain/addedit')) + : sprintf('Edit System',url('domain/addedit',[$o->system_id])); + @endphp +
@@ -175,17 +155,4 @@
-@endsection - -@section('page-css') - @css('select2') -@append -@section('page-scripts') - @js('select2') - - -@append \ No newline at end of file +@endsection \ No newline at end of file