<%@ taglib uri="/WEB-INF/taglibs/cal.tld" prefix="cal" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ page import="com.k_int.salcal.dto.BookingSuccessDTO" %> <% String base_dir = request.getContextPath(); BookingSuccessDTO dto = null; if (request.getAttribute("suc") != null) { dto = (BookingSuccessDTO) request.getAttribute("suc"); } request.getSession().setAttribute("dto", null); org.springframework.web.context.WebApplicationContext ctx = org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(application); com.k_int.salcal.util.UserMessageService msgs = (com.k_int.salcal.util.UserMessageService) ctx.getBean("CalMessageService"); %>

<% if (dto!=null) { String subj = "Referral booking for "+dto.getDate()+" at "+dto.getTime()+" cancelled."; String body = "A referral booking has been deleted for "+dto.getToName()+" with the following details:%0A%0ADate: "+dto.getDate()+"%0ATime: "+dto.getTime()+"%0A"+"Booked by: "+dto.getFromName()+"%0AWith the following name: "+dto.getId(); %>

The referral booking with the following details has been cancelled.

Adviser: <%=dto.getToName()%>
<% if (dto.getFromName()!=null) { %> Booked By: <%=dto.getFromName()%>
<% } %> Date: <%=dto.getDate()%>
Time: <%=dto.getTime()%>
Identification: <%=dto.getId()%>

<% if (dto.getEmail()!=null && dto.getCentreEmail()!=null) { %> Click here to create a booking email.
This will send to the Adviser and their Advice Centre. <% } else if (dto.getEmail()!=null) { %> Click here to create a booking email.
This will only send to the Adviser. <% } else if (dto.getCentreEmail()!=null) { %> Click here to create a booking email.
This will only send to the Advice Center. <% } else { %> There are no addresses on the system for the Adviser or the Centre, so no email can be generated. <% } %>

<% } %>