2e51ddb856d99b25998ea2b75907103d15b1ff6c galt Tue Apr 15 12:31:02 2025 -0700 Makes configuration instructions for URL-only custom tracks very obvious with red message at the top. refs #20985 diff --git src/hg/hgCustom/hgCustom.c src/hg/hgCustom/hgCustom.c index 05bace98840..70c7b7a6f20 100644 --- src/hg/hgCustom/hgCustom.c +++ src/hg/hgCustom/hgCustom.c @@ -231,31 +231,40 @@ /* send two lines of the message to the apache error log also: */ char *tmpString = replaceChars(err, "\n", " "); fprintf(stderr, "hgCustom load error: %s\n", tmpString); freeMem(tmpString); } cgiSimpleTableStart(); /* first rows for update form are for track and browser line entry */ if (isUpdateForm) { /* row for instructions */ cgiSimpleTableRowStart(); cgiSimpleTableFieldStart(); if (dataUrl) - puts("Configuration:"); + { + printf( + "" + "To update this data which was loaded via URL,
" + " press submit to go to \"Manage Custom Tracks\" page,
" + "select the checkbox box in the update column beside this custom track,
" + "and press the update button at the top of the column.\n

"); + + puts("Current Loaded Configuration (do not update here):"); + } else { puts("Edit configuration:"); } cgiTableFieldEnd(); cgiTableField(" "); puts(""); if (warnOnly) { cgiMakeButtonWithOnClick("ContinueWithWarn", "Continue with Warning", NULL, "return submitClick(this);"); printf(" "); jsInline( "$('textarea').change(function() {\n" " $('#ContinueWithWarn').hide();\n" "});\n"); @@ -351,34 +360,30 @@ "});\n"); } cgiMakeButtonWithOnClick("Submit", "Submit", NULL, "return submitClick(this);"); printf("\n"); cgiTableFieldEnd(); } cgiTableRowEnd(); /* next row - text entry box for data, and clear button */ cgiSimpleTableRowStart(); puts(""); if (dataUrl) { /* can't update via pasting if loaded from URL */ safef(buf, sizeof buf, "Data was uploaded from URL: %s\n" - "\n" - "To update this data, press submit to go to \"Manage Custom Tracks\" page, " - "select the checkbox box in the update column beside this custom track, " - "and press the update button at the top of the column. " , ctDataUrl(ct)); cgiMakeTextAreaDisableable(hgCtDataText, buf, TEXT_ENTRY_ROWS, TEXT_ENTRY_COLS, TRUE); } else { int rows = (isUpdateForm ? TEXT_ENTRY_ROWS - CONFIG_ENTRY_ROWS : TEXT_ENTRY_ROWS); cgiMakeTextArea(hgCtDataText, cartUsualString(cart, hgCtDataText, ""), rows, TEXT_ENTRY_COLS); } cgiTableFieldEnd();