<%@ include file="/includes.jsp" %>
<br/>
<html:javascript formName="meetingForm" staticJavascript="false"/>
<s:form action="/meetings/meetingAction" onsubmit="return validateMeetingForm(this);">

*************  THIS PAGE APPEARS TO BE OBSOLETE ****************
	<input type="hidden" name="method" value="save" id="dispatchMethod"/>
	<table cellpadding="0" cellspacing="0" width="400">
		<tr>
			<td valign="top">
				<tags:dialogBox title="Meeting">
					<table>
						<tr>
							<td  class="label">Title:<c:out value="${meetingForm.meeting.title}"/>
							<html:hidden property="meeting.title"/></td>
						</tr>
						<tr>
							<td  class="label">
								Date:<c:out value="${meetingForm.startDate}"/> <html:hidden property="startDate"/> &nbsp;
								Time:<c:out value="${meetingForm.startTime}"/><html:hidden property="startTime"/> 
								 -<c:out value="${meetingForm.endTime}"/> <html:hidden property="endTime"/> 
							</td>
						</tr>
						<tr>
							<td class="label">
								Notes:<br/><c:out value="${meetingForm.meeting.notes}"/>
								<html:hidden property="meeting.notes"/>
							</td>
						</tr>
					</table>
				</tags:dialogBox>
			</td>
		</tr>
		<tr>
			<td><br/></td>
		</tr>
		<tr>
			<td valign="top">
				<tags:dialogBox title="Invitations">
					<table >
						<tr>
							<td class="label" title="Enter a system username to have this meeting appear in their diary">Name</td>
							<td class="label" title="Optional: Enter if you want to invite this attendee via an e-mail">E-Mail</td>
							<td class="label" title="Optional: Enter if you want to invite this attendee via an e-mail">Telephone</td>
							<td class="label" title="Optional: Enter if you want to invite this attendee via an e-mail">Fax</td>
							<td class="label" title="Optional: Enter if you want to invite this attendee via an e-mail">Letter (please type in address)</td>
							<td class="label" title="Optional: Enter if you want to invite this attendee via an e-mail">Use</td>
						</tr>
							<c:forEach var="attendee" items="${meetingForm.meeting.attendees}" varStatus="attIndex">
							<c:set var="attIndexInteger" value="${attIndex.count}"/>
								<%
								com.ardeo.entities.event.Attendee attendee = (com.ardeo.entities.event.Attendee) pageContext.getAttribute("attendee");
								Integer attIndex = (Integer) pageContext.getAttribute("attIndexInteger");
								%>
							<tr>
								<td class="input" title="You can enter a system username to have this meeting appear in their diary"><html:text property='meeting.attendees[<c:out value="${attIndex}"/>].name'/></td>
								<td class="input"  title="Optional: Enter if you want to invite this attendee via an e-mail"><html:text property='meeting.attendees[<c:out value="${attIndex}"/>].address'/></td>
								<td class="input"><input type="text" size="10" name="meeting.phoneNumber"></td>
								<td class="input"><input type="text" size="10" name="meeting.faxNumber"></td>
								<td class="input"><input type="text" size="40" name="meeting.address"></td>
								<td class="input"><select name="meeting.contactPreference">
									<option>   </option>
									<option> E-Mail </option>
									<option> Tel. </option>
									<option> Fax </option>
									<option> Letter </option>
									</select>
								</td>
							</tr>
						</c:forEach>
						<tr>
							<td colspan="6" align="right"><html:submit value="Save"/> <html:submit onclick="return dispatch('invite')" value="Invite attendees"/></td>
						</tr>
					</table>
				</tags:dialogBox>
			</td>
		</tr>
	</table>
	<br/>
	<c:if test="${meetingForm.meeting.items ne null}">
			<c:forEach var="item" items="${meetingForm.meeting.items}" varStatus="index">
				<c:set var="indexInteger" value="${index.count}"/>
				<%
				com.ardeo.entities.MeetingItem item = (com.ardeo.entities.MeetingItem) pageContext.getAttribute("item");
						int Integer = (Integer) pageContext.getAttribute("indexInteger");
				%>
				<html:hidden property='<%="patientIsDiscussed(" + item.getPatientDiscussed().getId() + ")"%>'/>
				<html:hidden property='<%="patientReasonNotes(" + item.getPatientDiscussed().getId() + ")"%>'/>
				<html:hidden property='<%="followUpDate(" + item.getPatientDiscussed().getId() + ")"%>'/>
				<html:hidden property='<%="patientNotes(" + item.getPatientDiscussed().getId() + ")"%>'/>
		</c:forEach>
	</c:if>
	</s:form>