Subversion Repositories DevTools

Rev

Rev 5635 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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