2024-11-04 13:28:34 +00:00
|
|
|
@use(App\Models\Echoarea)
|
2024-05-29 09:13:28 +00:00
|
|
|
<!-- $o=Domain::class -->
|
2024-11-04 13:28:34 +00:00
|
|
|
|
2021-05-13 12:40:21 +00:00
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
@section('htmlheader_title')
|
|
|
|
@if($o->exists) Update @else Add @endif Domain
|
|
|
|
@endsection
|
|
|
|
|
2021-06-14 05:46:18 +00:00
|
|
|
@section('content')
|
2024-04-22 04:27:48 +00:00
|
|
|
<form class="needs-validation" method="post" novalidate>
|
2021-06-14 11:33:18 +00:00
|
|
|
@csrf
|
2021-06-14 05:46:18 +00:00
|
|
|
|
2021-06-14 11:33:18 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="greyframe titledbox shadow0xb0">
|
|
|
|
<h2 class="cap">@if($o->exists) Update @else Add @endif Domain</h2>
|
2021-06-14 05:46:18 +00:00
|
|
|
|
|
|
|
<div class="row">
|
2021-06-14 11:33:18 +00:00
|
|
|
<div class="col-4">
|
2021-06-14 05:46:18 +00:00
|
|
|
<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>
|
2024-04-26 06:18:40 +00:00
|
|
|
<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 autocomplete="off">
|
2021-06-18 15:09:34 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('name')
|
2021-06-14 05:46:18 +00:00
|
|
|
{{ $message }}
|
2021-06-18 15:09:34 +00:00
|
|
|
@else
|
2021-06-14 05:46:18 +00:00
|
|
|
A name is required.
|
2021-06-18 15:09:34 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-06-14 05:46:18 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
2021-06-14 11:33:18 +00:00
|
|
|
|
2023-09-10 12:48:12 +00:00
|
|
|
<div class="col-2">
|
2024-04-26 06:18:40 +00:00
|
|
|
<label class="form-label">Active</label>
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="input-group">
|
2021-06-14 11:33:18 +00:00
|
|
|
<div class="btn-group" role="group">
|
2021-06-18 13:01:41 +00:00
|
|
|
<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>
|
2021-06-14 11:33:18 +00:00
|
|
|
<label class="btn btn-outline-success" for="active_yes">Yes</label>
|
|
|
|
|
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>
|
2021-06-14 11:33:18 +00:00
|
|
|
<label class="btn btn-outline-danger" for="active_no">No</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-10 12:48:12 +00:00
|
|
|
|
|
|
|
<div class="col-2">
|
2024-05-29 08:59:44 +00:00
|
|
|
@if ($o->zones?->count() > 1)
|
2024-04-26 06:18:40 +00:00
|
|
|
<label class="form-label">Flatten Zones <i class="bi bi-info-circle" title="Treat this domain as a 2D domain"></i></label>
|
2023-09-10 12:48:12 +00:00
|
|
|
<div class="input-group">
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<input type="radio" class="btn-check" name="flatten" id="flatten_yes" value="1" required @if(old('flatten',$o->flatten))checked @endif>
|
|
|
|
<label class="btn btn-outline-warning" for="flatten_yes">Yes</label>
|
|
|
|
|
|
|
|
<input type="radio" class="btn-check btn-danger" name="flatten" id="flatten_no" value="0" required @if(! old('flatten',$o->flatten))checked @endif>
|
|
|
|
<label class="btn btn-outline-success" for="flatten_no">No</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2022-11-04 06:20:22 +00:00
|
|
|
|
|
|
|
<div class="col-4">
|
2024-05-29 09:13:28 +00:00
|
|
|
@if ($o->isManaged())
|
2022-11-25 10:44:03 +00:00
|
|
|
@if ($o->nodelist_filename)
|
2024-05-25 10:03:23 +00:00
|
|
|
<label for="nodelist_filename" class="form-label">Nodelist File</label>
|
2022-11-25 10:44:03 +00:00
|
|
|
<div class="input-group">
|
2024-05-25 12:25:57 +00:00
|
|
|
<span class="input-group-text"><i class="bi bi-file-earmark-break-fill"></i></span>
|
2022-11-25 10:44:03 +00:00
|
|
|
<input type="text" class="form-control" id="nodelist_filename" placeholder="Nodelist" name="nodelist_filename" value="{{ $o->nodelist_filename }}" readonly>
|
|
|
|
</div>
|
|
|
|
@else
|
2024-05-25 10:03:23 +00:00
|
|
|
No Nodelist file
|
2022-11-25 10:44:03 +00:00
|
|
|
@endif
|
2022-11-04 06:20:22 +00:00
|
|
|
@else
|
2022-11-25 10:44:03 +00:00
|
|
|
This domain is not configured here.
|
2022-11-04 06:20:22 +00:00
|
|
|
@endif
|
|
|
|
</div>
|
2021-06-14 05:46:18 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-14 05:46:18 +00:00
|
|
|
<div class="row">
|
2021-06-14 11:33:18 +00:00
|
|
|
<div class="col-4">
|
2021-06-17 14:08:30 +00:00
|
|
|
<label for="dnsdomain" class="form-label">DNS Domain</label>
|
2021-06-14 05:46:18 +00:00
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-globe"></i></span>
|
2021-06-18 13:01:41 +00:00
|
|
|
<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')
|
2021-06-14 05:46:18 +00:00
|
|
|
{{ $message }}
|
2021-06-18 13:01:41 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-06-14 05:46:18 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
|
2024-04-26 06:18:40 +00:00
|
|
|
<div class="col-2">
|
|
|
|
<label class="form-label">Public</label>
|
2021-06-18 13:01:41 +00:00
|
|
|
<div class="input-group">
|
2021-06-14 05:46:18 +00:00
|
|
|
<div class="btn-group" role="group">
|
2021-06-18 13:01:41 +00:00
|
|
|
<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>
|
2021-06-14 11:33:18 +00:00
|
|
|
<label class="btn btn-outline-success" for="public_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="public" id="public_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('public',$o->public))checked @endif>
|
2021-06-14 11:33:18 +00:00
|
|
|
<label class="btn btn-outline-danger" for="public_no">No</label>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-04 06:20:22 +00:00
|
|
|
|
2024-04-26 06:18:40 +00:00
|
|
|
<div class="col-2">
|
2024-11-04 13:28:34 +00:00
|
|
|
@if ($o->isManaged())
|
|
|
|
<label class="form-label">Applications</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="btn-group" role="group">
|
|
|
|
<input type="radio" class="btn-check" name="accept_app" id="accept_app_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('accept_app',$o->accept_app))checked @endif>
|
|
|
|
<label class="btn btn-outline-success" for="accept_app_yes">Yes</label>
|
2024-04-26 06:18:40 +00:00
|
|
|
|
2024-11-04 13:28:34 +00:00
|
|
|
<input type="radio" class="btn-check btn-danger" name="accept_app" id="accept_app_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('accept_app',$o->accept_app))checked @endif>
|
|
|
|
<label class="btn btn-outline-danger" for="accept_app_no">No</label>
|
|
|
|
</div>
|
2024-04-26 06:18:40 +00:00
|
|
|
</div>
|
2024-11-04 13:28:34 +00:00
|
|
|
@endif
|
2024-04-26 06:18:40 +00:00
|
|
|
</div>
|
|
|
|
|
2022-11-04 06:20:22 +00:00
|
|
|
@if ($o->nodelist_filename)
|
|
|
|
<div class="col-4">
|
2024-05-25 12:25:57 +00:00
|
|
|
<label for="nodelist" class="form-label">Nodelist File Area</label>
|
2023-10-05 11:49:57 +00:00
|
|
|
<a href="{{ url('filearea/addedit',$o->nodelist_filearea_id) }}">
|
2022-11-04 06:20:22 +00:00
|
|
|
<div class="input-group">
|
2024-05-25 12:25:57 +00:00
|
|
|
<span class="input-group-text"><i class="bi bi-collection-fill"></i></span>
|
2022-11-04 06:20:22 +00:00
|
|
|
<input type="text" class="form-control @error('nodelist') is-invalid @enderror" id="nodelist" placeholder="Nodelist" name="nodelist" value="{{ $o->nodelist_filearea->name }}" readonly>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
@endif
|
2021-06-14 05:46:18 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2024-05-25 12:25:57 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-8">
|
|
|
|
</div>
|
|
|
|
<div class="col-4">
|
2024-11-04 13:28:34 +00:00
|
|
|
@if ($o->isManaged())
|
|
|
|
<label for="nodestatus_id" class="form-label">Echoarea Node Status</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-journal-text"></i></span>
|
|
|
|
<select style="width: 80%;" class="form-select @error('nodestatus_id') is-invalid @enderror" id="nodestatus_id" name="nodestatus_id" @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<option value=""> </option>
|
|
|
|
@foreach (Echoarea::active()->where('domain_id',$o->id)->orderBy('description')->cursor() as $oo)
|
|
|
|
<option value="{{ $oo->id }}" @if(old('nodestatus_id',$o->nodestatus_id)==$oo->id)selected @endif>{{ $oo->description }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('nodestatus_id')
|
|
|
|
{{ $message }}
|
|
|
|
@enderror
|
|
|
|
</span>
|
|
|
|
<span class="input-helper">Add a <a href="{{ url('echoarea/addedit') }}">NEW Echoarea</a>. This echoarea is used to send node status messages.</span>
|
|
|
|
</div>
|
|
|
|
@endif
|
2024-05-25 12:25:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-06-14 05:46:18 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<label for="notes" class="form-label">Notes</label>
|
2024-04-26 06:18:40 +00:00
|
|
|
<textarea class="form-control" rows=3 id="notes" 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-14 05:46:18 +00:00
|
|
|
</div>
|
2021-06-14 11:33:18 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="greyframe titledbox shadow0xb0">
|
|
|
|
<h2 class="cap">Home Page</h2>
|
2021-05-13 12:40:21 +00:00
|
|
|
|
2021-06-14 05:46:18 +00:00
|
|
|
<div class="row">
|
2021-06-18 15:09:34 +00:00
|
|
|
<div class="col-12">
|
2021-06-14 11:33:18 +00:00
|
|
|
<label for="homepage" class="form-label">Home Page Text</label>
|
|
|
|
<div style="background-color: #fff;color: #000;">
|
2021-06-18 13:01:41 +00:00
|
|
|
<textarea class="form-control" rows=5 id="homepage" name="homepage" placeholder="Home Page..." @cannot('admin',$o)disabled @endcannot>{{ old('homepage',$o->homepage) }}</textarea>
|
2021-06-14 11:33:18 +00:00
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-14 11:33:18 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2023-10-05 11:42:41 +00:00
|
|
|
<a href="{{ url('domain') }}" 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-06-14 11:33:18 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-13 12:40:21 +00:00
|
|
|
</div>
|
2021-06-14 05:46:18 +00:00
|
|
|
</div>
|
2021-06-14 11:33:18 +00:00
|
|
|
</form>
|
2021-05-13 12:40:21 +00:00
|
|
|
@endsection
|
2021-06-14 11:33:18 +00:00
|
|
|
|
2021-11-13 06:00:08 +00:00
|
|
|
@section('page-css')
|
|
|
|
@css('simplemde')
|
2024-05-25 12:25:57 +00:00
|
|
|
@css('select2')
|
2021-11-13 06:00:08 +00:00
|
|
|
@append
|
2021-06-14 11:33:18 +00:00
|
|
|
@section('page-scripts')
|
2021-11-13 06:00:08 +00:00
|
|
|
@js('simplemde')
|
2024-05-25 12:25:57 +00:00
|
|
|
@js('select2')
|
2021-06-14 11:33:18 +00:00
|
|
|
|
2021-11-13 06:00:08 +00:00
|
|
|
@can('admin',$o)
|
2021-06-24 10:16:37 +00:00
|
|
|
<script type="text/javascript">
|
2021-06-18 13:01:41 +00:00
|
|
|
var simplemde = new SimpleMDE({ element: $("#homepage")[0] });
|
2024-05-25 12:25:57 +00:00
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#nodestatus_id').select2();
|
|
|
|
});
|
2021-06-18 13:01:41 +00:00
|
|
|
</script>
|
|
|
|
@endcan
|
2021-06-14 11:33:18 +00:00
|
|
|
@append
|