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

83 lines
2.9 KiB
PHP
Raw Normal View History

2021-05-13 12:40:21 +00:00
@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>
2021-05-13 12:40:21 +00:00
</div>
</div>
2021-05-13 12:40:21 +00:00
<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>
2021-05-13 12:40:21 +00:00
</div>
</div>
2021-05-13 12:40:21 +00:00
<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>
2021-05-13 12:40:21 +00:00
<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>
2021-05-13 12:40:21 +00:00
</div>
</div>
</div>
</div>
2021-05-13 12:40:21 +00:00
<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>
2021-05-13 12:40:21 +00:00
</div>
</div>
2021-05-13 12:40:21 +00:00
<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>
2021-05-13 12:40:21 +00:00
</div>
</div>
</form>
2021-05-13 12:40:21 +00:00
</div>
</div>
2021-05-13 12:40:21 +00:00
</div>
@endsection