clrghouz/resources/views/domain/addedit.blade.php

83 lines
2.9 KiB
PHP

@extends('layouts.app')
@section('htmlheader_title')
@if($o->exists) Update @else Add @endif Domain
@endsection
@section('content')
<div class="row">
<div class="col-6 m-auto">
<div class="greyframe titledbox shadow0xb0 text-center">
<h2 class="cap">@if($o->exists) Update @else Add @endif Domain</h2>
<form class="row g-0 needs-validation" method="post" novalidate>
@csrf
<div class="row">
<div class="col-12">
<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>
@error('name')
<span class="invalid-feedback" role="alert">
{{ $message }}
</span>
@else
<span class="invalid-feedback">
A name is required.
</span>
@enderror
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<label for="name" 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">
{{ $message }}
</span>
@enderror
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<label for="active" class="form-label">Active</label>
<div class="input-group has-validation">
<div class="btn-group" role="group">
<input type="radio" class="btn-check" name="active" id="active_yes" value="1" required @if($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(! $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-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>
</div>
</div>
<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>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection