update
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
@section('content')
|
||||
@if (auth()->guard('admins')->user()->can('add package module'))
|
||||
<div class="card card-outline card-primary">
|
||||
<div class="card-header">
|
||||
Edit OS Group
|
||||
</div>
|
||||
<form action="{{ route('package.group.update', ['id' => $group->id]) }}" method="post">
|
||||
@csrf
|
||||
@method('put')
|
||||
@@ -36,24 +39,9 @@
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{-- Thumbnail --}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="thumbnail" class="col-md-3 text-right">Thumbnail</label>
|
||||
<div class="col-md-9 p-1">
|
||||
<div class="row">
|
||||
<div class="col-md-8 bg-customer">
|
||||
<input type="text" data-choise="upload-images" name="thumbnail"
|
||||
value="{{ $group->thumbnail ?? old('thumbnail') }}" class="form-control"
|
||||
placeholder="Chọn File">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-outline-secondary btn-open-thumb">
|
||||
<i class="fas fa-folder-open"></i> Chọn hình ảnh
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Thumbnail using component --}}
|
||||
<x-image-picker name="thumbnail" label="Thumbnail" :value="$group->thumbnail" />
|
||||
|
||||
<x-module.v-center :model="$group->host->datacenter" />
|
||||
<x-module.datacenter :model="$group->host" />
|
||||
@@ -74,10 +62,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{{ route('package.group.index') }}" class="btn btn-outline-secondary">Trở về</a>
|
||||
<button type="submit" class="btn btn-outline-primary">Lưu dữ liệu</button>
|
||||
</div>
|
||||
<x-fixed-action-bar>
|
||||
<x-button-crm type="button" variant="secondary" size="sm" icon="arrow-left"
|
||||
route="package.group.index">Cancel</x-button-crm>
|
||||
<x-button-crm type="submit" variant="primary" size="sm" icon="save">Update
|
||||
OS Group</x-button-crm>
|
||||
</x-fixed-action-bar>
|
||||
</form>
|
||||
</div>
|
||||
@else
|
||||
@@ -87,27 +77,10 @@
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$('.btn-open-thumb').click(function () {
|
||||
CKFinder.popup({
|
||||
chooseFiles: true,
|
||||
onInit: function (finder) {
|
||||
finder.on('files:choose', function (evt) {
|
||||
let img = $('input[name="thumbnail"]');
|
||||
if (img.length) {
|
||||
img.val(evt.data.files.first().getUrl())
|
||||
img.trigger('input')
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@push('plugin-scripts')
|
||||
@foreach (config('assets.datatable.js') as $datatable)
|
||||
<script src="{{ asset($datatable) }}"></script>
|
||||
@endforeach
|
||||
<script src="{{ asset('lib/ckfinder/ckfinder.js') }}"></script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user