Complete implement of select2 component, and replaced existing use of select2. Also deprecated CustomBlade definitions of select2/simplemde
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<!-- $o=Filearea::class -->
|
||||
@use(App\Models\Domain)
|
||||
@use(App\Classes\FTN\Message)
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
@@ -18,24 +19,12 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<label for="domain" class="form-label">Domain</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
||||
<select class="form-select @error('domain_id') is-invalid @enderror" id="domain" name="domain_id" required @cannot('admin',$o)disabled @endcannot>
|
||||
<option value=""> </option>
|
||||
@foreach (Domain::active()->orderBy('name')->cursor() as $oo)
|
||||
<option value="{{ $oo->id }}" @if(old('domain_id',$o->domain_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('domain_id')
|
||||
{{ $message }}
|
||||
@else
|
||||
A domain is required.
|
||||
@enderror
|
||||
</span>
|
||||
<span class="input-helper">Add a <a href="{{ url('domain/addedit') }}">NEW Domain</a></span>
|
||||
</div>
|
||||
@php
|
||||
$helper = (! $o->domain_id)
|
||||
? sprintf('Add a <a href="%s">NEW Domain</a>',url('domain/addedit'))
|
||||
: NULL;
|
||||
@endphp
|
||||
<x-form.select name="domain_id" icon="bi-tag-fill" label="Domain" feedback="Domain is required" :helper="$helper" :value="$o->domain_id" :options="Domain::active()->orderBy('name')->cursor()->map(fn($item)=>['id'=>$item->id,'value'=>$item->name])" required/>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
@@ -157,6 +146,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- @todo Show exported systems and files waiting -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@if ($o->files->count())
|
||||
@@ -191,13 +182,9 @@
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('page-css')
|
||||
@css('datatables')
|
||||
@append
|
||||
@pa(datatables,conditionalpaging)
|
||||
|
||||
@section('page-scripts')
|
||||
@js('datatables')
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#files').DataTable({
|
||||
|
Reference in New Issue
Block a user