3eb8de69a3d713dbf37a1b1f056cefe73de785e1 gperez2 Wed Sep 2 17:11:05 2026 -0700 Updating hgLogin's Change password, Change email, and Sign up using email headings to sentence case, matching the rest of the file, per code review feedback on #38213, refs #37929 diff --git src/hg/hgLogin/hgLogin.c src/hg/hgLogin/hgLogin.c index b570e879194..1f268ea1ce9 100644 --- src/hg/hgLogin/hgLogin.c +++ src/hg/hgLogin/hgLogin.c @@ -857,31 +857,31 @@ cartSetString(cart, "hgLogin_userName", username); displayLoginPage(conn); return; } /* -------- functions ---- */ void changePasswordPage(struct sqlConnection *conn) /* change password page */ { hPrintf("<div id=\"changePwBox\" class=\"centeredContainer formBox\">" "\n" "<h2>%s</h2>", brwName); hPrintf( - "<h3>Change Password</h3>" + "<h3>Change password</h3>" "\n" "<p> <span style='color:red;'>%s</span> </p>" "\n" "<form method=\"post\" action=\"%s\" name=\"changePasswordForm\" id=\"changePasswordForm\">" "\n" "<div class=\"inputGroup\">" "<label for=\"userName\">Username</label>" "<input type=\"text\" name=\"hgLogin_userName\" size=\"30\" value=\"%s\" id=\"email\">" "</div>" "\n", errMsg ? errMsg : "", hgLoginUrl, htmlEncode(cartUsualString(cart, "hgLogin_userName", ""))); // value="" attribute; escape (XSS) hPrintf("<div class=\"inputGroup\">" "\n" "<label for=\"currentPw\">Current or emailed password</label>" "<span style=\"display:inline-flex; align-items:center;\">" @@ -1100,31 +1100,31 @@ freez(&errMsg); errMsg = cloneString("Please log in first to change your email address."); displayLoginPage(conn); return; } char query[256]; sqlSafef(query, sizeof(query), "SELECT email FROM gbMembers WHERE userName='%s'", user); char *curEmail = sqlQuickString(conn, query); sqlSafef(query, sizeof(query), "SELECT password FROM gbMembers WHERE userName='%s'", user); boolean hasPassword = isNotEmpty(sqlQuickString(conn, query)); char *encUser = htmlEncode(user); char *encCurEmail = htmlEncode(isNotEmpty(curEmail) ? curEmail : "(none)"); hPrintf("<div id=\"changeEmailBox\" class=\"centeredContainer formBox\">" "<h2>%s</h2>", brwName); -hPrintf("<h3>Change Email</h3>"); +hPrintf("<h3>Change email</h3>"); hPrintf("<p><span style='color:red;'>%s</span></p>", errMsg ? errMsg : ""); hPrintf("<form method=\"post\" action=\"%s\" name=\"changeEmailForm\">", hgLoginUrl); hPrintf("<p>Signed in as <b>%s</b>.<br>Current email address: <b>%s</b></p>", encUser, encCurEmail); freeMem(encUser); freeMem(encCurEmail); if (hasPassword) hPrintf("<div class=\"inputGroup\">" "<label for=\"curPassword\">Current password</label>" "<input type=\"password\" name=\"hgLogin_curPassword\" value=\"\" size=\"30\" id=\"curPassword\">" "</div>"); hPrintf("<div class=\"inputGroup\">" "<label for=\"newEmail1\">New email address</label>" "<input type=\"text\" name=\"hgLogin_newEmail1\" value=\"\" size=\"30\" id=\"newEmail1\">" "</div>"); @@ -1257,31 +1257,31 @@ freeMem(encEmail); returnToURL(1500); } void signupPage(struct sqlConnection *conn) /* draw the signup page */ { hPrintf("<div id=\"signUpBox\" class=\"centeredContainer formBox\">" "<h2>%s</h2>", brwName); hPrintf( "<p>Signing up enables you to save multiple sessions, share your sessions with others via short and stable session links and manage previously uploaded custom tracks and track hubs.</p>" "\n"); hPrintf("<p>Already have an account? " "<a href=\"%s?hgLogin.do.displayLoginPage=1\">Go to the login page</a>.</p>", hgLoginUrl); printSocialButtons(FALSE, TRUE, "Sign up"); -hPrintf("<h3>Sign Up Using Email</h3>" +hPrintf("<h3>Sign up using email</h3>" "<form method=\"post\" action=\"%s\" name=\"mainForm\">" "<span style='color:red;'>%s</span>" "\n", hgLoginUrl, errMsg ? errMsg : ""); printUsernameNote(); hPrintf("<div class=\"inputGroup\">" "<label for=\"userName\">Username</label>" "<input type=text name=\"hgLogin_userName\" value=\"%s\" size=\"30\" id=\"userName\">" "</div>" "\n" "<div class=\"inputGroup\">" "<label for=\"emailAddr\">Email address</label>" "<input type=text name=\"hgLogin_email\" value=\"%s\" size=\"30\" id=\"emailAddr\">" "</div>" "\n" "<div class=\"inputGroup\">"