96e826ced5a4c9ec25ecb2b0516469cec1281543 chinhli Wed Jun 12 15:32:04 2013 -0700 redmine 11003 hide genome-www address. diff --git src/hg/hgUserSuggestion/hgUserSuggestion.c src/hg/hgUserSuggestion/hgUserSuggestion.c index d5c7fd0..2530f54 100644 --- src/hg/hgUserSuggestion/hgUserSuggestion.c +++ src/hg/hgUserSuggestion/hgUserSuggestion.c @@ -79,32 +79,34 @@ curtime = time (NULL); struct tm *theTime = localtime(&curtime); strftime(nowBuf, sizeof nowBuf, "%Y-%m-%d %H:%M:%S", theTime); return cloneString(nowBuf); } /* javascript functions */ void printMainForm() /* Create the main suggestion form */ { hPrintf( " <FORM ACTION=\"../cgi-bin/hgUserSuggestion?do.suggestSendMail=1\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\" NAME=\"mainForm\" onLoad=\"document.forms.mainForm.name.focus()\">\n"); hPrintf( "<H2>User Suggestion Form</H2>\n" - "<P>If you have ideas about how we can improve the value of the Genome Browser to your research, we'd like to hear from you. Please provide a concise description below. A copy of the suggestion will be sent to your email address along with a reference number. You may follow up on the status of your request at any time by sending email to %s and quoting the reference number.</P>", - mailReturnAddr()); + "<P>If you have ideas about how we can improve the value of the Genome Browser to your research, " + "we'd like to hear from you. Please provide a concise description below. " + "A copy of the suggestion will be sent to your email address along with a reference number. " + "You may follow up on the status of your request at any time by <a href=\"../contacts.html#followup\">contact</a> us quoting the reference number.</P>"); hPrintf("<P>Please note: this form is not the proper place to submit questions regarding browser use or bug reports. Use the links on our contact page instead.</P>"); hPrintf("<HR><BR>"); hPrintf( " <div id=\"suggest\"> \n" " <label for=\"name\">Your Name:</label><input type=\"text\" name=\"suggestName\" id=\"name\" size=\"50\" /><BR>\n" " <label for=\"email\">Your Email:</label><input type=\"text\" name=\"suggestEmail\" id=\"email\" size=\"50\" /><BR> \n" " <label for=\"confirmEmail\">Re-enter Your Email:</label><input type=\"text\" \n" " name=\"suggestCfmEmail\" id=\"cfmemail\" size=\"50\" /><BR> \n"); hPrintf( " <label for=\"category\">Category:</label><select name=\"suggestCategory\" id=\"category\">\n" " <option selected>Tracks</option> \n" " <option>Genome Assemblies</option>\n" " <option>Browser Tools</option>\n" " <option>Command-line Utilities</option>\n" " <option>Others</option>\n" @@ -252,42 +254,44 @@ " if ( validateMainForm(document.forms[\"mainForm\"]) && checkCaptcha(document.forms[\"mainForm\"]))\n" " {\n" " document.forms[\"mainForm\"].submit();\n" " }\n" " }\n" " </script>\n\n"); } void printSuggestionConfirmed(char *summary, char * refID, char *userAddr, char *adminAddr, char *details) /* display suggestion confirm page */ { hPrintf( "<h2>Thank you for your suggestion!</h2>"); hPrintf( "<p>" - "Thank you for your suggestion regarding %s. <BR>" - "You may follow up on the status of your request at any time by sending email to %s " - "and quoting your reference number:<BR><BR>%s<BR><BR>" + "You may follow up on the status of your request at any time by " + "<a href=\"../contacts.html#followup\">contact</a> us quoting your reference number:<BR><BR>%s<BR><BR>" "A copy of this information has also been sent to you at %s.<BR></p>", - summary, adminAddr, refID, userAddr); + refID, userAddr); hPrintf( "<p><a href=\"hgUserSuggestion\">Click here if you wish to make additional suggestions.</a></p>"); hPrintf( "<p>" - "Your suggestion:<BR>" - "%s</p>", - details); + "<B>Your suggestion summary:</B><BR>" + "%s<BR>" + "<B>Your suggestion details:</B><BR>" + "<pre>%s</pre>" + "</p>", + summary, details); } void sendSuggestionBack(char *sName, char *sEmail, char *sCategory, char *sSummary, char *sDetails, char *suggestID) /* send back the suggestion */ { /* parameters from hg.cong */ char *mailTo = mailToAddr(); char *mailFrom=mailFromAddr(); char *filter=filterKeyword(); char subject[256]; char msg[4096]; /* need to make larger */ safef(msg, sizeof(msg), "SuggestionID:: %s\nUserName:: %s\nUserEmail:: %s\nCategory:: %s\nSummary:: %s\n\n\nDetails::\n%s", suggestID, sName, sEmail, sCategory, sSummary, sDetails); @@ -299,32 +303,32 @@ void sendConfirmMail(char *emailAddr, char *suggestID, char *summary, char *details) /* send user suggestion confirm mail */ { char subject[256]; char msg[4096]; char *remoteAddr=getenv("REMOTE_ADDR"); char brwName[256]; char returnAddr[256]; char signature[256]; safecpy(brwName,sizeof(brwName), browserName()); safecpy(returnAddr,sizeof(returnAddr), mailReturnAddr()); safecpy(signature,sizeof(signature), mailSignature()); safef(subject, sizeof(subject),"Thank you for your suggestion to the %s", brwName); safef(msg, sizeof(msg), - " Someone (probably you, from IP address %s) submitted a suggestion to the %s regarding %s.\n\n The suggestion has been assigned a reference number of \"%s\". If you wish to follow up on the progress of this suggestion with browser staff, you may contact us at %s. Please include the reference number of your suggestion in the email.\n\nThank you for your input,\n%s\n\nYour suggestion:\n\n %s", -remoteAddr, brwName, summary, suggestID, returnAddr, signature, details); + " Someone (probably you, from IP address %s) submitted a suggestion to the %s regarding %s.\n\n The suggestion has been assigned a reference number of \"%s\". If you wish to follow up on the progress of this suggestion with browser staff, you may contact us at %s. Please include the reference number of your suggestion in the email.\n\nThank you for your input,\n%s\n\nYour suggestion summary:\n%s\n\nYour suggestion details:\n%s", +remoteAddr, brwName, summary, suggestID, returnAddr, signature, summary, details); int result; result = mailViaPipe(emailAddr, subject, msg, returnAddr); } void askForSuggest(char *organism, char *db) /* Put up the suggestion form. */ { printMainForm(); printValidateScript(); printCheckCaptchaScript(); printSubmitFormScript(); //cartSaveSession(cart); } void submitSuggestion()