clrghouz/resources/views/system/widget/form-session.blade.php

117 lines
4.2 KiB
PHP
Raw Normal View History

<!-- $o = System::class -->
@use(App\Models\Zone)
@if(($zones=Zone::select(['id','domain_id','zone_id'])
->active()
->whereIn('id',$o->addresses->pluck('zone.id'))
->whereNotIn('id',$o->sessions->pluck('id'))
->with(['domain'])
->get())->count())
2024-12-06 00:16:38 +00:00
<form class="needs-validation" method="post" action="{{ url('system/session/add',$o->id) }}" autocomplete="off" novalidate>
@csrf
<div class="row pt-0">
<div class="col-12">
<div class="greyframe titledbox shadow0xb0">
<h2 class="cap">Setup Session Details</h2>
<div class="row">
<!-- Select Zone -->
<div class="col-3">
<x-form.select id="szone_id" name="zone_id" icon="bi-hash" label="Zone" feedback="Our address required" value="x" :options="$zones->map(fn($item)=>['id'=>$item->id,'value'=>sprintf('%s (%s)',$item->zone_id,$item->domain->name)])" required/>
</div>
<div class="col-9">
<div class="row pt-0">
<!-- Session -->
<div class="col-6">
<label for="sespass" class="form-label">Session Password</label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-lock"></i></span>
<input type="text" style="width: 35%;" class="form-control @error('sespass') is-invalid @enderror" id="sespass" placeholder="Session" name="sespass" value="{{ old('sespass') }}" required>
<span class="invalid-feedback" role="alert">
@error('sespass')
{{ $message }}
@else
Session Password required.
@enderror
</span>
</div>
</div>
<!-- Packet -->
<div class="col-5">
<label for="pktpass" class="form-label">Packet Password</label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-box"></i></span>
<input type="text" style="width: 35%;" class="form-control @error('pktpass') is-invalid @enderror" id="pktpass" placeholder="Packet" name="pktpass" value="{{ old('pktpass') }}" required>
<span class="invalid-feedback" role="alert">
@error('pktpass')
{{ $message }}
2023-10-04 05:05:46 +00:00
@else
Packet password required.
@enderror
</span>
</div>
</div>
</div>
<div class="row">
<!-- Areafix -->
<div class="col-6">
<label for="fixpass" class="form-label">Areafix Password</label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-card-text"></i></span>
<input type="text" style="width: 35%;" class="form-control @error('fixpass') is-invalid @enderror" id="fixpass" placeholder="Areafix" name="fixpass" value="{{ old('fixpass') }}" required>
<span class="invalid-feedback" role="alert">
@error('fixpass')
{{ $message }}
@else
Areafix password required.
@enderror
</span>
</div>
</div>
<!-- TIC -->
<div class="col-5">
<label for="ticpass" class="form-label">TIC Password</label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-archive"></i></span>
<input type="text" style="width: 35%;" class="form-control @error('ticpass') is-invalid @enderror" id="ticpass" placeholder="TIC" name="ticpass" value="{{ old('ticpass') }}" required>
<span class="invalid-feedback" role="alert">
@error('ticpass')
{{ $message }}
2023-10-04 05:05:46 +00:00
@else
TIC password required.
@enderror
</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<a href="{{ url('system') }}" class="btn btn-danger">Cancel</a>
</div>
<span class="col-6 mt-auto mx-auto text-center align-bottom">
@if($errors->count())
<span class="btn btn-sm btn-danger" role="alert">
There were errors with the submission.
</span>
@endif
</span>
<div class="col-2">
<button type="submit" name="submit" class="btn btn-success float-end">Add</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
@endif