@@ -156,7 +156,7 @@ function getDeviceData() {
156156 },
157157 // Group for other fields like static IP, archived status, etc.
158158 DevDetail_DisplayFields_Title: {
159- data: ["devStaticIP", "devIsNew", "devFavorite", "devIsArchived"],
159+ data: ["devStaticIP", "devIsNew", "devFavorite", "devIsArchived", "devForceStatus" ],
160160 docs: "https://docs.netalertx.com/DEVICE_DISPLAY_SETTINGS",
161161 iconClass: "fa fa-list-check",
162162 inputGroupClasses: "field-group display-group col-lg-4 col-sm-6 col-xs-12",
@@ -295,8 +295,8 @@ function getDeviceData() {
295295 const currentSource = deviceData[sourceField] || "NEWDEV";
296296 const sourceTitle = getString("FieldLock_Source_Label") + currentSource;
297297 const sourceColor = currentSource === "USER" ? "text-warning" : (currentSource === "LOCKED" ? "text-danger" : "text-muted");
298- inlineControl += `<span class="input-group-addon ${sourceColor}" title="${sourceTitle}">
299- <i class="fa-solid fa-tag"></i> ${currentSource}
298+ inlineControl += `<span class="input-group-addon pointer ${sourceColor}" title="${sourceTitle}">
299+ ${currentSource}
300300 </span>`;
301301 }
302302
@@ -594,14 +594,17 @@ function toggleFieldLock(mac, fieldName) {
594594 lockBtn.find("i").attr("class", `fa-solid ${lockIcon}`);
595595 lockBtn.attr("title", lockTitle);
596596
597- // Update source indicator if locked
598- if (shouldLock) {
599- const sourceIndicator = lockBtn.next();
600- if (sourceIndicator.hasClass("input-group-addon")) {
601- sourceIndicator.text("LOCKED");
602- sourceIndicator.attr("class", "input-group-addon text-danger");
603- sourceIndicator.attr("title", getString("FieldLock_Source_Label") + "LOCKED");
604- }
597+ // Update local source state
598+ deviceData[sourceField] = shouldLock ? "LOCKED" : "";
599+
600+ // Update source indicator
601+ const sourceIndicator = lockBtn.next();
602+ if (sourceIndicator.hasClass("input-group-addon")) {
603+ const sourceValue = shouldLock ? "LOCKED" : "NEWDEV";
604+ const sourceClass = shouldLock ? "input-group-addon text-danger" : "input-group-addon text-muted";
605+ sourceIndicator.text(sourceValue);
606+ sourceIndicator.attr("class", sourceClass);
607+ sourceIndicator.attr("title", getString("FieldLock_Source_Label") + sourceValue);
605608 }
606609
607610 showMessage(shouldLock ? getString("FieldLock_Locked") : getString("FieldLock_Unlocked"), 3000, "modal_green");
0 commit comments