<%-- $Id: sendEmailActionForm.jsp,v 1.1.4.6 2006/03/23 04:58:37 sudharshan Exp $ --%>

<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html" %>
<%@ taglib prefix="html-el" uri="http://jakarta.apache.org/struts/tags-html-el" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@include file="/webclient/common/jspf/commonIncludes.jspf" %>
<html>
<head>
<title><fmt:message key='webclient.admin.notifications.configure'/> <fmt:message key='webclient.admin.notifications.sendemailaction'/></title>
</head>
<script language="javascript" src="/webclient/common/js/validation.js"></script>
<%@include file="/webclient/admin/jspf/NotificationOperations.jspf" %>

<c:choose>
<c:when test="${openInNewWindow == 'false'}">
<br>

<table width="80%" border="0" cellspacing="0" cellpadding="0">
 <tr><td width="10">&nbsp;</td> 
   <td height="25" valign="bottom"><span class="header1"><fmt:message key='webclient.admin.filters.notifications'/></span></td>
 </tr>
 <tr> 
   <td height="1"><img src="/webclient/common/images/trans.gif" width="1" height="1"></td>
   <td height="1" class="hline"><img src="/webclient/common/images/trans.gif" width="1" height="1"></td>
 </tr>
</table>
</br>


<table cellspacing="0" cellpadding="0"  border=0 width="95%">
<tr><td width="10"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr class="header2Bg" height="25"> 
    
    <td width="20%" class="text"><b>&nbsp;<a href="/admin/NotificationProfiles.do"><fmt:message key='webclient.admin.filters.notifications'/></b></a></td>
    <td width="11%"></td>

    <td width="69%" align="right" class="text"><b><fmt:message key='webclient.admin.notifications.add'/> :</b> &nbsp;&nbsp;<a href="javascript:suppressAction('add','')" class="mnuText"><fmt:message key='webclient.admin.notifications.suppress'/></a> &nbsp;&nbsp;| &nbsp;&nbsp;<a href="javascript:runCmdAction('add','')" class="mnuText"><fmt:message key='webclient.admin.notifications.runcmd'/></a> &nbsp;&nbsp;| &nbsp;&nbsp;<a href="javascript:customFilterAction('add','')" class="mnuText"><fmt:message key='webclient.admin.notifications.customfilter'/></a>&nbsp;&nbsp; | &nbsp;&nbsp;<a href="javascript:sendEmailAction('add','')" class="mnuText"><fmt:message key='webclient.admin.notifications.sendemail'/></a>&nbsp;&nbsp; | &nbsp;&nbsp;<a href="javascript:sendTrapAction('add','')" class="mnuText"><fmt:message key='webclient.admin.notifications.sendtrap'/></a>&nbsp;&nbsp; 
    </td>
  </tr>
</table>
</td></tr></table>

    <br>


<html:form action="/ConfigureSendEMailAction" onsubmit="return validateEMailForm()">
<html-el:hidden property="toPerform" value="${toPerform}"/>
<html-el:hidden property="openInNewWindow" value="${openInNewWindow}"/>

<table cellspacing="0" cellpadding="0"  border=0 width="70%">
<tr><td width="10"></td>
<td>
<table border=0 class="dbborder1" cellspacing="0" cellpadding="3" width="100%" align="left">

<tr height=25 class="header2Bg"><td colspan="3" align="center" valign="middle" class="boldText" nowrap><fmt:message key='webclient.admin.notifications.configure'/> <fmt:message key='webclient.admin.notifications.sendemailaction'/></td></tr>

<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.notifname'/></span></td>
<td width="50%" align="center"><html-el:text styleClass="formStyle" property="NotificationName" readonly="${readOnly}"/></td>
<td width="20%"></td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.smtpserver'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="SMTPServer"/></td>
<td></td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.accname'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="AccountName"/></td>
<td></td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.password'/></span></td>
<td align="center"><html:password styleClass="formStyle" property="Password"/></td>
<td></td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.toaddr'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="ToAddress"/></td>
<td></td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.fromaddr'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="FromAddress"/></td>
<td></td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.subject'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="Subject"/></td>
    <td>
<html:select style="width:100" styleClass="formStyle" name="EMailActionForm" property="appendToSubject" onchange="javascript:appendEMailSubject(this.options[this.options.selectedIndex].value)">
<html:option value=""><span class="text"><fmt:message key='webclient.admin.notifications.subjectheaders'/></span></html:option>
<html:option value="--------"></html:option>
<html:option value="category"/>
<html:option value="entity"/>
<html:option value="text"/>
<html:option value="message"/>
<html:option value="severity"/>
<html:option value="source"/>
<html:option value="groupName"/>
</html:select>
</td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.message'/></span></td>
<td align="center"><html:textarea rows="6" styleClass="formStyle" property="Message"/></td>
<td>
<html:select style="width:100" styleClass="formStyle" name="EMailActionForm" property="appendToMessage" onchange="javascript:appendMessageBody(this.options[this.options.selectedIndex].value)">
<html:option value=""><span class="text"><fmt:message key='webclient.admin.notifications.messageheaders'/></span></html:option>
<html:option value="--------"/>
<html:option value="category"/>
<html:option value="entity"/>
<html:option value="text"/>
<html:option value="message"/>
<html:option value="severity"/>
<html:option value="source"/>
<html:option value="groupName"/>
</html:select>
</td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.attachment'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="Attachment"/></td>
<td></td>
</tr>

<tr>
<td colspan="3" align="center">
<input type="submit" class="button" value="<fmt:message key='webclient.admin.filters.submitbutton'/>"/>
<input type="button" class="button" value="<fmt:message key='webclient.admin.filters.cancelbutton'/>" onclick="javascript:location.href='/admin/NotificationProfiles.do';"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>
</c:when>


<c:otherwise>
<html:form action="/ConfigureSendEMailAction" onsubmit="return validateEMailForm()">
<html-el:hidden property="toPerform" value="${toPerform}"/>
<html-el:hidden property="openInNewWindow" value="${openInNewWindow}"/>

<table border=0 class="dbborder1" cellspacing="0" cellpadding="3" width="100%" align="center">

<tr height=25 class="header2Bg"><td colspan="3" align="center" valign="middle" class="boldText" nowrap><fmt:message key='webclient.admin.notifications.configure'/> <fmt:message key='webclient.admin.notifications.sendemailaction'/></td></tr>

<tr class="reportsEvenRow" height="22">
<td width="30%" align="left" nowrap><span class="boldText"><fmt:message key='webclient.admin.notifications.notifname'/></span></td>
<td width="50%" align="center"><html-el:text styleClass="formStyle" property="NotificationName" readonly="${readOnly}"/></td>
<td width="20%"></td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.smtpserver'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="SMTPServer"/></td>
<td></td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.accname'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="AccountName"/></td>
<td></td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.password'/></span></td>
<td align="center"><html:password styleClass="formStyle" property="Password"/></td>
<td></td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.toaddr'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="ToAddress"/></td>
<td></td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.fromaddr'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="FromAddress"/></td>
<td></td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.subject'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="Subject"/></td>
    <td align="center">
<html:select style="width:100" styleClass="formStyle" name="EMailActionForm" property="appendToSubject" onchange="javascript:appendEMailSubject(this.options[this.options.selectedIndex].value)">
<html:option value=""><fmt:message key='webclient.admin.notifications.subjectheaders'/></html:option>
<html:option value="--------"/>
<html:option value="category"/>
<html:option value="entity"/>
<html:option value="text"/>
<html:option value="message"/>
<html:option value="severity"/>
<html:option value="source"/>
<html:option value="groupName"/>
</html:select>
</td>
</tr>
<tr class="reportsOddRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.message'/></span></td>
<td align="center"><html:textarea rows="6" styleClass="formStyle" property="Message"/></td>
<td>
<html:select style="width:100" styleClass="formStyle" name="EMailActionForm" property="appendToMessage" onchange="javascript:appendMessageBody(this.options[this.options.selectedIndex].value)">
<html:option value=""><span class="text"><fmt:message key='webclient.admin.notifications.messageheaders'/></span></html:option>
<html:option value="--------"/>
<html:option value="category"/>
<html:option value="entity"/>
<html:option value="text"/>
<html:option value="message"/>
<html:option value="severity"/>
<html:option value="source"/>
<html:option value="groupName"/>
</html:select>
</td>
</tr>
<tr class="reportsEvenRow" height="22">
<td width="30%" align="left"><span class="boldText"><fmt:message key='webclient.admin.notifications.attachment'/></span></td>
<td align="center"><html:text styleClass="formStyle" property="Attachment"/></td>
<td></td>
</tr>

<tr>
<td colspan="3" align="center">
<input type="submit" class="button" value="<fmt:message key='webclient.admin.filters.submitbutton'/>"/>
<input type="button" class="button" value="<fmt:message key='webclient.admin.filters.cancelbutton'/>" onclick="javascript:window.close();"/>
</td>
</tr>
</table>
</html:form>
</c:otherwise>


</c:choose>

</html>
