fix: login page changes
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
id="email"
|
||||
name="email"
|
||||
value="{{ old('email') }}"
|
||||
placeholder="staff@luspa.gov.gh"
|
||||
placeholder="staff@click-mobile.com"
|
||||
required
|
||||
autofocus>
|
||||
</div>
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
<!-- MODAL HTML REMAINS THE SAME AS BEFORE -->
|
||||
@push('modals')
|
||||
@include('clients.partials.create')
|
||||
@endpush
|
||||
@@ -135,6 +134,44 @@
|
||||
let page = $(this).data('page');
|
||||
if (page) fetchClients(page);
|
||||
});
|
||||
// ---------------------------------------------------------
|
||||
// 1. CREATE BUTTON (Open Modal)
|
||||
// ---------------------------------------------------------
|
||||
$('#btnOpenClientModal').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
// Replace '#createClientModal' with the actual ID of the modal in your clients.partials.create file
|
||||
$('#createClientModal').modal('show');
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// 2. VIEW BUTTON (Event Delegation for AJAX buttons)
|
||||
// ---------------------------------------------------------
|
||||
$(document).on('click', '.btn-view-client', function(e) {
|
||||
e.preventDefault();
|
||||
let clientId = $(this).data('id');
|
||||
|
||||
// OPTION A: Redirect to a view page
|
||||
window.location.href = base_url + "/clients/" + clientId;
|
||||
|
||||
// OPTION B: If you are using a View Modal instead, uncomment this:
|
||||
// fetchClientDetailsForView(clientId);
|
||||
// $('#viewClientModal').modal('show');
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// 3. EDIT BUTTON (Event Delegation for AJAX buttons)
|
||||
// ---------------------------------------------------------
|
||||
$(document).on('click', '.btn-edit-client', function(e) {
|
||||
e.preventDefault();
|
||||
let clientId = $(this).data('id');
|
||||
|
||||
// OPTION A: Redirect to an edit page
|
||||
window.location.href = base_url + "/clients/" + clientId + "/edit";
|
||||
|
||||
// OPTION B: If you are using an Edit Modal instead, uncomment this:
|
||||
// fetchClientDetailsForEdit(clientId);
|
||||
// $('#editClientModal').modal('show');
|
||||
});
|
||||
|
||||
// AJAX Fetch Function
|
||||
function fetchClients(page = 1) {
|
||||
|
||||
Reference in New Issue
Block a user