172 lines
9.9 KiB
PHP
172 lines
9.9 KiB
PHP
@include('components.theme.pages.header')
|
|
|
|
<section>
|
|
<!-- basic table -->
|
|
{{ Form::open(['route' => 'sites.store']) }}
|
|
@csrf
|
|
<div class="row">
|
|
<div class="col-8">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h6 class="card-title">Formulir Website</h6>
|
|
<div class="card-toolbar">
|
|
<i class="ki-duotone ki-information-2 fs-2" data-bs-toggle="tooltip" data-bs-placement="top" title="Tolong dilengkapi data informasi dengan valid">
|
|
<span class="path1"></span>
|
|
<span class="path2"></span>
|
|
<span class="path3"></span>
|
|
</i>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row mb-4">
|
|
<div class="col">
|
|
<label class="form-label">URL<sup class="text-danger">*</sup></label>
|
|
<input type="text" name="url" value="{{ old('url') }}" autocomplete="off" class="form-control form-control-solid mt-2 {{ $errors->has('url') ? 'is-invalid' : '' }}" placeholder="Masukkan URL Website">
|
|
@error('url') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="col">
|
|
<label class="form-label">Batas Kata<sup class="text-danger">*</sup></label>
|
|
<input type="number" name="is_word_limit" min="10" value="{{ old('is_word_limit') }}" autocomplete="off" class="form-control form-control-solid mt-2 {{ $errors->has('is_word_limit') ? 'is-invalid' : '' }}" placeholder="Jumlah Batas Kata">
|
|
@error('is_word_limit') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group mb-4">
|
|
<label class="form-label mb-4">Deskripsi<sup class="text-danger">*</sup></label>
|
|
<textarea name="description" id="description" class="form-control form-control-solid mt-2 {{ $errors->has('description') ? 'is-invalid' : '' }}">{{ old('description') }}</textarea>
|
|
@error('description') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="row mb-4">
|
|
<div class="col-12 mb-4">
|
|
<label class="form-label">Niche<sup class="text-danger">*</sup></label>
|
|
<select name="is_url_category[]" multiple="multiple" class="form-select form-select-solid input-category mt-2 {{ $errors->has('is_url_category') ? 'is-invalid' : '' }}">
|
|
@foreach ($getNicheCategory as $nicheCategory)
|
|
<option value="{{ $nicheCategory->name }}">{{ $nicheCategory->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
@error('is_url_category') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="col">
|
|
<label class="form-label">Tipe<sup class="text-danger">*</sup></label>
|
|
<select name="is_type" class="form-select form-select-solid mt-2 {{ $errors->has('is_type') ? 'is-invalid' : '' }}">
|
|
@foreach ([1,2] as $type)
|
|
@php $name = $type == 1 ? 'Do Follow' : 'No Follow' @endphp
|
|
<option value="{{ $type }}">{{ $name }}</option>
|
|
@endforeach
|
|
</select>
|
|
@error('is_type') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="col">
|
|
<label class="form-label">Status Kepemilikan<sup class="text-danger">*</sup></label>
|
|
<select name="is_role" class="form-select form-select-solid mt-2 {{ $errors->has('is_role') ? 'is-invalid' : '' }}">
|
|
@foreach ([1,2] as $hasOwned)
|
|
@php $name = $hasOwned == 1 ? 'Pemilik' : 'Penulis' @endphp
|
|
<option value="{{ $hasOwned }}">{{ $name }}</option>
|
|
@endforeach
|
|
</select>
|
|
@error('is_role') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
</div>
|
|
<div class="form-group mb-0">
|
|
<button type="submit" class="btn btn-primary">Tambah</button>
|
|
<a href="{{ route('sites') }}" class="btn btn-light btn-light">Kembali</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-4">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h6 class="card-title">Tambahan</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="form-group mb-4">
|
|
<label class="form-label mb-4">Bahasa</label>
|
|
<select class="form-control form-select form-select-solid {{ $errors->has('is_language') ? 'is-invalid' : '' }}" name="is_language">
|
|
<option value="">Pilih salah satu</option>
|
|
@foreach ([1,2] as $language)
|
|
@php $name = $language == 1 ? 'Indonesia' : 'English' @endphp
|
|
<option value="{{ $name }}">{{ $name }}</option>
|
|
@endforeach
|
|
</select>
|
|
@error('is_language') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="form-group mb-4">
|
|
<label class="form-label mb-4">Harga</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text" id="basic-addon1">Rp. </span>
|
|
<input type="number" class="form-control {{ $errors->has('is_post_price') ? 'is-invalid' : '' }}" name="is_post_price" value="{{ old('is_post_price') }}" min="0" placeholder="0"/>
|
|
</div>
|
|
@error('is_post_price') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="form-group mb-4">
|
|
<label class="form-label mb-4">Contoh Post</label>
|
|
<input type="url" class="form-control {{ $errors->has('is_post_sample') ? 'is-invalid' : '' }}" name="is_post_sample" value="{{ old('is_post_sample') }}" placeholder="https://www.com"/>
|
|
@error('is_post_sample') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="form-group mb-4">
|
|
<label class="form-label mb-4">Estimasi Pengerjaan</label>
|
|
<div class="input-group">
|
|
<input type="number" class="form-control {{ $errors->has('is_delivery_time') ? 'is-invalid' : '' }}" name="is_delivery_time" value="{{ old('is_delivery_time') }}" min="0" placeholder="0"/>
|
|
<span class="input-group-text" id="basic-addon2">hari</span>
|
|
</div>
|
|
@error('is_delivery_time') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="form-check form-check-custom form-check-solid mb-4">
|
|
<input class="form-check-input checkbox" type="checkbox" value="1" name="is_content_included" id="flexCheckDefault"/>
|
|
<label class="form-check-label" for="flexCheckDefault">
|
|
Konsumen dapat request custom konten
|
|
</label>
|
|
</div>
|
|
<div class="form-group form-custom-content d-none mb-4">
|
|
<label class="form-label mb-4">Harga Konten</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text" id="basic-addon1">Rp. </span>
|
|
<input type="number" class="form-control" name="is_content_price" value="0" min="0" placeholder="0"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ Form::close() }}
|
|
</section>
|
|
|
|
@push('scripts')
|
|
<script src="https://preview.keenthemes.com/html/metronic/docs/assets/plugins/custom/ckeditor/ckeditor-classic.bundle.js"></script>
|
|
<script>
|
|
$(document).ready(function () {
|
|
$('.input-category').select2({
|
|
placeholder: 'Pilih salah satu',
|
|
dropdownParent: $('.input-category').parent()
|
|
});
|
|
|
|
$(".checkbox").change(function() {
|
|
if(this.checked) {
|
|
$('.form-custom-content').removeClass('d-none');
|
|
} else {
|
|
$('.form-custom-content').addClass('d-none');
|
|
}
|
|
});
|
|
});
|
|
|
|
ClassicEditor
|
|
.create(document.querySelector('#description'), {
|
|
toolbar: {
|
|
alignment: {
|
|
options: ['left','right']
|
|
},
|
|
items: [
|
|
'undo', 'redo',
|
|
'|', 'heading',
|
|
'|', 'bold', 'italic', 'underline', 'strikethrough',
|
|
'|', 'link', 'insertTable',
|
|
'|', 'bulletedList', 'numberedList', 'outdent', 'indent',
|
|
'|', 'alignment','blockQuote',
|
|
'|', 'horizontalLine',
|
|
]
|
|
}
|
|
});
|
|
</script>
|
|
@endpush
|
|
@include('components.theme.pages.footer') |