Subversion Repositories DevTools

Rev

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