2021-05-13 12:40:21 +00:00
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
@section('htmlheader_title')
|
|
|
|
@if($o->exists) Update @else Add @endif Zone
|
|
|
|
@endsection
|
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
@section('content')
|
|
|
|
<form class="row g-0 needs-validation" method="post" novalidate>
|
|
|
|
@csrf
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="greyframe titledbox shadow0xb0">
|
|
|
|
<h2 class="cap">@if($o->exists) Update @else Add @endif Zone</h2>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-2">
|
|
|
|
<label for="zone" class="form-label">Zone</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
|
|
|
<input type="text" class="form-control @error('zone_id') is-invalid @enderror" id="zone" placeholder="Zone" name="zone_id" value="{{ old('zone_id',$o->zone_id) }}" required @cannot('admin',$o)disabled @endcannot autofocus>
|
2021-06-18 15:09:34 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('zone_id')
|
2021-06-18 13:01:41 +00:00
|
|
|
{{ $message }}
|
2021-06-18 15:09:34 +00:00
|
|
|
@else
|
2021-06-18 13:01:41 +00:00
|
|
|
A zone number is required.
|
2021-06-18 15:09:34 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-06-18 13:01:41 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="col-3">
|
|
|
|
<label for="domain" class="form-label">Domain</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
|
|
|
<select class="form-select @error('domain_id') is-invalid @enderror" id="domain" name="domain_id" required @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<option value=""> </option>
|
2021-08-15 06:13:51 +00:00
|
|
|
@foreach (\App\Models\Domain::active()->orderBy('name')->cursor() as $oo)
|
2021-06-18 13:01:41 +00:00
|
|
|
<option value="{{ $oo->id }}" @if(old('domain_id',$o->domain_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
2021-06-18 15:09:34 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('domain_id')
|
2021-06-18 13:01:41 +00:00
|
|
|
{{ $message }}
|
2021-06-18 15:09:34 +00:00
|
|
|
@else
|
2021-06-18 13:01:41 +00:00
|
|
|
A domain is required.
|
2021-06-18 15:09:34 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-06-18 13:01:41 +00:00
|
|
|
<span class="input-helper">Add a <a href="{{ url('ftn/domain/addedit') }}">NEW Domain</a></span>
|
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
|
2021-08-16 12:26:33 +00:00
|
|
|
<div class="offset-1 col-2">
|
2021-08-19 13:35:48 +00:00
|
|
|
<label for="active" class="form-label">Active</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<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 @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>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-2">
|
2021-08-16 12:26:33 +00:00
|
|
|
<label for="default" class="form-label">Default</label>
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="input-group has-validation">
|
2021-08-16 12:26:33 +00:00
|
|
|
<div class="btn-group @error('default') is-invalid @enderror" role="group">
|
|
|
|
<input type="radio" class="btn-check " name="default" id="default_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('default',$o->default))checked @endif>
|
|
|
|
<label class="btn btn-outline-success" for="default_yes">Yes</label>
|
|
|
|
|
|
|
|
<input type="radio" class="btn-check btn-danger" name="default" id="default_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('default',$o->default))checked @endif>
|
|
|
|
<label class="btn btn-outline-danger" for="default_no">No</label>
|
|
|
|
</div>
|
2021-06-18 15:09:34 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
2021-08-16 12:26:33 +00:00
|
|
|
@error('default')
|
2021-06-18 13:01:41 +00:00
|
|
|
{{ $message }}
|
2021-06-18 15:09:34 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-06-18 13:01:41 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
2021-06-18 13:01:41 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-08-16 12:26:33 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
<label for="system" class="form-label">System</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-laptop-fill"></i></span>
|
|
|
|
<select style="width: 80%;" class="form-select @error('system_id') is-invalid @enderror" id="system" name="system_id" required @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<option value=""> </option>
|
2022-01-01 14:52:21 +00:00
|
|
|
@foreach (\App\Models\System::active()->cursor() as $oo)
|
2021-08-16 12:26:33 +00:00
|
|
|
<option value="{{ $oo->id }}" @if(old('system_id',$o->system_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('system_id')
|
|
|
|
{{ $message }}
|
|
|
|
@else
|
|
|
|
A system is required.
|
|
|
|
@enderror
|
|
|
|
</span>
|
2023-10-05 11:15:53 +00:00
|
|
|
<span class="input-helper">Add a <a href="{{ url('system/addedit') }}">NEW System</a>. This system is the primary mailer/tosser responsible for managing the zone.</span>
|
2021-08-16 12:26:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="row">
|
2021-06-26 15:15:19 +00:00
|
|
|
<div class="col-3">
|
2021-06-24 12:28:06 +00:00
|
|
|
<label for="zt_id" class="form-label">ZeroTier Network ID</label>
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-shield-lock-fill"></i></span>
|
2021-06-24 12:28:06 +00:00
|
|
|
<input type="text" class="form-control @error('zt_id') is-invalid @enderror" id="zt_id" placeholder="ZeroTier" name="zt_id" value="{{ old('zt_id',$o->zt_id) }}" @cannot('admin',$o)disabled @endcannot>
|
2021-06-18 13:01:41 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
2021-06-24 12:28:06 +00:00
|
|
|
@error('zt_id')
|
2021-06-18 13:01:41 +00:00
|
|
|
{{ $message }}
|
|
|
|
@enderror
|
|
|
|
</span>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-24 12:28:06 +00:00
|
|
|
|
|
|
|
<div class="col-4">
|
|
|
|
<label for="zt_ipv4" class="form-label">ZeroTier IPv4 Network</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-share-fill"></i></span>
|
|
|
|
<input type="text" style="width: 55%;" class="form-control @error('zt_ipv4') is-invalid @enderror" id="zt_ipv4" placeholder="10.0.0.0" name="zt_ipv4" value="{{ old('zt_ipv4',$o->zt_ipv4) }}" @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<span class="input-group-text">/</span>
|
|
|
|
<input type="text" class="form-control @error('zt_ipv4_mask') is-invalid @enderror" id="zt_ipv4_mask" placeholder="24" name="zt_ipv4_mask" value="{{ old('zt_ipv4_mask',$o->zt_ipv4_mask) }}" @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('zt_ipv4')
|
|
|
|
{{ $message }}
|
|
|
|
@enderror
|
|
|
|
@error('zt_ipv4_mask')
|
|
|
|
{{ $message }}
|
|
|
|
@enderror
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-06-26 15:15:19 +00:00
|
|
|
<div class="col-5">
|
2021-06-24 12:28:06 +00:00
|
|
|
<label for="zt_ipv6" class="form-label">ZeroTier IPv6 Network</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-broadcast-pin"></i></span>
|
2021-06-26 15:15:19 +00:00
|
|
|
<input type="text" style="width: 60%;" class="form-control @error('zt_ipv6') is-invalid @enderror" id="zt_ipv6" placeholder="fd00:f1d0:0000:0000:0000:0000:0000:0000" name="zt_ipv6" value="{{ old('zt_ipv6',$o->zt_ipv6) }}" @cannot('admin',$o)disabled @endcannot>
|
2021-06-24 12:28:06 +00:00
|
|
|
<span class="input-group-text">/</span>
|
|
|
|
<input type="text" class="form-control @error('zt_ipv6_mask') is-invalid @enderror" id="zt_ipv6_mask" placeholder="112" name="zt_ipv6_mask" value="{{ old('zt_ipv6_mask',$o->zt_ipv6_mask) }}" @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('zt_ipv6')
|
2021-11-11 11:57:13 +00:00
|
|
|
{{ $message }}
|
2021-06-24 12:28:06 +00:00
|
|
|
@enderror
|
|
|
|
@error('zt_ipv6_mask')
|
2021-11-11 11:57:13 +00:00
|
|
|
{{ $message }}
|
2021-06-24 12:28:06 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-18 13:01:41 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<label for="notes" class="form-label">Notes</label>
|
|
|
|
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
2021-06-18 13:01:41 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2023-10-05 11:27:25 +00:00
|
|
|
<a href="{{ url('zone') }}" class="btn btn-danger">Cancel</a>
|
2021-06-18 13:01:41 +00:00
|
|
|
@can('admin',$o)
|
2021-07-24 04:12:10 +00:00
|
|
|
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
2021-06-18 13:01:41 +00:00
|
|
|
@endcan
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-18 13:01:41 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
2021-05-13 12:40:21 +00:00
|
|
|
@endsection
|
2021-08-15 06:13:51 +00:00
|
|
|
|
|
|
|
@section('page-css')
|
2021-11-13 06:00:08 +00:00
|
|
|
@css('select2')
|
2021-08-15 06:13:51 +00:00
|
|
|
@append
|
|
|
|
@section('page-scripts')
|
2021-11-13 06:00:08 +00:00
|
|
|
@js('select2')
|
2021-08-15 06:13:51 +00:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#system').select2();
|
|
|
|
});
|
|
|
|
</script>
|
2021-11-13 06:00:08 +00:00
|
|
|
@append
|