| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
Option explicit
|
|
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
|
|
8 |
' EDIT Scheduled Task
|
|
|
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<!--#include file="common/conf.asp"-->
|
|
|
12 |
<!--#include file="common/globals.asp"-->
|
|
|
13 |
<!--#include file="common/qstr.asp"-->
|
|
|
14 |
<!--#include file="common/common_subs.asp"-->
|
|
|
15 |
<!--#include file="common/formating.asp"-->
|
|
|
16 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
17 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
18 |
<%
|
|
|
19 |
'------------ ACCESS CONTROL ------------------
|
|
|
20 |
%>
|
|
|
21 |
<!--#include file="_access_control_login.asp"-->
|
|
|
22 |
<!--#include file="_access_control_general.asp"-->
|
|
|
23 |
<%
|
|
|
24 |
'------------ Variable Definition -------------
|
|
|
25 |
Dim rsTemp
|
|
|
26 |
'------------ Constants Declaration -----------
|
|
|
27 |
'------------ Variable Init -------------------
|
|
|
28 |
'----------------------------------------------
|
|
|
29 |
%>
|
|
|
30 |
<%
|
|
|
31 |
Function Update_Scheduling_Message( SSmsg_id, SSmsg, SSduedate )
|
|
|
32 |
objEH.TryORA ( OraSession )
|
|
|
33 |
On Error Resume Next
|
|
|
34 |
OraDatabase.ExecuteSQL _
|
|
|
35 |
" UPDATE message_board"&_
|
|
|
36 |
" SET msg_details = '"& SSmsg &"', due_date = "& TO_ORADATE( SSduedate ) &_
|
|
|
37 |
" WHERE msg_id = "& SSmsg_id
|
|
|
38 |
objEH.CatchORA ( OraSession )
|
|
|
39 |
End Function
|
|
|
40 |
|
|
|
41 |
Function Delete_Scheduling_Message( SSmsg_id )
|
|
|
42 |
objEH.TryORA ( OraSession )
|
|
|
43 |
On Error Resume Next
|
|
|
44 |
OraDatabase.ExecuteSQL _
|
|
|
45 |
" DELETE message_board"&_
|
|
|
46 |
" WHERE msg_id = "& SSmsg_id
|
|
|
47 |
objEH.CatchORA ( OraSession )
|
|
|
48 |
End Function
|
|
|
49 |
|
|
|
50 |
Function Get_Message_Details ( NNmsg_id )
|
|
|
51 |
Get_Message_Details = _
|
|
|
52 |
" SELECT * FROM message_board WHERE msg_id = "& NNmsg_id
|
|
|
53 |
End Function
|
|
|
54 |
%>
|
|
|
55 |
<%
|
|
|
56 |
'Process submition
|
|
|
57 |
If CBool(QStrPar("action")) AND QStrPar("btn") = "Update" Then
|
| 5635 |
dpurdie |
58 |
Call Update_Scheduling_Message ( QStrPar("FRmsg_id"), QStrPar("FRmsg"), QStrPar("FRduedate") )
|
|
|
59 |
ReloadParentWindow()
|
|
|
60 |
Response.End
|
| 5357 |
dpurdie |
61 |
ElseIf CBool(QStrPar("action")) AND QStrPar("btn") = "Delete" AND objAccessControl.UserLogedIn Then
|
| 5635 |
dpurdie |
62 |
Call Delete_Scheduling_Message ( QStrPar("FRmsg_id") )
|
|
|
63 |
ReloadParentWindow()
|
|
|
64 |
Response.End
|
| 5357 |
dpurdie |
65 |
End If
|
|
|
66 |
%>
|
|
|
67 |
<html>
|
|
|
68 |
<head>
|
|
|
69 |
<title>Release Manager</title>
|
|
|
70 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
71 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
72 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
73 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
74 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
75 |
<script language="JavaScript" src="images/common.js"></script>
|
| 5635 |
dpurdie |
76 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
77 |
<script language="JavaScript">
|
|
|
78 |
$(document).ready(function(){
|
|
|
79 |
$("#dateInput").datepicker({
|
|
|
80 |
constrainInput: true,
|
|
|
81 |
showOn: 'both',
|
|
|
82 |
buttonImageOnly : true,
|
|
|
83 |
buttonImage: "images/i_calendar.gif",
|
|
|
84 |
buttonText: "Select Date",
|
|
|
85 |
dateFormat : "D dd-M-yy",
|
|
|
86 |
minDate : 1,
|
|
|
87 |
changeYear : true,
|
|
|
88 |
yearRange : "0000:2099",
|
|
|
89 |
changeMonth: true
|
|
|
90 |
});
|
|
|
91 |
|
|
|
92 |
checkText();
|
|
|
93 |
})
|
|
|
94 |
|
|
|
95 |
// Before we submit the form
|
|
|
96 |
// Grab the date and insert into a hidden field in a controlled format
|
|
|
97 |
function submitCheck()
|
|
|
98 |
{
|
|
|
99 |
var edate = $("#dateInput").val()
|
|
|
100 |
//console.log("edate",edate);
|
|
|
101 |
|
|
|
102 |
var d4 = $("#dateInput").datepicker("getDate");
|
|
|
103 |
var d6 = $.datepicker.formatDate("dd/M/yy", new Date(d4));
|
|
|
104 |
$("#FRduedate").val(d6);
|
|
|
105 |
//console.log ("Get:", d4, d6);
|
|
|
106 |
|
|
|
107 |
return true;
|
|
|
108 |
}
|
|
|
109 |
// Update the Submit(Add) button based on the number of chars in the TextArea
|
|
|
110 |
function checkText()
|
|
|
111 |
{
|
|
|
112 |
var count = ($("#textArea").val().length > 10);
|
|
|
113 |
var but = $("#formSubmit");
|
|
|
114 |
but.toggleClass("form_btn_comp", count);
|
|
|
115 |
but.toggleClass("form_btn_comp_disabled", !count);
|
|
|
116 |
but.prop("disabled", !count );
|
|
|
117 |
}
|
|
|
118 |
</script>
|
| 5357 |
dpurdie |
119 |
</head>
|
|
|
120 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.scheduletask.FRmsg.focus();">
|
|
|
121 |
<%Set rsTemp = OraDatabase.DbCreateDynaset( Get_Message_Details (QStrPar("FRmsg_id")), cint(0))%>
|
| 5635 |
dpurdie |
122 |
<form class="form_tight" name="scheduletask" method="post" action="<%=scriptName%>?done=done<%=QSTR_FullQuery%>">
|
| 5590 |
dpurdie |
123 |
<table border="0" cellspacing="0" cellpadding="2">
|
|
|
124 |
<tr>
|
|
|
125 |
<td valign="top" nowrap colspan="2" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
|
|
126 |
<table border="0" cellspacing="1" cellpadding="2">
|
|
|
127 |
<tr>
|
|
|
128 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Due Date </td>
|
|
|
129 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
|
| 5635 |
dpurdie |
130 |
<input type="text" maxlength="15" size="15" class="form_item" value="<%=DisplayDate (rsTemp.Fields("due_date"))%>" id="dateInput" xxdisabled="disabled">
|
|
|
131 |
</td>
|
|
|
132 |
</tr>
|
|
|
133 |
<tr>
|
|
|
134 |
<td colspan="2" nowrap class="form_field" background="images/bg_form_lightbluedark.gif" valign="top">
|
|
|
135 |
<textarea name="FRmsg" cols="80" rows="12" class="form_item" oninput="checkText()" id="textArea"><%=rsTemp.Fields("msg_details")%></textarea>
|
|
|
136 |
<input type="hidden" name="action" value="true">
|
|
|
137 |
</td>
|
|
|
138 |
</tr>
|
|
|
139 |
</table>
|
| 5357 |
dpurdie |
140 |
</td>
|
|
|
141 |
</tr>
|
|
|
142 |
<tr>
|
| 5590 |
dpurdie |
143 |
<td align="right">
|
| 5635 |
dpurdie |
144 |
<input type="submit" name="btn" value="Update" class="form_btn_comp" id="formSubmit" onClick="return submitCheck();">
|
| 5590 |
dpurdie |
145 |
<input type="submit" name="btn" value="Delete" class="form_btn_comp" onClick="clickedButton=true;">
|
| 5635 |
dpurdie |
146 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
|
|
|
147 |
<input type="hidden" name="FRduedate" value="" id="FRduedate">
|
| 5590 |
dpurdie |
148 |
</td>
|
| 5357 |
dpurdie |
149 |
</tr>
|
|
|
150 |
</table>
|
|
|
151 |
</form>
|
|
|
152 |
</body>
|
|
|
153 |
</html>
|
|
|
154 |
|
|
|
155 |
<!-- DESTRUCTOR ------->
|
|
|
156 |
<!--#include file="common/destructor.asp"-->
|