Project

General

Profile

1 6568 thanos.pap
<%@ taglib prefix="s" uri="/struts-tags"%>
2
<%@ page contentType="text/html; charset=UTF-8"%>
3 7783 natalia.ma
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 6568 thanos.pap
	<head>
7
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 7672 thanos.pap
		<title>DRIVER Communities</title>
9 13398 katerina.i
		<link href='<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/<s:property value="#application['webInterfaceLayoutManager'].cssFileName" />' rel="stylesheet" type="text/css" />
10
		<link href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/SimpleTabs.css" rel="stylesheet" type="text/css" />
11
		<link rel="shortcut icon" href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/favicon.ico" />
12 7672 thanos.pap
		<!-- MB - ADD mootools here: new version -->
13 13398 katerina.i
		<script type="text/javascript" src='<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3-core.js'></script>
14
		<script type="text/javascript" src='<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3.1-more.js'></script>
15 7783 natalia.ma
16 6568 thanos.pap
		<script type="text/javascript" language="javascript">
17 7672 thanos.pap
						function checkAdd() {
18 6568 thanos.pap
				var title = document.getElementById('addCommunityAnnouncementActionTitle');
19
				var expirationDate = document.getElementById('addCommunityAnnouncementActionExpirationDate');
20
				var content = document.getElementById('addCommunityAnnouncementActionContent');
21
				if ((title.value == null) || (title.value == '')) {
22
					alert('Please enter a title');
23
					title.focus();
24
					return false;
25
				}
26
				var date = expirationDate.value;
27
				if ((date == null) || (date == '')) {
28
					alert('Please enter a valid expiration date');
29
					expirationDate.focus();
30
					return false;
31
				}
32
				if (!(new RegExp("\\d\\d?/\\d\\d?/\\d{2,4}").test(date))) {
33
					alert('Please enter a valid expiration date');
34
					expirationDate.focus();
35
					return false;
36
				}
37
				var dateTokens = date.split("/");
38 7803 thanos.pap
				var day = parseInt(dateTokens[0]);
39
				var month = parseInt(dateTokens[1]);
40 6568 thanos.pap
				var year = parseInt(dateTokens[2]);
41
				if ((year < 1) || (month < 1) || (month > 12) || (day < 1) || (day > 31) ||
42
						(((month == 4) || (month == 6) || (month == 9) || (month == 11)) && (day > 30)) || ((month == 2) && (day > 29)) ||
43
						((((year % 4 != 0) || (year % 100 == 0)) && (year % 400 != 0)) && (month == 2) && (day > 28))) {
44
					alert('Please enter a valid expiration date');
45
					expirationDate.focus();
46
					return false;
47
				}
48
				if (new Date(year, month, day).getTime() <= new Date().getTime()) {
49
					alert('Please enter a valid expiration date');
50
					expirationDate.focus();
51
					return false;
52
				}
53
				if ((content.value == null) || (content.value == '')) {
54
					alert('Please enter content');
55
					content.focus();
56
					return false;
57
				}
58 7803 thanos.pap
				expirationDate.value = month + '/' + day + '/' + year;
59 6568 thanos.pap
				return true;
60
			}
61
62
			function resetAdd() {
63
				var title = document.getElementById('addCommunityAnnouncementActionTitle');
64
				var expirationDate = document.getElementById('addCommunityAnnouncementActionExpirationDate');
65
				var content = document.getElementById('addCommunityAnnouncementActionContent');
66
				title.value = '';
67
				expirationDate.value = '';
68
				content.value = '';
69
				title.focus();
70 7672 thanos.pap
				return false;
71 7919 thanos.pap
			}
72
73
			function checkMaxLength(maxLength) {
74
				var content = document.getElementById('addCommunityAnnouncementActionContent');
75
				if (content.value.length > maxLength)
76
					content.value = content.value.substring(0, maxLength);
77
			}
78 6568 thanos.pap
		</script>
79
	</head>
80 7779 thanos.pap
	<body>
81 6568 thanos.pap
		<div id="center">
82
			<div id="wrapper">
83 7399 katerina.i
				<div class="wrapper_shadowleft">
84
					<div class="wrapper_shadowright">
85 6568 thanos.pap
						<div id="container">
86
							<jsp:include page="/pages/banner.jsp" />
87 7672 thanos.pap
							<jsp:include page="/pages/menu.jsp" />
88
							<p class="clear" />
89 7783 natalia.ma
							<div id="leftcolumn">
90 7672 thanos.pap
								<b class="curved_top">
91
									<b class="curved_t1"></b>
92
									<b class="curved_t2"></b>
93
									<b class="curved_t3"></b>
94
									<b class="curved_t4"></b>
95
								</b>
96 7783 natalia.ma
                                 <div class="curved_container clearfix">
97
                                    <div class="featured_top leftcolumn_top">Communities</div>
98
                                    <s:if test="%{displayMyDriverMenu}">
99
                                        <jsp:include page="/pages/community/myCommunitiesMenu.jsp" />
100
                                    </s:if>
101
                                    <s:else>
102
                                        <s:set name="action" value="%{'ViewCommunity.action'}"/>
103
                                        <jsp:include page="/pages/community/allCommunitiesMenu.jsp" />
104
                                    </s:else>
105
                                 </div>
106 7672 thanos.pap
								<b class="curved_bottom">
107
									<b class="curved_b4"></b>
108
									<b class="curved_b3"></b>
109
									<b class="curved_b2"></b>
110
									<b class="curved_b1"></b>
111
								</b>
112 6568 thanos.pap
							</div>
113 7672 thanos.pap
							<div id="maincolumn2">
114 7783 natalia.ma
                            	<div id="communityPage">
115 7672 thanos.pap
								<b class="curved_top">
116
									<b class="curved_t1"></b>
117
									<b class="curved_t2"></b>
118
									<b class="curved_t3"></b>
119
									<b class="curved_t4"></b>
120
								</b>
121
								<div class="curved_container clearfix">
122 7783 natalia.ma
									<div class="featured_top communityPage_top">
123 13398 katerina.i
										<img src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/icons.communities.png" alt="DRIVER Communities" width="16" height="16" class="absmiddle" />
124 7672 thanos.pap
										&nbsp;
125
										<a href="ViewCommunity.action?communityId=<s:property value="communityId" /><s:if test="%{displayMyDriverMenu}">&amp;displayMyDriverMenu=true</s:if><s:if test="%{initialLetter != null}">&amp;initialLetter=<s:property value="initialLetter" /></s:if>">
126
											<s:property value="community.name" />
127
										</a>
128 6568 thanos.pap
									</div>
129 7783 natalia.ma
                                    <s:set name="selectedTab" value="%{1}"/>
130 7672 thanos.pap
									<jsp:include page="/pages/community/tabsMenu.jsp" />
131
									<div class="tab-wrapper clearfix">
132 7783 natalia.ma
                                    	<div class="communitySubmenu">
133
                                            Add community announcement
134
                                        </div>
135 7672 thanos.pap
										<div class="mydriveritem col1">
136 7783 natalia.ma
137
											<form id="addCommunityAnnouncementAction" onSubmit="return checkAdd();" onReset="return resetAdd();" action="AddCommunityAnnouncement2.action" method="POST">
138 7672 thanos.pap
												<input type="hidden" id="addCommunityAnnouncementActionCommunityId" name="communityId" value="<s:property value="communityId" />" />
139 7783 natalia.ma
												<div class="communityField">
140
                                                	<span class="communityFieldNm">Title</span>
141
                                                </div>
142
												<div class="communityField">
143 7919 thanos.pap
													<input type="text" name="title" value="" id="addCommunityAnnouncementActionTitle" maxlength="<s:property value="smallFieldLength" />" size="<s:property value="mediumFieldLength" />" />
144
													(max <s:property value="smallFieldLength" /> chars)
145 7672 thanos.pap
												</div>
146 7783 natalia.ma
												<div class="communityField">
147 7803 thanos.pap
                                                	<span class="communityFieldNm">Expiration Date (d/m/y)</span>
148 7783 natalia.ma
                                                </div>
149
												<div class="communityField">
150 7919 thanos.pap
													<input type="text" name="expirationDate" id="addCommunityAnnouncementActionExpirationDate" maxlength="10" size="10" />
151 7672 thanos.pap
												</div>
152 7783 natalia.ma
												<div class="communityField">
153
                                                	<span class="communityFieldNm">Content</span>
154 7919 thanos.pap
                                                	(max <s:property value="largeFieldLength" /> chars)
155 7783 natalia.ma
                                                 </div>
156
												<div class="communityField">
157 7919 thanos.pap
													<textarea id="addCommunityAnnouncementActionContent" name="content" cols="60" rows="5" onkeyup="checkMaxLength(<s:property value="largeFieldLength" />);"></textarea>
158 7672 thanos.pap
												</div>
159 7783 natalia.ma
												<div class="communityField">
160
													<input type="submit" id="addCommunityAnnouncementActionAdd" value="Add" />
161
													<input type="reset" id="addCommunityAnnouncementActionReset" value="Reset" />
162 7672 thanos.pap
												</div>
163
											</form>
164 6568 thanos.pap
										</div>
165
									</div>
166
								</div>
167 7672 thanos.pap
								<b class="curved_bottom">
168
									<b class="curved_b4"></b>
169
									<b class="curved_b3"></b>
170
									<b class="curved_b2"></b>
171
									<b class="curved_b1"></b>
172
								</b>
173 6568 thanos.pap
							</div>
174 7783 natalia.ma
							<div id="footer">
175 12995 katerina.i
                                <s:action name="FooterPage" executeResult="true"/>
176 7783 natalia.ma
                            </div>
177 6568 thanos.pap
						</div>
178
					</div>
179
				</div>
180
			</div>
181
		</div>
182
	</body>
183 12963 antonis.le
</html>