forked from joedanz/cf-project-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectNotify.cfm
307 lines (280 loc) · 15.1 KB
/
projectNotify.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<cfsetting enablecfoutputonly="true">
<cfprocessingdirective pageencoding="utf-8">
<cfif StructKeyExists(form,"submit")>
<cfparam name="form.email_file_new" default="0">
<cfparam name="form.mobile_file_new" default="0">
<cfparam name="form.email_file_upd" default="0">
<cfparam name="form.mobile_file_upd" default="0">
<cfparam name="form.email_file_com" default="0">
<cfparam name="form.mobile_file_com" default="0">
<cfparam name="form.email_issue_new" default="0">
<cfparam name="form.mobile_issue_new" default="0">
<cfparam name="form.email_issue_upd" default="0">
<cfparam name="form.mobile_issue_upd" default="0">
<cfparam name="form.email_issue_com" default="0">
<cfparam name="form.mobile_issue_com" default="0">
<cfparam name="form.email_msg_new" default="0">
<cfparam name="form.mobile_msg_new" default="0">
<cfparam name="form.email_msg_upd" default="0">
<cfparam name="form.mobile_msg_upd" default="0">
<cfparam name="form.email_msg_com" default="0">
<cfparam name="form.mobile_msg_com" default="0">
<cfparam name="form.email_mstone_new" default="0">
<cfparam name="form.mobile_mstone_new" default="0">
<cfparam name="form.email_mstone_upd" default="0">
<cfparam name="form.mobile_mstone_upd" default="0">
<cfparam name="form.email_mstone_com" default="0">
<cfparam name="form.mobile_mstone_com" default="0">
<cfparam name="form.email_todo_new" default="0">
<cfparam name="form.mobile_todo_new" default="0">
<cfparam name="form.email_todo_upd" default="0">
<cfparam name="form.mobile_todo_upd" default="0">
<cfparam name="form.email_todo_del" default="0">
<cfparam name="form.mobile_todo_del" default="0">
<cfparam name="form.email_todo_cmp" default="0">
<cfparam name="form.mobile_todo_cmp" default="0">
<cfparam name="form.email_todo_com" default="0">
<cfparam name="form.mobile_todo_com" default="0">
<cfparam name="form.email_time_new" default="0">
<cfparam name="form.mobile_time_new" default="0">
<cfparam name="form.email_time_upd" default="0">
<cfparam name="form.mobile_time_upd" default="0">
<cfparam name="form.email_bill_new" default="0">
<cfparam name="form.mobile_bill_new" default="0">
<cfparam name="form.email_bill_upd" default="0">
<cfparam name="form.mobile_bill_upd" default="0">
<cfparam name="form.email_bill_paid" default="0">
<cfparam name="form.mobile_bill_paid" default="0">
<cfset application.notify.update(session.user.userID,url.p,form.email_file_new,form.mobile_file_new,form.email_file_upd,form.mobile_file_upd,form.email_file_com,form.mobile_file_com,form.email_issue_new,form.mobile_issue_new,form.email_issue_upd,form.mobile_issue_upd,form.email_issue_com,form.mobile_issue_com,form.email_msg_new,form.mobile_msg_new,form.email_msg_upd,form.mobile_msg_upd,form.email_msg_com,form.mobile_msg_com,form.email_mstone_new,form.mobile_mstone_new,form.email_mstone_upd,form.mobile_mstone_upd,form.email_mstone_com,form.mobile_mstone_com,form.email_todo_new,form.mobile_todo_new,form.email_todo_upd,form.mobile_todo_upd,form.email_todo_del,form.mobile_todo_del,form.email_todo_cmp,form.mobile_todo_cmp,form.email_todo_com,form.mobile_todo_com,form.email_time_new,form.mobile_time_new,form.email_time_upd,form.mobile_time_upd,form.email_bill_new,form.mobile_bill_new,form.email_bill_upd,form.mobile_bill_upd,form.email_bill_paid,form.mobile_bill_paid)>
<cflocation url="account.cfm##projects" addtoken="false">
</cfif>
<cfparam name="form.admin" default="0">
<cfset user = application.project.userNotify(userID=session.user.userid,projectID=url.p)>
<!--- Loads header/footer --->
<cfmodule template="#application.settings.mapping#/tags/layout.cfm" templatename="main" title="#application.settings.app_title# » Admin">
<cfoutput>
<div id="container">
<!--- left column --->
<div class="left medium">
<div class="main">
<div class="header">
<h2 class="admin">My Notifications : #user.name#</h2>
</div>
<div class="content">
<div class="wrapper">
<cfif not isNumeric(user.mobile)>
<h5 class="b r i mb10">Note: User must have a valid mobile number to enable Mobile Notifications.</h5>
</cfif>
<form action="#cgi.script_name#?#cgi.query_string#" method="post" class="frm">
<table class="notifylist">
<tr valign="top"><td width="50%">
<table class="perms full mb10">
<thead>
<tr>
<th class="b">Files</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New file</td>
<td class="tac"><input type="checkbox" name="email_file_new" value="1"<cfif user.email_file_new eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_file_new" value="1"<cfif user.mobile_file_new eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Updated file</td>
<td class="tac"><input type="checkbox" name="email_file_upd" value="1"<cfif user.email_file_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_file_upd" value="1"<cfif user.mobile_file_upd eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Comment on file</td>
<td class="tac"><input type="checkbox" name="email_file_com" value="1"<cfif user.email_file_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_file_com" value="1"<cfif user.mobile_file_upd eq 1> checked="checked"</cfif> /></td>
</tr>
</tbody>
</table>
<table class="perms full mb10">
<thead>
<tr>
<th class="b">Issues</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New issue</td>
<td class="tac"><input type="checkbox" name="email_issue_new" value="1"<cfif user.email_issue_new eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_issue_new" value="1"<cfif user.mobile_issue_new eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Updated issue</td>
<td class="tac"><input type="checkbox" name="email_issue_upd" value="1"<cfif user.email_issue_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_issue_upd" value="1"<cfif user.mobile_issue_upd eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Comment on issue</td>
<td class="tac"><input type="checkbox" name="email_issue_com" value="1"<cfif user.email_issue_com eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_issue_com" value="1"<cfif user.mobile_issue_com eq 1> checked="checked"</cfif> /></td>
</tr>
</tbody>
</table>
<table class="perms full mb10">
<thead>
<tr>
<th class="b">Messages</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New message</td>
<td class="tac"><input type="checkbox" name="email_msg_new" value="1"<cfif user.email_msg_new eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_msg_new" value="1"<cfif user.mobile_msg_new eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Updated message</td>
<td class="tac"><input type="checkbox" name="email_msg_upd" value="1"<cfif user.email_msg_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_msg_upd" value="1"<cfif user.mobile_msg_upd eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Comment on message</td>
<td class="tac"><input type="checkbox" name="email_msg_com" value="1"<cfif user.email_msg_com eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_msg_com" value="1"<cfif user.mobile_msg_com eq 1> checked="checked"</cfif> /></td>
</tr>
</tbody>
</table>
<table class="perms full mb10">
<thead>
<tr>
<th class="b">Milestones</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New milestone</td>
<td class="tac"><input type="checkbox" name="email_mstone_new" value="1"<cfif user.email_mstone_new eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_mstone_new" value="1"<cfif user.mobile_mstone_new eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Updated milestone</td>
<td class="tac"><input type="checkbox" name="email_mstone_upd" value="1"<cfif user.email_mstone_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_mstone_upd" value="1"<cfif user.mobile_mstone_upd eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Comment on milestone</td>
<td class="tac"><input type="checkbox" name="email_mstone_com" value="1"<cfif user.email_mstone_com eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_mstone_com" value="1"<cfif user.mobile_mstone_com eq 1> checked="checked"</cfif> /></td>
</tr>
</tbody>
</table>
</td><td width="50%">
<table class="perms full mb10">
<thead>
<tr>
<th class="b">To-Dos</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New to-do item</td>
<td class="tac"><input type="checkbox" name="email_todo_new" value="1"<cfif user.email_todo_new eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_todo_new" value="1"<cfif user.mobile_todo_new eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Updated to-do item</td>
<td class="tac"><input type="checkbox" name="email_todo_upd" value="1"<cfif user.email_todo_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_todo_upd" value="1"<cfif user.mobile_todo_upd eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Deleted to-do item</td>
<td class="tac"><input type="checkbox" name="email_todo_del" value="1"<cfif user.email_todo_del eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_todo_del" value="1"<cfif user.mobile_todo_del eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Completed to-do item</td>
<td class="tac"><input type="checkbox" name="email_todo_cmp" value="1"<cfif user.email_todo_cmp eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_todo_cmp" value="1"<cfif user.mobile_todo_cmp eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Comment on to-do item</td>
<td class="tac"><input type="checkbox" name="email_todo_com" value="1"<cfif user.email_todo_com eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_todo_com" value="1"<cfif user.mobile_todo_com eq 1> checked="checked"</cfif> /></td>
</tr>
</tbody>
</table>
<table class="perms full mb10">
<thead>
<tr>
<th class="b">Time Tracking</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New time tracking item</td>
<td class="tac"><input type="checkbox" name="email_time_new" value="1"<cfif user.email_time_new eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_time_new" value="1"<cfif user.mobile_time_new eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Updated time tracking</td>
<td class="tac"><input type="checkbox" name="email_time_upd" value="1"<cfif user.email_time_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_time_upd" value="1"<cfif user.mobile_time_upd eq 1> checked="checked"</cfif> /></td>
</tr>
</tbody>
</table>
<table class="perms full mb10">
<thead>
<tr>
<th class="b">Billing</th>
<th class="tac"><img src="./images/email.png" height="16" width="16" border="0" alt="Email Notifications" /></th>
<th class="tac"><img src="./images/phone.png" height="16" width="16" border="0" alt="Mobile Notifications" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>New billing item</td>
<td class="tac"><input type="checkbox" name="email_bill_new" value="1"<cfif user.email_bill_new eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_bill_new" value="1"<cfif user.mobile_bill_new eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Updated billing item</td>
<td class="tac"><input type="checkbox" name="email_bill_upd" value="1"<cfif user.email_bill_upd eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_bill_upd" value="1"<cfif user.mobile_bill_upd eq 1> checked="checked"</cfif> /></td>
</tr>
<tr>
<td>Billing item marked paid</td>
<td class="tac"><input type="checkbox" name="email_bill_paid" value="1"<cfif user.email_bill_paid eq 1> checked="checked"</cfif> /></td>
<td class="tac"><input type="checkbox" name="mobile_bill_paid" value="1"<cfif user.mobile_bill_paid eq 1> checked="checked"</cfif> /></td>
</tr>
</tbody>
</table>
</td></tr>
</table>
<p>
<input type="submit" name="submit" value="Update Notifications" class="button shorter" />
or <a href="account.cfm?##projects">Cancel</a>
</p>
</form>
</div>
</div>
</div>
<div class="bottom"> </div>
<div class="footer">
<cfinclude template="#application.settings.mapping#/footer.cfm">
</div>
</div>
<!--- right column --->
<div class="right">
</div>
</div>
</cfoutput>
</cfmodule>
<cfsetting enablecfoutputonly="false">