Rev 215 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@ page import="pt.estgp.estgweb.Globals" %>
<%@ page import="jomm.utils.MyCalendar" %>
<%@ page import="pt.estgp.estgweb.web.utils.DatesUtils" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
<jsp:useBean id="AnnouncementsForm" type="pt.estgp.estgweb.web.form.announcements.AnnouncementsForm" scope="request"/>
<jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/>
<jomm:messages/>
<html:errors/>
<%
String fromAction = "";
String from = "";
String user = "";
if (request.getParameter("from") != null)
{
user = "/user";
fromAction = "From" + request.getParameter("from");
from = "?from=" + request.getParameter("from");
}
request.setAttribute("from", from);
request.setAttribute("user", user);
request.setAttribute("fromAction", fromAction);
MyCalendar calendar = new MyCalendar();
calendar.setYear(calendar.getYear()+1);
%>
<div id="contentIntranet">
<div id="contentPane">
<html:form action="${user}/submitAnnouncement${fromAction}${from}" enctype="multipart/form-data">
<html:hidden property="courseUnitView.id" value="${AnnouncementsForm.announcementView.courseUnitView.id}"/>
<html:hidden property="role"/>
<html:hidden property="announcementView.id"/>
<html:hidden property="smallImageStr"/>
<html:hidden property="bigImageStr"/>
<html:hidden property="announcementView.internal" value="true"/>
<html:hidden property="announcementView.courseUnitView.id"/>
<html:hidden property="announcementView.courseUnitView.name"/>
<input type="hidden" name="expireDate" value="<%=calendar.getWebDateString()%>"/>
<html:hidden property="announcementView.courseUnitView.courseName"/>
<html:hidden property="targetRolesStr" value="all"/>
<baco:hasRole role="student">
<html:hidden property="announcementView.choosedOwnerRole" value="student"/>
</baco:hasRole>
<baco:hasRole role="teacher">
<html:hidden property="announcementView.choosedOwnerRole" value="teacher"/>
</baco:hasRole>
<input type="hidden" name="dispatch" value="removeRole">
<table class="form">
<baco:isAdmin>
<tr>
<th>
<bean:message key="announcement.status"/>
</th>
<td>
<html:select property="announcementView.status">
<html:option value="true">
<bean:message key="yes"/>
</html:option>
<html:option value="false">
<bean:message key="no"/>
</html:option>
</html:select>
</td>
</tr>
</baco:isAdmin>
<tr>
<th>
<bean:message key="announcement.courseunit.internal"/>
*
</th>
<td>
<html:select property="announcementView.courseUnitInternal">
<html:option value="true" key="announcement.internal.yes"></html:option>
<html:option value="false" key="announcement.internal.no"></html:option>
</html:select>
</td>
</tr>
<tr>
<th>
<bean:message key="announcement.title"/>
*
</th>
<td>
<html:text styleClass="text" property="announcementView.title" maxlength="250"/>
</td>
</tr>
<tr>
<th>
<bean:message key="announcement.text"/>
*
</th>
<td>
<html:textarea styleClass="textarea" property="announcementView.text"/>
</td>
</tr>
<tr class="buttons">
<td colspan="2">
<input type="button"
onclick="set(this.form,'save');this.form.submit()"
value="<bean:message key="confirm"/>"/>
</td>
</tr>
</table>
</html:form>
</div>
</div>
Generated by GNU Enscript 1.6.5.2.