File: /var/www/javago-portal-updates/resources/views/admin/cafe-management/add-cafe.blade.php
<x-app-layout>
<x-slot name="css">
{{-- <link rel="stylesheet" href="{{ asset('assets/css/scrollspyNav.css') }}"> --}}
<link rel="stylesheet" href="{{ asset('assets/css/components/custom-modal.css') }}">
<link rel="stylesheet" href="{{ asset('plugins/select2/select2.min.css') }}">
<style>
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}
</style>
</x-slot>
<x-app-breadcrumb>
<li class="breadcrumb-item">
<a href="{{ $cancelUrl }}" class="breadcrumb_home">
{{ __('common.CafeManagement') }}
</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{{ __('common.addCafe') }}</li>
</x-app-breadcrumb>
<div class="page-header row">
<div class="page-title col-12 d-flex pr-4">
<h3 class="my-auto">{{ __('common.addCafe') }}
</h3>
</div>
</div>
<div class="row layout-top-spacing">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
{{-- <x-flash-message></x-flash-message> --}}
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<form class="mt-4" method="POST" id="edit_profile_form" action="{{ $url }}"
enctype="multipart/form-data">
@csrf
<input type="hidden" name="latitude" id="latitude" hidden value="">
<input type="hidden" name="longitude" id="longitude" hidden value="">
<div class="row mt-4">
<div class="col-xl-3 col-lg-3 col-md-4 col-sm-4 col-4">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 px-0 form-group mb-4">
<label for="" class="form-label mb-3">{{ __('common.bannerImage') }}</label>
<label class="picture" for="picture__input" tabIndex="0">
<span class="picture__image">
<img src="{{ isset($banner_image) && $banner_image != '' ? asset($banner_image) : asset('assets/img/400x300.jpg') }}"
class="picture__img">
</span>
</label>
<input type="file" name="picture__input" id="picture__input"
accept="image/jpg, image/jpeg, image/png">
</div>
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 px-0 form-group mb-4">
<label for="cafe_filter" class="form-label">{{ __('common.cafe_filter') }}*</label>
<select id="cafe_filter" name="cafe_filter[]" multiple="multiple"
class="form-control @error('cafe_type') is-invalid @enderror">
<option value="">{{ __('common.selectCafeFilter') }}</option>
@foreach ($CafeFilter as $index => $filter)
<option
{{ isset($cafe_filter) && in_array($index, $cafe_filter) ? 'selected' : '' }}
value="{{ $index }}">{{ $filter }}
</option>
@endforeach
</select>
@error('cafe_type')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="col-xl-9 col-lg-9 col-md-8 col-sm-12 col-12 row justify-content-end p-0">
<div class="col-xl-5 col-lg-5 col-md-12 col-sm-12 col-12 form-group mb-4">
<label for="cafe_name" class="form-label">{{ __('common.cafe_name') }}*</label>
<input type="text" class="form-control @error('cafe_name') is-invalid @enderror"
id="cafe_name" name="cafe_name" placeholder="{{ __('common.EnterCafeName') }}"
value="">
@error('cafe_name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div
class="col-xl-5 col-lg-5 col-md-5 col-sm-12 col-12 form-group mb-4 offset-xl-1 offset-lg-1 offset-md-1">
<label for="email" class="form-label">{{ __('common.email') }}*</label>
<input type="text" class="form-control @error('email') is-invalid @enderror"
id="email" name="email" placeholder="{{ __('common.EnterEmail') }}"
value="">
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-xl-5 col-lg-5 col-md-12 col-sm-12 col-12 form-group mb-4">
<label for="phone" class="form-label">{{ __('common.phone') }}</label>
<input type="text" class="form-control @error('phone') is-invalid @enderror"
id="phone" name="phone" placeholder="{{ __('common.EnterPhone') }}"
value="">
@error('phone')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div
class="col-xl-5 col-lg-5 col-md-5 col-sm-12 col-12 form-group mb-4 offset-xl-1 offset-lg-1 offset-md-1">
<label for="cafe_type" class="form-label">{{ __('common.cafe_type') }}</label>
<select id="cafe_type" name="cafe_type"
class="form-control @error('cafe_type') is-invalid @enderror">
@foreach ($types as $index => $type)
<option value="{{ $index }}">{{ $type }}
</option>
@endforeach
</select>
@error('cafe_type')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
{{-- <div
class="col-xl-5 col-lg-5 col-md-5 col-sm-12 col-12 form-group mb-4 offset-xl-1 offset-lg-1 offset-md-1">
<label for="address" class="form-label">{{ __('common.address') }}*</label>
<textarea class="form-control @error('address') is-invalid @enderror" id="address" name="address" rows="3"
placeholder="{{ __('common.EnterAddress') }}" autocomplete="on"></textarea>
@error('address')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div> --}}
<div
class="col-xl-5 col-lg-5 col-md-5 col-sm-12 col-12 form-group mb-4 offset-xl-1">
<label for="address" class="form-label">{{ __('common.address') }}*</label>
<input type="text"
class="form-control text-wrap @error('address') is-invalid @enderror"
id="address" name="address" placeholder="{{ __('common.EnterAddress') }}"
value="">
@error('address')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div
class="col-xl-5 col-lg-5 col-md-5 col-sm-12 col-12 form-group mb-4 offset-xl-1 offset-lg-1 offset-md-1">
<label for="postcode" class="form-label">{{ __('common.postcode') }}*</label>
<input type="text" class="form-control @error('postcode') is-invalid @enderror"
maxlength="10" id="postcode" name="postcode"
placeholder="{{ __('common.EnterPostcode') }}" value="">
@error('postcode')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-xl-5 col-lg-5 col-md-12 col-sm-12 col-12 form-group mb-4">
<label for="bio" class="form-label">{{ __('common.bio') }}*</label>
<textarea class="form-control @error('bio') is-invalid @enderror" id="bio" name="bio" rows="3"
placeholder="{{ __('common.EnterBio') }}"></textarea>
@error('bio')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-xl-5 col-lg-5 col-md-12 col-sm-12 col-12 form-group mb-4 offset-lg-1 offset-md-1">
<label for="website" class="form-label">{{ __('common.website') }}</label>
<input type="text" class="form-control @error('website') is-invalid @enderror"
id="website" name="website" placeholder="{{ __('common.EnterWebsite') }}"
value="">
@error('website')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mx-0 px-0">
<a href="{{ $cancelUrl }}"
class="btn btn-coffee-dark mt-4 py-2 px-4">{{ __('common.Cancel') }}</a>
<button type="submit"
class="btn btn-coffee-light mt-4 mx-3 py-2 px-4">{{ __('common.Save') }}</button>
</div>
</form>
</div>
</div>
</div>
</div>
<x-slot name="script">
<script src="{{ asset('assets/js/libs/jquery.validate.min.js') }}"></script>
<script src="{{ asset('assets/js/libs/additional-methods.min.js') }}"></script>
<script src="{{ asset('plugins/select2/select2.min.js') }}"></script>
<script>
const imageFound = "{{ isset($banner_image) && $banner_image != '' }}";
const upload = "{{ __('common.upload') }}";
const maxSize = 500;
const validation = {};
validation.cafe_name_required = "{{ __('validation.validation.cafe_name.required') }}";
validation.cafe_name_minlength = "{{ __('validation.validation.cafe_name.minlength') }}";
validation.cafe_name_maxlength = "{{ __('validation.validation.cafe_name.maxlength') }}";
validation.email_required = "{{ __('validation.validation.email.required') }}";
validation.email_email = "{{ __('validation.validation.email.email') }}";
validation.email_customEmail = "{{ __('validation.validation.email.customEmail') }}";
validation.phone_required = "{{ __('validation.validation.phone.required') }}";
validation.phone_minlength = "{{ __('validation.validation.phone.minlength') }}";
validation.phone_maxlength = "{{ __('validation.validation.phone.maxlength') }}";
validation.phone_maxlength = "{{ __('validation.validation.phone.maxlength') }}";
validation.phone_regex = "{{ __('validation.validation.phone.regex') }}";
validation.phone_pattern = "{{ __('validation.validation.phone.pattern') }}";
validation.cafe_type_required = "{{ __('validation.validation.cafe_type.required') }}";
validation.bio_required = "{{ __('validation.validation.bio.required') }}";
validation.bio_minlength = "{{ __('validation.validation.bio.minlength') }}";
validation.bio_maxlength = "{{ __('validation.validation.bio.maxlength') }}";
validation.address_required = "{{ __('validation.validation.address.required') }}";
validation.address_minlength = "{{ __('validation.validation.address.minlength') }}";
validation.address_maxlength = "{{ __('validation.validation.address.maxlength') }}";
validation.postcode_required = "{{ __('validation.validation.postcode.required') }}";
validation.postcode_minlength = "{{ __('validation.validation.postcode.minlength') }}";
validation.postcode_maxlength = "{{ __('validation.validation.postcode.maxlength') }}";
validation.website_required = "{{ __('validation.validation.website.required') }}";
validation.website_minlength = "{{ __('validation.validation.website.minlength') }}";
validation.website_maxlength = "{{ __('validation.validation.website.maxlength') }}";
validation.image_extension = "{{ __('validation.validation.image.extensionMimes') }}";
validation.image_maxSize = "{{ __('validation.validation.image.maxsize') }}";
validation.regexTime = "{{ __('validation.validation.time.regexTime') }}";
validation.open_time_required = "{{ __('validation.validation.open_time.required') }}";
validation.open_time_maxlength = "{{ __('validation.validation.open_time.maxlength') }}";
validation.close_time_required = "{{ __('validation.validation.close_time.required') }}";
validation.close_time_maxlength = "{{ __('validation.validation.close_time.maxlength') }}";
validation.cafe_filter_required = "{{ __('validation.validation.cafe_filter.required') }}";
const selectCafeFilter = "{{ __('common.selectCafeFilter') }}";
const fromElement = '#edit_profile_form';
</script>
<script src="{{ asset('assets/js/inputImagePreview.js') }}"></script>
<script src="{{ asset('assets/js/cafe/editProfile.js') }}"></script>
<script type="text/javascript" src="{{ $urlGoogleAPI }}&callback=initAutocomplete" async defer></script>
<script src="{{ asset('assets/js/getLatLng.js') }}"></script>
<script src="{{ asset('assets/js/common-custom.js') }}"></script>
<script>
disableSubmitAfterValidate(fromElement);
</script>
</x-slot>
</x-app-layout>