087d1f625866a7716ee70496c8ba95053ee3fbfa
chmalee
Thu Feb 5 11:27:59 2026 -0800
Make the user confirm they actually want to disconnect from a track hub on hgTracks as the button is right next to the refresh button, refs #36704
diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 029cc5105e2..2ee94754526 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -9941,32 +9941,34 @@
}
}
hPrintf(" ",
group->name);
if (hub || group->errMessage)
{
safef(idText, sizeof idText, "%s_%d_disconn", hubName, disconCount);
disconCount++;
hPrintf("\n", idText);
jsOnEventByIdF("click", idText,
+ "if (window.confirm(\"Are you sure you want to disconnect this hub? To reconnect it you will need to navigate to My Data -> Track Hubs and find the hub in the public hubs list or re-enter the URL if the hub is not listed there. Click 'OK' to continue with the disconnect, or 'Cancel' to continue browsing wit hthe hub attached.\")) {"
"document.disconnectHubForm.elements['hubId'].value='%s';"
- "document.disconnectHubForm.submit();return true;",
+ "document.disconnectHubForm.submit();return true;"
+ "}",
hubName + strlen(hubTrackPrefix));
#ifdef GRAPH_BUTTON_ON_QUICKLIFT
safef(idText, sizeof idText, "%s_%d_graph", hubName, graphCount);
graphCount++;
hPrintf("\n", idText);
#endif
}
hPrintf("\n");
hPrintf("\n");
controlGridEndRow(cg);