<%@ 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 = "Booking for "+dto.getDate()+" at "+dto.getTime(); String body = "A booking has been created 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()+"%0A%0AClient Details%0A%0AClient name:%0AClient address, including postcode:%0ATel no.:%0ADoB:%0AGender: F/M%0AEthnicity: %0ANon English language needs:%0A%0ADisability access needs:%0ALegal Help qualifying benefits: Y/N%0AContact Method: In person/phone/letter/email%0AOK to contact directly: Y/N; if no, give details:%0A%0A%0ABrief summary of case:%0A%0A%0AKey Dates:"; %>

The booking with the following details has been successfully completed.

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. <% } %>

<% } %>