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