From e646299dc98fdc11945dfc30359e1ef3864caed8 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Tue, 10 Feb 2026 17:37:26 +0100 Subject: [PATCH] Fix Update button not creating pending new device statuses When a user types a new status name in the blank field and clicks the Update button instead of pressing Enter or clicking the + icon, the new status was silently lost. Now the Update button triggers the add-status action before collecting the form data. Fixes #1041 --- configuration.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configuration.php b/configuration.php index 5b749f2c3..835ec23f1 100644 --- a/configuration.php +++ b/configuration.php @@ -1896,6 +1896,8 @@ function updatestatus(e){ $('#messages').text(''); // Don't let this button do a real form submit e.preventDefault(); + // If there is a pending new status in the input, create it before saving + $('#devstatus .newstatus img').trigger('click'); // Collect the config data var formdata=$(".main form").serializeArray(); // Set the action of the form to Update