Added Zones, authorisation on edits, validation enhancements
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<label for="name" class="form-label">Name</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
||||
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name" placeholder="Name" name="name" value="{{ old('name',$o->name) }}" required autocomplete="name" autofocus>
|
||||
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name" placeholder="Name" name="name" value="{{ old('name',$o->name) }}" required @cannot('admin',$o)disabled @endcannot autofocus>
|
||||
@error('name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
{{ $message }}
|
||||
@@ -33,12 +33,12 @@
|
||||
|
||||
<div class="col-4">
|
||||
<label for="active" class="form-label">Active</label>
|
||||
<div class="input-group has-validation">
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="active" id="active_yes" value="1" required @if(old('active',$o->active))checked @endif>
|
||||
<input type="radio" class="btn-check" name="active" id="active_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('active',$o->active))checked @endif>
|
||||
<label class="btn btn-outline-success" for="active_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="active" id="active_no" value="0" required @if(! old('active',$o->active))checked @endif>
|
||||
<input type="radio" class="btn-check btn-danger" name="active" id="active_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('active',$o->active))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="active_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,23 +50,23 @@
|
||||
<label for="dnsdomain" class="form-label">DNS Domain</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-globe"></i></span>
|
||||
<input type="text" class="form-control @error('dnsdomain') is-invalid @enderror" id="dnsdomain" placeholder="DNS Domain (if applicable)" name="dnsdomain" value="{{ old('dnsdomain',$o->dnsdomain) }}">
|
||||
@error('dnsdomain')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<input type="text" class="form-control @error('dnsdomain') is-invalid @enderror" id="dnsdomain" placeholder="DNS Domain (if applicable)" name="dnsdomain" value="{{ old('dnsdomain',$o->dnsdomain) }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('dnsdomain')
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<label for="public" class="form-label">Public</label>
|
||||
<div class="input-group has-validation">
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="public" id="public_yes" value="1" required @if(old('public',$o->public))checked @endif>
|
||||
<input type="radio" class="btn-check" name="public" id="public_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('public',$o->public))checked @endif>
|
||||
<label class="btn btn-outline-success" for="public_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="public" id="public_no" value="0" required @if(! old('public',$o->public))checked @endif>
|
||||
<input type="radio" class="btn-check btn-danger" name="public" id="public_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('public',$o->public))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="public_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 cols=68 name="notes" placeholder="Notes...">{{ old('notes',$o->notes) }}</textarea>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,7 +92,7 @@
|
||||
<div class="col-12" >
|
||||
<label for="homepage" class="form-label">Home Page Text</label>
|
||||
<div style="background-color: #fff;color: #000;">
|
||||
<textarea class="form-control" rows=5 cols=68 id="homepage" name="homepage" placeholder="Home Page...">{{ old('homepage',$o->homepage) }}</textarea>
|
||||
<textarea class="form-control" rows=5 id="homepage" name="homepage" placeholder="Home Page..." @cannot('admin',$o)disabled @endcannot>{{ old('homepage',$o->homepage) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,7 +101,9 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ url('ftn/domain') }}" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
@can('admin',$o)
|
||||
<button type="submit" name="submit" class="btn btn-success mr-0 float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,10 +112,12 @@
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||
@can('admin',$o)
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||
|
||||
<script>
|
||||
var simplemde = new SimpleMDE({ element: $("#homepage")[0] });
|
||||
</script>
|
||||
<script>
|
||||
var simplemde = new SimpleMDE({ element: $("#homepage")[0] });
|
||||
</script>
|
||||
@endcan
|
||||
@append
|
@@ -7,7 +7,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>About FTN Domains</h2>
|
||||
<p>In FTN network addresses, a domain is the 5th dimension and used when a system supports 5D addressing, ie: zone:hub/host@<strong class="highlight">domain</strong>.</p>
|
||||
<p>In FTN network addresses, a domain is the 5th dimension and used when a system supports 5D addressing, ie: zone:hub/host.point@<strong class="highlight">domain</strong>.</p>
|
||||
<p>Domains are used with zones to uniquely identify a FTN network.</p>
|
||||
<p><small>Some legacy Fidonet software is not 5D aware and may behave unexpectedly when a domain is used</small></p>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@can('admin',(new \App\Models\Domain()))
|
||||
@can('admin',(new \App\Models\Domain))
|
||||
<tr>
|
||||
<td colspan="5"><a href="{{ url('ftn/domain/addedit') }}">Add New Domain</a></td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user