Subversion Repositories DevTools

Rev

Rev 5590 | Rev 5957 | 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()
49
      Response.End
5357 dpurdie 50
End If
51
%>
52
<html>
53
<head>
54
<title>Release Manager</title>
55
<link rel="shortcut icon" href="<%=FavIcon%>"/>
56
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
57
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
58
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
59
<link rel="stylesheet" href="images/navigation.css" type="text/css">
60
<script language="JavaScript" src="images/common.js"></script>
5635 dpurdie 61
<!--#include file="_jquery_includes.asp"-->
62
<script language="JavaScript">
63
    $(document).ready(function(){
64
        $("#dateInput").datepicker({
65
            constrainInput: true,
66
            showOn: 'both',
67
            buttonImageOnly : true,
68
            buttonImage: "images/i_calendar.gif",
69
            buttonText: "Select Date",
70
            dateFormat : "D dd-M-yy",
71
            minDate : 1,
72
            changeYear : true, 
73
            yearRange : "0000:2099",
74
            changeMonth: true
75
        });
76
 
77
        checkText();
78
    })
79
 
80
    // Before we submit the form
81
    // Grab the date and insert into a hidden field in a controlled format
82
    function submitCheck()
83
    {
84
        var edate = $("#dateInput").val()
85
        //console.log("edate",edate);
86
 
87
        var d4 = $("#dateInput").datepicker("getDate");
88
        var d6 = $.datepicker.formatDate("dd/M/yy", new Date(d4));
89
        $("#FRduedate").val(d6);
90
        //console.log ("Get:", d4, d6);
91
 
92
        return true;
93
    }
94
    // Update the Submit(Add) button based on the number of chars in the TextArea
95
    function checkText()
96
    {
97
       var count = ($("#textArea").val().length > 10);
98
       var but = $("#formSubmit");
99
       but.toggleClass("form_btn_comp", count);
100
       but.toggleClass("form_btn_comp_disabled", !count);
101
       but.prop("disabled", !count );
102
    }
103
</script>
5357 dpurdie 104
</head>
105
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.scheduletask.FRmsg.focus();">
5635 dpurdie 106
<form class="form_tight" name="scheduletask" method="post" action="<%=scriptName%>?done=done<%=QSTR_FullQuery%>">
5590 dpurdie 107
  <table border="0" cellspacing="0" cellpadding="2">
108
    <tr>
109
      <td valign="top" nowrap colspan="2" class="wform_ttl" background="images/bg_form_lightgray.gif">
110
        <table border="0" cellspacing="1" cellpadding="2">
111
          <tr>
112
               <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Due Date </td>
5635 dpurdie 113
                <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
114
                  <input type="text" maxlength="15" size="15" class="form_item" value="<%=DisplayDate(Date+7)%>" id="dateInput" xxdisabled="disabled">
5357 dpurdie 115
               </td>
116
            </tr>
117
            <tr>
118
               <td colspan="2" nowrap class="form_field" background="images/bg_form_lightbluedark.gif" valign="top">
5635 dpurdie 119
                    <textarea name="FRmsg" cols="80" rows="12" class="form_item" oninput="checkText()" id="textArea"></textarea>
120
                    <input type="hidden" name="action" value="true">
5357 dpurdie 121
               </td>
122
            </tr>
123
         </table>
124
         </td>
125
      </tr>
126
      <tr>
5590 dpurdie 127
      <td align="right">
5635 dpurdie 128
        <input type="submit" name="btn" value="Add" class="form_btn_comp" id="formSubmit" onClick="return submitCheck();">
5590 dpurdie 129
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
5635 dpurdie 130
        <input type="hidden" name="FRduedate" value="" id="FRduedate">
5590 dpurdie 131
      </td>
5357 dpurdie 132
      </tr>
133
   </table>
134
</form>
135
</body>
136
</html>
137
 
138
 
139
<!-- DESTRUCTOR ------->
140
<!--#include file="common/destructor.asp"-->