Skip to content

Commit

Permalink
Revert SAK-30715: Use mail.support for boxes 2+3 if no technicalAddre…
Browse files Browse the repository at this point in the history
…ss (sakaiproject#2786)

superseded by SAK-31184
  • Loading branch information
nicholaswilson100 authored and ottenhoff committed Jun 14, 2016
1 parent 010c8ee commit bbf2d96
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
siteEmail = site.getProperties().getProperty(Site.PROP_SITE_CONTACT_EMAIL);
}

String mailSupport = sakaiProxy.getConfigString(Constants.MAIL_SUPPORT, "support@"+ sakaiProxy.getServerName());
if (siteEmail!=null && !siteEmail.isEmpty() && siteExists){
contactName = site.getProperties().getProperty(Site.PROP_SITE_CONTACT_NAME);
}
Expand All @@ -246,7 +245,6 @@ else if (!hasViewPermission){
contactName = String.format("%s <%s>" ,serviceContactName, serviceContactEmail);
}
setStringAttribute(request, "contactName", contactName);
setStringAttribute(request, "mailSupport", mailSupport);

response.setContentType("text/html");
request.getRequestDispatcher("/WEB-INF/bootstrap.jsp").include(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ private String getToAddress(String type, String siteId) {
toAddress = sakaiProxy.getConfigString(Constants.PROP_SUPPLEMENTAL_B_ADDRESS, null);
} else {
toAddress = sakaiProxy.getConfigString(Constants.PROP_TECHNICAL_ADDRESS, null);
if (toAddress==null){
toAddress = sakaiProxy.getConfigString(Constants.MAIL_SUPPORT, null);
}
}
return toAddress;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class Constants {
public final static String SUPPLEMENTAL_B = "supplementalb";

public final static String PROP_TECHNICAL_ADDRESS = "feedback.technicalAddress";
public final static String MAIL_SUPPORT = "mail.support";
public final static String PROP_HELP_ADDRESS = "feedback.helpAddress";
public final static String PROP_SUGGESTIONS_ADDRESS = "feedback.suggestionsAddress";
public final static String PROP_SUPPLEMENTAL_A_ADDRESS = "feedback.supplementalAAddress";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,4 @@ public int getAttachmentLimit() {
public Locale getLocale() {
return rb.getLocale();
}

public String getServerName() {
return serverConfigurationService.getServerName();
}
}
1 change: 0 additions & 1 deletion feedback/src/webapp/WEB-INF/bootstrap.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
maxAttachmentsMB: ${maxAttachmentsMB},
showContentPanel: ${showContentPanel},
showHelpPanel: ${showHelpPanel},
mailSupport: '${mailSupport}',
showTechnicalPanel: ${showTechnicalPanel},
showSuggestionsPanel: ${showSuggestionsPanel},
showSupplementalAPanel: ${showSupplementalAPanel},
Expand Down
22 changes: 0 additions & 22 deletions feedback/src/webapp/WEB-INF/templates/home.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,6 @@

{{#if showHelpPanel}}
<div class="feedback-box" id="feedback-ask-help">
<h3>{{translate 'ask_title'}}</h3>
<ul>{{translate 'ask_explanation'}}</ul>
{{#if enableTechnical}}
<p><a id="feedback-report-helpdesk-link" href="javascript:;">{{translate 'technical_link'}}</a></p>
{{else}}
{{#if mailSupport}}
<p><a id="feedback-report-helpdesk-link" href="javascript:;">{{translate 'technical_link'}}</a></p>
{{else}}
<p class='information'>{{translate 'no_technical_address'}}</p>
{{/if}}
{{/if}}
<div class="feedback-box-header">
<span class="fa fa-fw {{translate 'ask_icon_no_translate'}}" aria-hidden="true"></span>
<h3>{{translate 'ask_title'}}</h3>
Expand All @@ -79,17 +68,6 @@

{{#if showTechnicalPanel}}
<div class="feedback-box" id="feedback-tech-problem">
<h3>{{translate 'technical_title'}}</h3>
<ul>{{translate 'technical_explanation'}}</ul>
{{#if enableTechnical}}
<p><a id="feedback-report-technical-link" href="javascript:;">{{translate 'technical_link'}}</a></p>
{{else}}
{{#if mailSupport}}
<p><a id="feedback-report-technical-link" href="javascript:;">{{translate 'technical_link'}}</a></p>
{{else}}
<p class='information'>{{translate 'no_technical_address'}}</p>
{{/if}}
{{/if}}
<div class="feedback-box-header">
<span class="fa fa-fw {{translate 'technical_icon_no_translate'}}" aria-hidden="true"></span>
<h3>{{translate 'technical_title'}}</h3>
Expand Down
3 changes: 1 addition & 2 deletions feedback/src/webapp/js/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
supplementaryInfo: feedback.supplementaryInfo,
helpPagesUrl: feedback.helpPagesUrl,
helpPagesTarget: feedback.helpPagesTarget,
mailSupport: feedback.mailSupport,
loggedIn: loggedIn, showContentPanel : feedback.showContentPanel,
showHelpPanel : feedback.showHelpPanel,
showTechnicalPanel : feedback.showTechnicalPanel,
Expand Down Expand Up @@ -124,7 +123,7 @@
});
}

if (feedback.supplementaryInfo.length == 0 && feedback.mailSupport==null) {
if (feedback.supplementaryInfo.length > 0) {
$('#feedback-supplementary-info').show();
}

Expand Down

0 comments on commit bbf2d96

Please sign in to comment.