Update source into github
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
@extends("admin.main")
|
||||
@section("content")
|
||||
@if(auth()->guard('admins')->user()->can("add package module"))
|
||||
<div class="card card-outline card-primary">
|
||||
<form action="{{ route('package.group.update',['id' => $group->id]) }}" method="post">
|
||||
@csrf
|
||||
@method('put')
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{--Name--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="name" class="col-md-3 text-right">Group Name</label>
|
||||
<div class="col-md-9 p-1 bg-customer">
|
||||
<input type="text" id="name" name="name" placeholder="" value="{{$group->name}}" 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">
|
||||
<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>
|
||||
|
||||
<x-module.v-center :model="$group->host->datacenter" />
|
||||
<x-module.datacenter :model="$group->host" />
|
||||
<x-module.host :model="$group" />
|
||||
{{--Status--}}
|
||||
<div class="row form-group align-items-center mb-0">
|
||||
<label for="status" class="col-md-3 text-right">Status</label>
|
||||
<div class="col-md-9 bg-customer">
|
||||
<select class="custom-select" id="status" name="status">
|
||||
<option value="1" @selected($group->status === 1)>Active</option>
|
||||
<option value="0" @selected($group->status === 0)>No Active</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</form>
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Module Package
|
||||
management department</h5>
|
||||
</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
|
||||
Reference in New Issue
Block a user