Skip to content
Snippets Groups Projects
Commit a030df68 authored by Muhammad Rifko Favian's avatar Muhammad Rifko Favian
Browse files

feat: add button to create & update event

parent 450361e1
Branches master
No related merge requests found
......@@ -34,7 +34,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CRUD Test</title>
<title>HOME • TICKET KU</title>
<link rel="stylesheet" type="text/css" href="/../../styles/global.css">
<link rel="stylesheet" type="text/css" href="/../../styles/form.css">
<link rel="stylesheet" type="text/css" href="/../../styles/footer.css">
......@@ -50,6 +50,7 @@
<div class="main-content">
<div class="column">
<button onclick="openCreateEventPage()" id="createEventBtn" class="admin">Create Event</button>
<div class="row">
<input type="text" placeholder="Search.." value="<?= htmlspecialchars($searchQuery)?>" style="width:250%;">
<?php if (!empty($searchQuery) || !empty($minStock) || !empty($sortKey)) : ?>
......@@ -82,6 +83,10 @@
const navbar = document.querySelector('.navbar ul');
navbar.classList.toggle('show');
}
function openCreateEventPage() {
window.location.href = "/app/Views/event/create.php";
}
</script>
<script src="js/script.js"></script>
</body>
......
......@@ -12,6 +12,10 @@
<input type="hidden" name="eventId" value="<?php echo $event['event_id']; ?>">
<button type="submit" id="buyTicket">Buy Ticket</button>
</form>
<form id="viewEventForm" method="get" action="../event/update.php">
<input type="hidden" name="id" value="<?php echo $event['event_id']; ?>">
<button type="submit" id="updateEvent">Update Event</button>
</form>
</div>
<!-- <a href="#">Buy Tickets</a> -->
</div>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment