<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ taglib uri="sitemesh-page" prefix="page" %>
<html>
<head>
    <title><webwork:text name="'admin.announcement.edit.announcement.banner'"/></title>
</head>
<body>
    <script type="text/javascript">
       function submitPreview()
       {
           document.jiraform.action="EditAnnouncementBanner!default.jspa";
           var previewInput = document.createElement('input');
           previewInput.name = 'announcement_preview_banner_st';
           previewInput.type = 'hidden';
           previewInput.value= DWRUtil.getValue('announcement');
           document.jiraform.appendChild(previewInput);
           document.jiraform.submit();
           return false;
       }
    </script>

    <page:applyDecorator name="jiraform">
        <page:param name="action">EditAnnouncementBanner.jspa</page:param>
        <page:param name="submitName"><webwork:text name="'admin.announcement.set.banner'"/></page:param>
        <page:param name="buttons"><input type="button" name="previewButton" onclick="submitPreview()" value="<webwork:text name="'admin.announcement.preview.banner'"/>"/><webwork:if test="/preview == true">&nbsp;<input type="button" value="<webwork:text name="'admin.announcement.reset'"/>" onclick="location.href='EditAnnouncementBanner!default.jspa'"/></webwork:if></page:param>

        <page:param name="autoSelectFirst">false</page:param>
        <page:param name="title"><webwork:text name="'admin.announcement.edit.announcement.banner'"/></page:param>
        <page:param name="description">
            <p><div class="infoBox">
                <webwork:text name="'admin.announcement.description'"/>
            </div></p>
        </page:param>

        <ui:textarea label="text('admin.announcement')" name="'announcement'" rows="'8'" cols="'60'">
            <ui:param name="'description'"><webwork:text name="'admin.announcement.close.tags'"/></ui:param>
            <ui:param name="'cssId'">announcement</ui:param>
        </ui:textarea>
        <ui:radio label="'Visibility Level'" name="'bannerVisibility'" list="visibilityModes" listKey="'id'" listValue="'name'"/>

    </page:applyDecorator>
</body>
</html>
