You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
topnotch_website/resources/views/partials/customers/edit-modal.blade.php

111 lines
5.3 KiB
PHTML

3 months ago
<div class="modal modal-lg fade" id="editCustomerModal" tabindex="-1" aria-labelledby="editCustomerModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="editCustomerModalLabel">Edit Customer</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="{{route('customers.update', $customer)}}" method="post">
@csrf
@method('PATCH')
<div class="modal-body">
<div class="row mb-3">
<label for="company_name" class="col-md-4 col-form-label text-md-end">Company Name</label>
<div class="col-md-6">
<input id="company_name" type="text"
class="form-control @error('company_name') is-invalid @enderror"
name="company_name" value="{{$customer->company_name}}" required
autocomplete="company_name" autofocus>
@error('company_name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="internal_name" class="col-md-4 col-form-label text-md-end">Internal Name</label>
<div class="col-md-6">
<input id="internal_name" type="text"
class="form-control @error('internal_name') is-invalid @enderror"
name="internal_name" value="{{ $customer->internal_name }}" required
autocomplete="internal_name"
>
@error('internal_name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="shipping_address" class="col-md-4 col-form-label text-md-end">
Shipping Address
</label>
<div class="col-md-6">
<input id="shipping_address" type="text"
class="form-control @error('shipping_address') is-invalid @enderror"
name="shipping_address" value="{{ $customer->shipping_address }}" required
autocomplete="shipping_address">
@error('shipping_address')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="billing_address" class="col-md-4 col-form-label text-md-end">Billing Address</label>
<div class="col-md-6">
<input id="billing_address" type="text"
class="form-control @error('billing_address') is-invalid @enderror"
name="billing_address" value="{{ $customer->billing_address }}" required
autocomplete="billing_address" >
@error('billing_address')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="phone" class="col-md-4 col-form-label text-md-end">Phone number</label>
<div class="col-md-6">
<input id="phone" type="text" class="form-control @error('phone') is-invalid @enderror"
name="phone" value="{{ $customer->phone }}" required autocomplete="phone">
@error('phone')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary">Edit customer</button>
</div>
</form>
</div>
</div>
</div>