Fixed event details page state switch

This commit is contained in:
Ziver Koc 2019-11-11 21:26:03 +01:00 committed by Ziver Koc
parent a8ed1ef5a9
commit 1b4f558e8d
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@
<td>
<form method="POST">
<input type="hidden" name="action" value="modify">
<input type="hidden" name="action_id" value="{{.getId()}}">
<input type="hidden" name="action_id" value="{{event.getId()}}">
<div class="btn-toolbar pull-left">
<input class="toggle-switch" type="checkbox" name="enabled"

View file

@ -63,7 +63,7 @@ public class EventOverviewHttpPage extends HalHttpPage {
int id = (ObjectUtil.isEmpty(request.get("id")) ? -1 : Integer.parseInt(request.get("id")));
// Save new input
if (!request.containsKey("action") && id >= 0) {
if (id >= 0) {
Event event = Event.getEvent(db, id);
// get history data