Adding event now goes to viewmachine, not machine list

This commit is contained in:
Skylar Ittner 2020-06-11 15:02:45 -06:00
parent ba84d2211b
commit c042a53581
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ switch ($VARS['action']) {
$VARS['privatenotes'] $VARS['privatenotes']
); );
returnToSender("event_added", $VARS['machine']); returnToSender("event_added", $evt->getMachineID());
case "editclient": case "editclient":
$user = new User($_SESSION['uid']); $user = new User($_SESSION['uid']);
if (!$user->hasPermission("MACHINEMANAGER_EDIT")) { if (!$user->hasPermission("MACHINEMANAGER_EDIT")) {

View File

@ -25,7 +25,7 @@ $form = new FormBuilder("Add Event", "fas fa-history", "action.php", "POST");
$form->setID("editmachine"); $form->setID("editmachine");
$form->addHiddenInput("action", "addevent"); $form->addHiddenInput("action", "addevent");
$form->addHiddenInput("source", "machines"); $form->addHiddenInput("source", "viewmachine");
$form->addHiddenInput("machine", htmlspecialchars($_GET['id'])); $form->addHiddenInput("machine", htmlspecialchars($_GET['id']));
$events = $database->select("event_types", ['eventid', 'eventname']); $events = $database->select("event_types", ['eventid', 'eventname']);