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>
|
|
|
|
@error('zone_id')
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
{{ $message }}
|
|
|
|
</span>
|
|
|
|
@else
|
|
|
|
<span class="invalid-feedback">
|
|
|
|
A zone number is required.
|
|
|
|
</span>
|
|
|
|
@enderror
|
|
|
|
</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>
|
|
|
|
@foreach (\App\Models\Domain::active()->cursor() as $oo)
|
|
|
|
<option value="{{ $oo->id }}" @if(old('domain_id',$o->domain_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
@error('domain_id')
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
{{ $message }}
|
|
|
|
</span>
|
|
|
|
@else
|
|
|
|
<span class="invalid-feedback">
|
|
|
|
A domain is required.
|
|
|
|
</span>
|
|
|
|
@enderror
|
|
|
|
<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-06-18 13:01:41 +00:00
|
|
|
<div class="col-3">
|
|
|
|
<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 class="form-select @error('system_id') is-invalid @enderror" id="system" name="system_id" required @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<option value=""> </option>
|
|
|
|
@foreach (\App\Models\System::active()->cursor() as $oo)
|
|
|
|
<option value="{{ $oo->id }}" @if(old('system_id',$o->system_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
@error('system_id')
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
{{ $message }}
|
|
|
|
</span>
|
|
|
|
@else
|
|
|
|
<span class="invalid-feedback">
|
|
|
|
A system is required.
|
|
|
|
</span>
|
|
|
|
@enderror
|
|
|
|
<span class="input-helper">Add a <a href="{{ url('ftn/system/addedit') }}">NEW System</a>. This system is the primary mailer/tosser responsible for managing the zone.</span>
|
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="col-4">
|
|
|
|
<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>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<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>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
2021-06-18 13:01:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-3">
|
|
|
|
<label for="ztid" class="form-label">ZeroTier ID</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-shield-lock-fill"></i></span>
|
|
|
|
<input type="text" class="form-control @error('ztid') is-invalid @enderror" id="ztid" placeholder="ZeroTier" name="ztid" value="{{ old('ztid',$o->ztid) }}" @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('ztid')
|
|
|
|
{{ $message }}
|
|
|
|
@enderror
|
|
|
|
</span>
|
2021-05-13 12:40:21 +00:00
|
|
|
</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">
|
|
|
|
<a href="{{ url('ftn/zone') }}" class="btn btn-danger">Cancel</a>
|
|
|
|
@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
|
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
|