Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0   ' always load the page, dont store
%>
<%
'=====================================================
'               Schedule a Task
'               _wform_schedule_add.asp
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
'----------------------------------------------
%>
<%
Function Insert_Scheduling_Message( SSmsg, SSduedate )
   Dim SEQ_msg_id
   SEQ_msg_id = Get_From_DUAL("SEQ_MSG_ID.nextval")

   objEH.TryORA ( OraSession )
   On Error Resume Next

   OraDatabase.ExecuteSQL _
      " INSERT INTO message_board (msg_id, msg_details, submition_date, due_date)"&_
      " VALUES ("& SEQ_msg_id &", '"& SSmsg &"', "& ORA_SYSDATE &","& TO_ORADATE( SSduedate ) &")"
   objEH.CatchORA ( OraSession )
End Function
%>
<%
'Process submition
If CBool(QStrPar("action")) AND  objAccessControl.UserLogedIn  Then
   Call Insert_Scheduling_Message ( QStrPar("FRmsg"), QStrPar("FRduedate") )
      ReloadParentWindow()
      Response.End
End If
%>
<html>
<head>
<title>Release Manager</title>
<link rel="shortcut icon" href="<%=FavIcon%>"/>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
<link rel="stylesheet" href="images/navigation.css" type="text/css">
<script language="JavaScript" src="images/common.js"></script>
<!--#include file="_jquery_includes.asp"-->
<script language="JavaScript">
    $(document).ready(function(){
        $("#dateInput").datepicker({
            constrainInput: true,
            showOn: 'both',
            buttonImageOnly : true,
            buttonImage: "images/i_calendar.gif",
            buttonText: "Select Date",
            dateFormat : "D dd-M-yy",
            minDate : 1,
            changeYear : true, 
            yearRange : "0000:2099",
            changeMonth: true
        });

        checkText();
    })

    // Before we submit the form
    // Grab the date and insert into a hidden field in a controlled format
    function submitCheck()
    {
        var edate = $("#dateInput").val()
        //console.log("edate",edate);

        var d4 = $("#dateInput").datepicker("getDate");
        var d6 = $.datepicker.formatDate("dd/M/yy", new Date(d4));
        $("#FRduedate").val(d6);
        //console.log ("Get:", d4, d6);

        return true;
    }
    // Update the Submit(Add) button based on the number of chars in the TextArea
    function checkText()
    {
       var count = ($("#textArea").val().length > 10);
       var but = $("#formSubmit");
       but.toggleClass("form_btn_comp", count);
       but.toggleClass("form_btn_comp_disabled", !count);
       but.prop("disabled", !count );
    }
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.scheduletask.FRmsg.focus();">
<form class="form_tight" name="scheduletask" method="post" action="<%=scriptName%>?done=done<%=QSTR_FullQuery%>">
  <table border="0" cellspacing="0" cellpadding="2">
    <tr>
      <td valign="top" nowrap colspan="2" class="wform_ttl" background="images/bg_form_lightgray.gif">
        <table border="0" cellspacing="1" cellpadding="2">
          <tr>
               <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Due Date </td>
                <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
                  <input type="text" maxlength="15" size="15" class="form_item" value="<%=DisplayDate(Date+7)%>" id="dateInput" xxdisabled="disabled">
               </td>
            </tr>
            <tr>
               <td colspan="2" nowrap class="form_field" background="images/bg_form_lightbluedark.gif" valign="top">
                    <textarea name="FRmsg" cols="80" rows="12" class="form_item" oninput="checkText()" id="textArea"></textarea>
                    <input type="hidden" name="action" value="true">
               </td>
            </tr>
         </table>
         </td>
      </tr>
      <tr>
      <td align="right">
        <input type="submit" name="btn" value="Add" class="form_btn_comp" id="formSubmit" onClick="return submitCheck();">
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
        <input type="hidden" name="FRduedate" value="" id="FRduedate">
      </td>
      </tr>
   </table>
</form>
</body>
</html>


<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->