140 lines
5.6 KiB
PHP
140 lines
5.6 KiB
PHP
|
@extends('layouts.app')
|
||
|
|
||
|
@section('htmlheader_title')
|
||
|
@if($o->exists) Update @else Add @endif System
|
||
|
@endsection
|
||
|
|
||
|
@section('content')
|
||
|
<form class="row g-0 needs-validation" method="post" novalidate>
|
||
|
@csrf
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-12">
|
||
|
<div class="greyframe titledbox shadow0xb0">
|
||
|
<h2 class="cap">@if($o->exists) Update @else Add @endif System</h2>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-4">
|
||
|
<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 @cannot('admin',$o)disabled @endcannot autofocus>
|
||
|
@error('name')
|
||
|
<span class="invalid-feedback" role="alert">
|
||
|
{{ $message }}
|
||
|
</span>
|
||
|
@else
|
||
|
<span class="invalid-feedback">
|
||
|
A name is required.
|
||
|
</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<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>
|
||
|
|
||
|
<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>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-4">
|
||
|
<label for="sysop" class="form-label">Sysop</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('sysop') is-invalid @enderror" id="sysop" placeholder="Sysop" name="sysop" value="{{ old('sysop',$o->sysop) }}" required @cannot('admin',$o)disabled @endcannot autocomplete="name">
|
||
|
@error('sysop')
|
||
|
<span class="invalid-feedback" role="alert">
|
||
|
{{ $message }}
|
||
|
</span>
|
||
|
@else
|
||
|
<span class="invalid-feedback">
|
||
|
A Sysop's name is required.
|
||
|
</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="col-8">
|
||
|
<label for="location" class="form-label">Location</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('location') is-invalid @enderror" id="location" placeholder="Location" name="location" value="{{ old('location',$o->location) }}" required @cannot('admin',$o)disabled @endcannot>
|
||
|
@error('location')
|
||
|
<span class="invalid-feedback" role="alert">
|
||
|
{{ $message }}
|
||
|
</span>
|
||
|
@else
|
||
|
<span class="invalid-feedback">
|
||
|
System location is required.
|
||
|
</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-4">
|
||
|
<label for="method" class="form-label">Connection Method</label>
|
||
|
<div class="input-group">
|
||
|
<span class="input-group-text"><i class="bi bi-wifi"></i></span>
|
||
|
<select class="form-select @error('method') is-invalid @enderror" id="method" name="method" @cannot('admin',$o)disabled @endcannot>
|
||
|
<option></option>
|
||
|
<option value="23" @if(old('method',$o->method) == 23)selected @endif)}}>Telnet</option>
|
||
|
<option value="22" @if(old('method',$o->method) == 22)selected @endif)}}>SSH</option>
|
||
|
<option value="519" @if(old('method',$o->method) == 519)selected @endif)}}>Rlogin</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="col-8">
|
||
|
<label for="address" class="form-label">Address</label>
|
||
|
<div class="input-group">
|
||
|
<span class="input-group-text"><i class="bi bi-globe"></i></span>
|
||
|
<input type="text" class="form-control @error('address') is-invalid @enderror" id="address" placeholder="FQDN" name="address" value="{{ old('address',$o->address) }}" @cannot('admin',$o)disabled @endcannot>
|
||
|
<span class="m-0 p-0 input-group-text" style="background-color: #ffffff;">
|
||
|
<input type="text" class="form-control @error('port') is-invalid @enderror" id="port" placeholder="port" name="port" value="{{ old('port',$o->port) }}" @cannot('admin',$o)disabled @endcannot>
|
||
|
</span>
|
||
|
@error('address')
|
||
|
<span class="invalid-feedback" role="alert">
|
||
|
{{ $message }}
|
||
|
</span>
|
||
|
@enderror
|
||
|
@error('port')
|
||
|
<span class="invalid-feedback" role="alert">
|
||
|
{{ $message }}
|
||
|
</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<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>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-12">
|
||
|
<a href="{{ url('ftn/system') }}" 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
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
@endsection
|