git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
640
Data/BulkLoad/EFT/Nominations/plsql/efnow100$js$usem.bdy
Normal file
640
Data/BulkLoad/EFT/Nominations/plsql/efnow100$js$usem.bdy
Normal file
@@ -0,0 +1,640 @@
|
||||
create or replace package body efnow100$js$usem is
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: efnow100$js$usem.CreateViewJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateViewJavaScript(
|
||||
VF_ROWS_UPDATED in integer,
|
||||
VF_ROWS_DELETED in integer,
|
||||
VF_ROWS_ERROR in integer,
|
||||
VF_BODY_ATTRIBUTES in varchar2,
|
||||
IF_ROWS_INSERTED in integer,
|
||||
IF_ROWS_ERROR in integer,
|
||||
RL_REQUERY_BUT_ACTION in varchar2,
|
||||
LOV_FRAME in varchar2) is
|
||||
begin
|
||||
if not caco_security.security_check('efnow100$usem') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var index = 0;');
|
||||
if IF_ROWS_INSERTED > 0 then
|
||||
htp.p( 'var DataChange = true;' );
|
||||
else
|
||||
htp.p( 'var DataChange = false;' );
|
||||
end if;
|
||||
if IF_ROWS_ERROR > 0 then
|
||||
htp.p( 'var DataChangeErrors = true;' );
|
||||
else
|
||||
htp.p( 'var DataChangeErrors = false;' );
|
||||
end if;
|
||||
|
||||
if to_char(efnow100$syus.CURR_VAL.SYUS_ID) is not null then
|
||||
htp.p( 'var P_SYUS_ID = new Array();' );
|
||||
htp.p( 'P_SYUS_ID[0] = "' || WSGL.EscapeURLParam(to_char(efnow100$syus.CURR_VAL.SYUS_ID)) || '";' );
|
||||
end if;
|
||||
htp.p( 'var P_25 = new Array();' );
|
||||
htp.p( 'P_25[0] = "' || WSGL.EscapeURLParam(nvl(to_char(efnow100$syus.CURR_VAL.SYUS_ID), '')) || '";' );
|
||||
htp.p( 'var USEM_CHK_VALUE = new Array();' );
|
||||
htp.p( 'USEM_CHK_VALUE[0] = ' || to_char(WSGL.Checksum(''|| to_char(efnow100$syus.CURR_VAL.SYUS_ID)|| to_char(efnow100$syus.CURR_VAL.SYUS_ID))) || ';' );
|
||||
|
||||
htp.p( 'var P_32 = new Array();' );
|
||||
htp.p( 'P_32[0] = "' || WSGL.EscapeURLParam(to_char(efnow100$usem.CURR_VAL.USCD_ID)) || '";' );
|
||||
|
||||
htp.p(WSGJSL.RtnNotNull);
|
||||
htp.p(WSGJSL.RtnCheckModified);
|
||||
htp.p(WSGJSL.RtnRevertForm);
|
||||
htp.p(WSGJSL.RtnFlagRow);
|
||||
|
||||
htp.p(
|
||||
'// emailCheck
|
||||
//
|
||||
//
|
||||
|
||||
function emailCheck (emailObj,lang) {
|
||||
|
||||
function fieldFocus() {
|
||||
emailObj.focus();
|
||||
}
|
||||
/* The following variable tells the rest of the function whether or not
|
||||
to verify that the address ends in a two-letter country or well-known
|
||||
TLD. 1 means check it, 0 means don''t. */
|
||||
|
||||
var checkTLD=1;
|
||||
var emailStr = emailObj.value;
|
||||
|
||||
/* The following is the list of known TLDs that an e-mail address must end with. */
|
||||
|
||||
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
|
||||
|
||||
/* The following pattern is used to check if the entered e-mail address
|
||||
fits the user@domain format. It also is used to separate the username
|
||||
from the domain. */
|
||||
|
||||
var emailPat=/^(.+)@(.+)$/;
|
||||
|
||||
/* The following string represents the pattern for matching all special
|
||||
characters. We don''t want to allow special characters in the address.
|
||||
These characters include ( ) < > @ , ; : \ " . [ ] */
|
||||
|
||||
/*
|
||||
other chars: +!%/=*-#&{}?$|
|
||||
*/
|
||||
|
||||
var specialChars="\\(\\)\\>\\<\\@\\,\\;\\:\\+\\!\\%\\/\\=\\*\\#\\&\\{\\}\\?\\$|\\\\\\\"\\.\\[\\]";
|
||||
|
||||
/* The following string represents the range of characters allowed in a
|
||||
username or domainname. It really states which chars aren''t allowed.*/
|
||||
|
||||
var validChars="\[^\\s" + specialChars + "\]";
|
||||
/*var validChars="\[^\\s" + "\]";*/
|
||||
|
||||
/* The following pattern applies if the "user" is a quoted string (in
|
||||
which case, there are no rules about which characters are allowed
|
||||
and which aren''t; anything goes). E.g. "jiminy cricket"@disney.com
|
||||
is a legal e-mail address. */
|
||||
|
||||
var quotedUser="(\"[^\"]*\")";
|
||||
|
||||
/* The following pattern applies for domains that are IP addresses,
|
||||
rather than symbolic names. E.g. joe@[123.124.233.4] is a legal
|
||||
e-mail address. NOTE: The square brackets are required. */
|
||||
|
||||
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
|
||||
|
||||
/* The following string represents an atom (basically a series of non-special characters.) */
|
||||
|
||||
var atom=validChars + ''+'';
|
||||
|
||||
/* The following string represents one word in the typical username.
|
||||
For example, in john.doe@somewhere.com, john and doe are words.
|
||||
Basically, a word is either an atom or quoted string. */
|
||||
|
||||
var word="(" + atom + "|" + quotedUser + ")";
|
||||
|
||||
// The following pattern describes the structure of the user
|
||||
|
||||
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
|
||||
|
||||
/* The following pattern describes the structure of a normal symbolic
|
||||
domain, as opposed to ipDomainPat, shown above. */
|
||||
|
||||
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
|
||||
|
||||
/* Finally, let''s start trying to figure out if the supplied address is valid. */
|
||||
|
||||
/* Begin with the coarse pattern to simply break up user@domain into
|
||||
different pieces that are easy to analyze. */
|
||||
|
||||
var matchArray=emailStr.match(emailPat);
|
||||
|
||||
if (matchArray==null) {
|
||||
|
||||
/* Too many/few @''s or something; basically, this address doesn''t
|
||||
even fit the general mould of a valid e-mail address. */
|
||||
setTimeout( fieldFocus , 100 );
|
||||
|
||||
if (lang=="HU") {
|
||||
alert("Helytelen Email c<>m (ellenorizze a @ <20>s . karaktereket)");
|
||||
}
|
||||
else {
|
||||
alert("Email address seems incorrect (check @ and .''s)");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var user=matchArray[1];
|
||||
var domain=matchArray[2];
|
||||
|
||||
// Start by checking that only basic ASCII characters are in the strings (0-127).
|
||||
|
||||
for (i=0; i<user.length; i++) {
|
||||
if (user.charCodeAt(i)>127) {
|
||||
alert("This username contains invalid characters.");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (i=0; i<domain.length; i++) {
|
||||
if (domain.charCodeAt(i)>127) {
|
||||
alert("This domain name contains invalid characters.");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// See if "user" is valid
|
||||
|
||||
if (user.match(userPat)==null) {
|
||||
|
||||
// user is not valid
|
||||
if (lang=="HU") {
|
||||
alert("A felhaszn<7A>l<EFBFBD>n<EFBFBD>v nem tunik <20>rv<72>nyesnek.");
|
||||
}
|
||||
else {
|
||||
alert("The username doesn''t seem to be valid.");
|
||||
}
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
/* if the e-mail address is at an IP address (as opposed to a symbolic
|
||||
host name) make sure the IP address is valid. */
|
||||
|
||||
var IPArray=domain.match(ipDomainPat);
|
||||
if (IPArray!=null) {
|
||||
|
||||
// this is an IP address
|
||||
|
||||
for (var i=1;i<=4;i++) {
|
||||
if (IPArray[i]>255) {
|
||||
alert("Destination IP address is invalid!");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Domain is symbolic name. Check if it''s valid.
|
||||
|
||||
var atomPat=new RegExp("^" + atom + "$");
|
||||
var domArr=domain.split(".");
|
||||
var len=domArr.length;
|
||||
for (i=0;i<len;i++) {
|
||||
if (domArr[i].search(atomPat)==-1) {
|
||||
if (lang=="HU") {
|
||||
alert("A domain n<>v nem tunik <20>rv<72>nyesnek.");
|
||||
}
|
||||
else {
|
||||
alert("The domain name does not seem to be valid.");
|
||||
}
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* domain name seems valid, but now make sure that it ends in a
|
||||
known top-level domain (like com, edu, gov) or a two-letter word,
|
||||
representing country (uk, nl), and that there''s a hostname preceding
|
||||
the domain or country. */
|
||||
|
||||
if (checkTLD && domArr[domArr.length-1].length!=2 &&
|
||||
domArr[domArr.length-1].search(knownDomsPat)==-1) {
|
||||
alert("The address must end in a well-known domain or two letter " + "country.");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure there''s a host name preceding the domain.
|
||||
|
||||
if (len<2) {
|
||||
alert("This address is missing a hostname!");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
// If we''ve gotten this far, everything''s valid!
|
||||
return true;
|
||||
}
|
||||
|
||||
// End -->
|
||||
');
|
||||
htp.p(WSGJSL.OpenEvent('USEM','Validate'));
|
||||
htp.p('var index = 0;');
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_EMAIL_ADDRESS[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Email Address#1054#:')));
|
||||
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('USEM','OnLoad'));
|
||||
htp.p('
|
||||
if ( FormType != "PostDelete")
|
||||
{
|
||||
form_num=0;
|
||||
do
|
||||
{
|
||||
elem_num=0;
|
||||
len = document.forms[form_num].elements.length;
|
||||
if (len > 0)
|
||||
{
|
||||
while (elem_num < len &&
|
||||
document.forms[form_num].elements[elem_num].type != "text" &&
|
||||
document.forms[form_num].elements[elem_num].type != "textarea")
|
||||
{
|
||||
elem_num++;
|
||||
}
|
||||
if (elem_num < len)
|
||||
{
|
||||
document.forms[form_num].elements[elem_num].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
form_num++;
|
||||
} while ( form_num < document.forms.length );
|
||||
}
|
||||
');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFU','OnClick'));
|
||||
htp.p(' if (!USEM_Validate(ctl)) { return false; }');
|
||||
htp.p(' if (!emailCheck(ctl.form.P_EMAIL_ADDRESS[0],"'||caco_utilities.get_syus_lang||'")){ return false; }');
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFD','OnClick'));
|
||||
htp.p(WSGJSL.VerifyDelete(WSGL.MsgGetText(118, WSGLM.DSP118_CONFIRM_DELETE)));
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFR','OnClick'));
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnVFI','OnClick'));
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.CloseScript);
|
||||
exception
|
||||
when others then
|
||||
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Email Accounts#2454#',
|
||||
VF_BODY_ATTRIBUTES, 'efnow100$js$usem.CreateViewJavaScript');
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: efnow100$js$usem.CreateInsertJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateInsertJavaScript(
|
||||
IF_ROWS_INSERTED in integer,
|
||||
IF_ROWS_ERROR in integer,
|
||||
IF_BODY_ATTRIBUTES in varchar2,
|
||||
RL_REQUERY_BUT_ACTION in varchar2,
|
||||
LOV_FRAME in varchar2) is
|
||||
begin
|
||||
if not caco_security.security_check('efnow100$usem') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var FormType = "Insert";');
|
||||
htp.p('var index = 0;');
|
||||
if IF_ROWS_INSERTED > 0 then
|
||||
htp.p( 'var DataChange = true;' );
|
||||
else
|
||||
htp.p( 'var DataChange = false;' );
|
||||
end if;
|
||||
if IF_ROWS_ERROR > 0 then
|
||||
htp.p( 'var DataChangeErrors = true;' );
|
||||
else
|
||||
htp.p( 'var DataChangeErrors = false;' );
|
||||
end if;
|
||||
|
||||
if to_char(efnow100$syus.CURR_VAL.SYUS_ID) is not null then
|
||||
htp.p( 'var P_SYUS_ID = new Array();' );
|
||||
htp.p( 'P_SYUS_ID[0] = "' || WSGL.EscapeURLParam(to_char(efnow100$syus.CURR_VAL.SYUS_ID)) || '";' );
|
||||
end if;
|
||||
htp.p( 'var P_25 = new Array();' );
|
||||
htp.p( 'P_25[0] = "' || WSGL.EscapeURLParam(nvl(to_char(efnow100$syus.CURR_VAL.SYUS_ID), '')) || '";' );
|
||||
if (to_char(efnow100$syus.CURR_VAL.SYUS_ID) is not null ) then
|
||||
htp.p( 'var USEM_CHK_VALUE = new Array();' );
|
||||
htp.p( 'USEM_CHK_VALUE[0] = ' || to_char(WSGL.Checksum(''|| to_char(efnow100$syus.CURR_VAL.SYUS_ID)|| to_char(efnow100$syus.CURR_VAL.SYUS_ID))) || ';' );
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.RtnNotNull);
|
||||
htp.p(WSGJSL.RtnCheckModified);
|
||||
htp.p(WSGJSL.RtnRevertForm);
|
||||
htp.p(WSGJSL.RtnFlagRow);
|
||||
|
||||
htp.p(
|
||||
'// emailCheck
|
||||
//
|
||||
//
|
||||
|
||||
function emailCheck (emailObj,lang) {
|
||||
|
||||
function fieldFocus() {
|
||||
emailObj.focus();
|
||||
}
|
||||
/* The following variable tells the rest of the function whether or not
|
||||
to verify that the address ends in a two-letter country or well-known
|
||||
TLD. 1 means check it, 0 means don''t. */
|
||||
|
||||
var checkTLD=1;
|
||||
var emailStr = emailObj.value;
|
||||
|
||||
/* The following is the list of known TLDs that an e-mail address must end with. */
|
||||
|
||||
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
|
||||
|
||||
/* The following pattern is used to check if the entered e-mail address
|
||||
fits the user@domain format. It also is used to separate the username
|
||||
from the domain. */
|
||||
|
||||
var emailPat=/^(.+)@(.+)$/;
|
||||
|
||||
/* The following string represents the pattern for matching all special
|
||||
characters. We don''t want to allow special characters in the address.
|
||||
These characters include ( ) < > @ , ; : \ " . [ ] */
|
||||
|
||||
/*
|
||||
other chars: +!%/=*-#&{}?$|
|
||||
*/
|
||||
|
||||
var specialChars="\\(\\)\\>\\<\\@\\,\\;\\:\\+\\!\\%\\/\\=\\*\\#\\&\\{\\}\\?\\$|\\\\\\\"\\.\\[\\]";
|
||||
|
||||
/* The following string represents the range of characters allowed in a
|
||||
username or domainname. It really states which chars aren''t allowed.*/
|
||||
|
||||
var validChars="\[^\\s" + specialChars + "\]";
|
||||
/*var validChars="\[^\\s" + "\]";*/
|
||||
|
||||
/* The following pattern applies if the "user" is a quoted string (in
|
||||
which case, there are no rules about which characters are allowed
|
||||
and which aren''t; anything goes). E.g. "jiminy cricket"@disney.com
|
||||
is a legal e-mail address. */
|
||||
|
||||
var quotedUser="(\"[^\"]*\")";
|
||||
|
||||
/* The following pattern applies for domains that are IP addresses,
|
||||
rather than symbolic names. E.g. joe@[123.124.233.4] is a legal
|
||||
e-mail address. NOTE: The square brackets are required. */
|
||||
|
||||
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
|
||||
|
||||
/* The following string represents an atom (basically a series of non-special characters.) */
|
||||
|
||||
var atom=validChars + ''+'';
|
||||
|
||||
/* The following string represents one word in the typical username.
|
||||
For example, in john.doe@somewhere.com, john and doe are words.
|
||||
Basically, a word is either an atom or quoted string. */
|
||||
|
||||
var word="(" + atom + "|" + quotedUser + ")";
|
||||
|
||||
// The following pattern describes the structure of the user
|
||||
|
||||
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
|
||||
|
||||
/* The following pattern describes the structure of a normal symbolic
|
||||
domain, as opposed to ipDomainPat, shown above. */
|
||||
|
||||
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
|
||||
|
||||
/* Finally, let''s start trying to figure out if the supplied address is valid. */
|
||||
|
||||
/* Begin with the coarse pattern to simply break up user@domain into
|
||||
different pieces that are easy to analyze. */
|
||||
|
||||
var matchArray=emailStr.match(emailPat);
|
||||
|
||||
if (matchArray==null) {
|
||||
|
||||
/* Too many/few @''s or something; basically, this address doesn''t
|
||||
even fit the general mould of a valid e-mail address. */
|
||||
setTimeout( fieldFocus , 100 );
|
||||
|
||||
if (lang=="HU") {
|
||||
alert("Helytelen Email c<>m (ellenorizze a @ <20>s . karaktereket)");
|
||||
}
|
||||
else {
|
||||
alert("Email address seems incorrect (check @ and .''s)");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var user=matchArray[1];
|
||||
var domain=matchArray[2];
|
||||
|
||||
// Start by checking that only basic ASCII characters are in the strings (0-127).
|
||||
|
||||
for (i=0; i<user.length; i++) {
|
||||
if (user.charCodeAt(i)>127) {
|
||||
alert("This username contains invalid characters.");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (i=0; i<domain.length; i++) {
|
||||
if (domain.charCodeAt(i)>127) {
|
||||
alert("This domain name contains invalid characters.");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// See if "user" is valid
|
||||
|
||||
if (user.match(userPat)==null) {
|
||||
|
||||
// user is not valid
|
||||
if (lang=="HU") {
|
||||
alert("A felhaszn<7A>l<EFBFBD>n<EFBFBD>v nem tunik <20>rv<72>nyesnek.");
|
||||
}
|
||||
else {
|
||||
alert("The username doesn''t seem to be valid.");
|
||||
}
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
/* if the e-mail address is at an IP address (as opposed to a symbolic
|
||||
host name) make sure the IP address is valid. */
|
||||
|
||||
var IPArray=domain.match(ipDomainPat);
|
||||
if (IPArray!=null) {
|
||||
|
||||
// this is an IP address
|
||||
|
||||
for (var i=1;i<=4;i++) {
|
||||
if (IPArray[i]>255) {
|
||||
alert("Destination IP address is invalid!");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Domain is symbolic name. Check if it''s valid.
|
||||
|
||||
var atomPat=new RegExp("^" + atom + "$");
|
||||
var domArr=domain.split(".");
|
||||
var len=domArr.length;
|
||||
for (i=0;i<len;i++) {
|
||||
if (domArr[i].search(atomPat)==-1) {
|
||||
if (lang=="HU") {
|
||||
alert("A domain n<>v nem tunik <20>rv<72>nyesnek.");
|
||||
}
|
||||
else {
|
||||
alert("The domain name does not seem to be valid.");
|
||||
}
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* domain name seems valid, but now make sure that it ends in a
|
||||
known top-level domain (like com, edu, gov) or a two-letter word,
|
||||
representing country (uk, nl), and that there''s a hostname preceding
|
||||
the domain or country. */
|
||||
|
||||
if (checkTLD && domArr[domArr.length-1].length!=2 &&
|
||||
domArr[domArr.length-1].search(knownDomsPat)==-1) {
|
||||
alert("The address must end in a well-known domain or two letter " + "country.");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure there''s a host name preceding the domain.
|
||||
|
||||
if (len<2) {
|
||||
alert("This address is missing a hostname!");
|
||||
emailObj.focus();
|
||||
return false;
|
||||
}
|
||||
// If we''ve gotten this far, everything''s valid!
|
||||
return true;
|
||||
}
|
||||
|
||||
// End -->
|
||||
');
|
||||
htp.p(WSGJSL.OpenEvent('USEM','Validate'));
|
||||
htp.p('var index = 0;');
|
||||
|
||||
|
||||
htp.p(WSGJSL.CallNotNull('ctl.form.P_EMAIL_ADDRESS[index]', WSGL.MsgGetText(219, WSGLM.MSG219_MISSING_MANDATORY, '#Email Address#1054#:')));
|
||||
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('USEM','OnLoad'));
|
||||
htp.p('
|
||||
if ( FormType != "PostDelete")
|
||||
{
|
||||
form_num=0;
|
||||
do
|
||||
{
|
||||
elem_num=0;
|
||||
len = document.forms[form_num].elements.length;
|
||||
if (len > 0)
|
||||
{
|
||||
while (elem_num < len &&
|
||||
document.forms[form_num].elements[elem_num].type != "text" &&
|
||||
document.forms[form_num].elements[elem_num].type != "textarea")
|
||||
{
|
||||
elem_num++;
|
||||
}
|
||||
if (elem_num < len)
|
||||
{
|
||||
document.forms[form_num].elements[elem_num].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
form_num++;
|
||||
} while ( form_num < document.forms.length );
|
||||
}
|
||||
');
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnIFI','OnClick'));
|
||||
htp.p(' if (!USEM_Validate(ctl)) { return false; }');
|
||||
htp.p(' if (!emailCheck(ctl.form.P_EMAIL_ADDRESS[0],"'||caco_utilities.get_syus_lang||'")){ return false; }');
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.OpenEvent('btnIFR','OnClick'));
|
||||
htp.p(WSGJSL.StandardSubmit(false));
|
||||
|
||||
htp.p(WSGJSL.CloseEvent);
|
||||
htp.p(WSGJSL.CloseScript);
|
||||
exception
|
||||
when others then
|
||||
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Email Accounts#2454#',
|
||||
IF_BODY_ATTRIBUTES, 'efnow100$js$usem.CreateInsertJavaScript');
|
||||
end;
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Name: efnow100$js$usem.CreateListJavaScript
|
||||
--
|
||||
-- Description:
|
||||
--
|
||||
-- Parameters:
|
||||
--
|
||||
--------------------------------------------------------------------------------
|
||||
procedure CreateListJavaScript (
|
||||
RL_BODY_ATTRIBUTES in varchar2)
|
||||
is
|
||||
begin
|
||||
if not caco_security.security_check('efnow100$usem') then
|
||||
return;
|
||||
end if;
|
||||
|
||||
htp.p(WSGJSL.OpenScript);
|
||||
htp.p('var FormType = "List";');
|
||||
|
||||
if to_char(efnow100$syus.CURR_VAL.SYUS_ID) is not null then
|
||||
htp.p( 'var P_SYUS_ID = new Array();' );
|
||||
htp.p( 'P_SYUS_ID[0] = "' || WSGL.EscapeURLParam(to_char(efnow100$syus.CURR_VAL.SYUS_ID)) || '";' );
|
||||
end if;
|
||||
htp.p( 'var P_25 = new Array();' );
|
||||
htp.p( 'P_25[0] = "' || WSGL.EscapeURLParam(nvl(to_char(efnow100$syus.CURR_VAL.SYUS_ID), '')) || '";' );
|
||||
if (to_char(efnow100$syus.CURR_VAL.SYUS_ID) is not null ) then
|
||||
htp.p( 'var USEM_CHK_VALUE = new Array();' );
|
||||
htp.p( 'USEM_CHK_VALUE[0] = ' || to_char(WSGL.Checksum(''|| to_char(efnow100$syus.CURR_VAL.SYUS_ID)|| to_char(efnow100$syus.CURR_VAL.SYUS_ID))) || ';' );
|
||||
end if;
|
||||
|
||||
htp.p( 'var P_32 = new Array();' );
|
||||
|
||||
htp.p(WSGJSL.CloseScript);
|
||||
exception
|
||||
when others then
|
||||
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Email Accounts#2454#',
|
||||
RL_BODY_ATTRIBUTES, 'efnow100$js$usem.CreateListJavaScript');
|
||||
end;
|
||||
end;
|
||||
/
|
||||
Reference in New Issue
Block a user