Merge remote branch 'upstream/master' into BUG-11510
This commit is contained in:
@@ -18,7 +18,7 @@ this.getBrowser=function()
|
|||||||
return{name:name,version:version,screen:screen}}
|
return{name:name,version:version,screen:screen}}
|
||||||
this.createInfoPanel=function(url,params,columnsSize)
|
this.createInfoPanel=function(url,params,columnsSize)
|
||||||
{var labelColumnWidth=170;var valueColumnWidth=350;params=params||{};if(typeof columnsSize!='undefined'){labelColumnWidth=columnsSize[0]||labelColumnWidth;valueColumnWidth=columnsSize[1]||valueColumnWidth;}
|
{var labelColumnWidth=170;var valueColumnWidth=350;params=params||{};if(typeof columnsSize!='undefined'){labelColumnWidth=columnsSize[0]||labelColumnWidth;valueColumnWidth=columnsSize[1]||valueColumnWidth;}
|
||||||
return new Ext.grid.GridPanel({store:new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:url,method:'POST'}),baseParams:params,reader:new Ext.data.JsonReader({fields:[{name:'label'},{name:'value'},{name:'section'}]}),groupField:'section'}),columns:[{width:labelColumnWidth,dataIndex:'label',renderer:function(v){return'<b><font color="#465070">'+v+'</font></b>'},align:'right'},{width:valueColumnWidth,dataIndex:'value'},{hidden:true,dataIndex:'section'}],autoHeight:true,columnLines:true,trackMouseOver:false,disableSelection:true,view:new Ext.grid.GroupingView({forceFit:true,headersDisabled:true,groupTextTpl:'{group}'}),loadMask:true});}
|
return new Ext.grid.GridPanel({store:new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:url,method:'POST'}),baseParams:params,reader:new Ext.data.JsonReader({fields:[{name:'label'},{name:'value'},{name:'section'}]}),groupField:'section'}),columns:[{width:labelColumnWidth,dataIndex:"label",renderer:function(v){return"<b><font color=\"#465070\">"+v+"</font></b>"},align:"right"},{width:valueColumnWidth,dataIndex:"value",renderer:function(v){return Ext.util.Format.htmlEncode(v);}},{hidden:true,dataIndex:"section"}],autoHeight:true,columnLines:true,trackMouseOver:false,disableSelection:true,view:new Ext.grid.GroupingView({forceFit:true,headersDisabled:true,groupTextTpl:'{group}'}),loadMask:true});}
|
||||||
this.cookie={create:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";document.cookie=name+"="+value+expires+"; path=/";},read:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
|
this.cookie={create:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";document.cookie=name+"="+value+expires+"; path=/";},read:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
|
||||||
return null;},erase:function(name){Tools.createCookie(name,"",-1);}}}
|
return null;},erase:function(name){Tools.createCookie(name,"",-1);}}}
|
||||||
var PMExt=new PMExtJSCommon();Ext.msgBoxSlider=function(){var msgCt;function createBox(t,s){return['<div class="msg">','<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>','<div class="x-box-ml"><div class="x-box-mr"><div id="x-box-mc-inner" class="x-box-mc"><h3>',t,'</h3>',s,'</div></div></div>','<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>','</div>'].join('');}
|
var PMExt=new PMExtJSCommon();Ext.msgBoxSlider=function(){var msgCt;function createBox(t,s){return['<div class="msg">','<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>','<div class="x-box-ml"><div class="x-box-mr"><div id="x-box-mc-inner" class="x-box-mc"><h3>',t,'</h3>',s,'</div></div></div>','<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>','</div>'].join('');}
|
||||||
@@ -50,6 +50,7 @@ function _DF(DATE_TIME,D_FORMAT)
|
|||||||
{function LZ(x){return(x<0||x>9?"":"0")+x;}
|
{function LZ(x){return(x<0||x>9?"":"0")+x;}
|
||||||
if(typeof D_FORMAT=='undefined'){if(typeof FORMATS!='undefined'){D_FORMAT=FORMATS.dateFormat;}
|
if(typeof D_FORMAT=='undefined'){if(typeof FORMATS!='undefined'){D_FORMAT=FORMATS.dateFormat;}
|
||||||
else{D_FORMAT='m/d/Y';}}
|
else{D_FORMAT='m/d/Y';}}
|
||||||
|
if(D_FORMAT.indexOf(' \\d\\e ')){D_FORMAT=D_FORMAT.replace(/ \\d\\e /gi," [of] ");}
|
||||||
if(!(DATE_TIME!='')){if(DATE_TIME=='')
|
if(!(DATE_TIME!='')){if(DATE_TIME=='')
|
||||||
return'';else
|
return'';else
|
||||||
return'**'+DATE_TIME+'**';}
|
return'**'+DATE_TIME+'**';}
|
||||||
@@ -60,6 +61,7 @@ else if(H>12){values['g']=H-12;}
|
|||||||
else{values['g']=H;}
|
else{values['g']=H;}
|
||||||
values['h']=LZ(values['g']);values['i']=LZ(m);values['s']=LZ(s);if(H>11)values['a']='pm';else values['a']='am';if(H>11)values['A']='PM';else values['A']='AM';if(typeof FORMATS=='undefined')values['T']='**';else values['T']=FORMATS.TimeZone;var aDate=D_FORMAT.split('');var aux='';var xParts=new Array('Y','y','F','M','m','n','d','j','D','l','G','H','g','h','i','s','a','A','T');for(var i=0;i<aDate.length;i++){if(xParts.indexOf(aDate[i])==-1){aux=aux+aDate[i];}
|
values['h']=LZ(values['g']);values['i']=LZ(m);values['s']=LZ(s);if(H>11)values['a']='pm';else values['a']='am';if(H>11)values['A']='PM';else values['A']='AM';if(typeof FORMATS=='undefined')values['T']='**';else values['T']=FORMATS.TimeZone;var aDate=D_FORMAT.split('');var aux='';var xParts=new Array('Y','y','F','M','m','n','d','j','D','l','G','H','g','h','i','s','a','A','T');for(var i=0;i<aDate.length;i++){if(xParts.indexOf(aDate[i])==-1){aux=aux+aDate[i];}
|
||||||
else{aux=aux+values[aDate[i]];}}
|
else{aux=aux+values[aDate[i]];}}
|
||||||
|
if(aux.indexOf(" [of] ")){aux=aux.replace(/\[of\]/g,"de");}
|
||||||
return aux;}
|
return aux;}
|
||||||
Ext.util.Format.capitalize=(function(){var re=/(^|[^\w])([a-z])/g,fn=function(m,a,b){return a+b.toUpperCase();};return function(v){return v.toLowerCase().replace(re,fn);}})();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
|
Ext.util.Format.capitalize=(function(){var re=/(^|[^\w])([a-z])/g,fn=function(m,a,b){return a+b.toUpperCase();};return function(v){return v.toLowerCase().replace(re,fn);}})();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
|
||||||
String.prototype.nl2br=function(){return this.replace(/\n/g,'<br />');}
|
String.prototype.nl2br=function(){return this.replace(/\n/g,'<br />');}
|
||||||
|
|||||||
@@ -113,19 +113,25 @@ PMExtJSCommon = function() {
|
|||||||
}),
|
}),
|
||||||
groupField: 'section'
|
groupField: 'section'
|
||||||
}),
|
}),
|
||||||
columns : [{
|
columns : [
|
||||||
|
{
|
||||||
width : labelColumnWidth,
|
width : labelColumnWidth,
|
||||||
dataIndex : 'label',
|
dataIndex : "label",
|
||||||
renderer: function(v){return '<b><font color="#465070">'+v+'</font></b>'},
|
renderer: function(v){return "<b><font color=\"#465070\">"+v+"</font></b>"},
|
||||||
align: 'right'
|
align: "right"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
width : valueColumnWidth,
|
width : valueColumnWidth,
|
||||||
dataIndex : 'value'
|
dataIndex : "value",
|
||||||
},{
|
renderer: function (v) {
|
||||||
|
return Ext.util.Format.htmlEncode(v);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
hidden: true,
|
hidden: true,
|
||||||
dataIndex : 'section'
|
dataIndex : "section"
|
||||||
}],
|
}
|
||||||
|
],
|
||||||
autoHeight : true,
|
autoHeight : true,
|
||||||
columnLines: true,
|
columnLines: true,
|
||||||
trackMouseOver:false,
|
trackMouseOver:false,
|
||||||
@@ -428,6 +434,10 @@ function _DF(DATE_TIME, D_FORMAT)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (D_FORMAT.indexOf(' \\d\\e ')) {
|
||||||
|
D_FORMAT = D_FORMAT.replace(/ \\d\\e /gi, " [of] ");
|
||||||
|
}
|
||||||
|
|
||||||
if (!(DATE_TIME != '')) {
|
if (!(DATE_TIME != '')) {
|
||||||
if (DATE_TIME == '')
|
if (DATE_TIME == '')
|
||||||
return '';
|
return '';
|
||||||
@@ -499,6 +509,11 @@ function _DF(DATE_TIME, D_FORMAT)
|
|||||||
aux = aux + values[aDate[i]];
|
aux = aux + values[aDate[i]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (aux.indexOf(" [of] ")) {
|
||||||
|
aux = aux.replace(/\[of\]/g, "de");
|
||||||
|
}
|
||||||
|
|
||||||
return aux;
|
return aux;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -486,6 +486,7 @@ class Configurations // extends Configuration
|
|||||||
$arrayFormat[] = array("id" => "d M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_12")); //"d M, Y" i.e: "17 Nov, 2010"
|
$arrayFormat[] = array("id" => "d M, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_12")); //"d M, Y" i.e: "17 Nov, 2010"
|
||||||
$arrayFormat[] = array("id" => "d m, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_13")); //"d m, Y" i.e: "17 11, 2010"
|
$arrayFormat[] = array("id" => "d m, Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_13")); //"d m, Y" i.e: "17 11, 2010"
|
||||||
$arrayFormat[] = array("id" => "d.m.Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_14")); //"d.m.Y" i.e: "17.11.2010"
|
$arrayFormat[] = array("id" => "d.m.Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_14")); //"d.m.Y" i.e: "17.11.2010"
|
||||||
|
$arrayFormat[] = array("id" => "d \d\e F \d\e Y", "name" => G::LoadTranslation("ID_DATE_FORMAT_17")); //"d \d\e F \d\e Y" i.e: "2 de Febrero de 2013" (Spanish format)
|
||||||
|
|
||||||
return $arrayFormat;
|
return $arrayFormat;
|
||||||
}
|
}
|
||||||
@@ -523,6 +524,12 @@ class Configurations // extends Configuration
|
|||||||
$newCreation = '';
|
$newCreation = '';
|
||||||
$maskTime = array('d' => '%d', 'D' => '%A', 'j' => '%e', 'l' => '%A', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%B', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%P', 'A' => '%p', 'g' => '%l', 'G' => '%k', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S');
|
$maskTime = array('d' => '%d', 'D' => '%A', 'j' => '%e', 'l' => '%A', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%B', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%P', 'A' => '%p', 'g' => '%l', 'G' => '%k', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S');
|
||||||
$creationDateMask = trim($creationDateMask);
|
$creationDateMask = trim($creationDateMask);
|
||||||
|
|
||||||
|
if (strpos($creationDateMask, ' \\d\\e ') !== false) {
|
||||||
|
$creationDateMask = str_replace(' \\d\\e ', ' [xx] ', $creationDateMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for ($i = 0; $i < strlen($creationDateMask); $i++) {
|
for ($i = 0; $i < strlen($creationDateMask); $i++) {
|
||||||
if ($creationDateMask[$i] != ' ' && isset($maskTime[$creationDateMask[$i]])) {
|
if ($creationDateMask[$i] != ' ' && isset($maskTime[$creationDateMask[$i]])) {
|
||||||
$newCreation .= $maskTime[$creationDateMask[$i]];
|
$newCreation .= $maskTime[$creationDateMask[$i]];
|
||||||
@@ -560,8 +567,19 @@ class Configurations // extends Configuration
|
|||||||
|
|
||||||
setlocale(LC_TIME, $langLocate);
|
setlocale(LC_TIME, $langLocate);
|
||||||
$dateTime = utf8_encode(strftime($newCreation, mktime(0, 0, 0, $m, $d, $y)));
|
$dateTime = utf8_encode(strftime($newCreation, mktime(0, 0, 0, $m, $d, $y)));
|
||||||
|
|
||||||
|
if (strpos($dateTime, ' ') !== false) {
|
||||||
|
$dateTime = ucwords($dateTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($dateTime, ' [xx] ') !== false) {
|
||||||
|
$dateTime = str_replace('[xx]', ' de ', $dateTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return $dateTime;
|
return $dateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12505,6 +12505,12 @@ msgstr "M d, Y"
|
|||||||
msgid "m D, Y"
|
msgid "m D, Y"
|
||||||
msgstr "m D, Y"
|
msgstr "m D, Y"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_DATE_FORMAT_17
|
||||||
|
#: LABEL/ID_DATE_FORMAT_17
|
||||||
|
msgid "d de F de Y"
|
||||||
|
msgstr "d de F de Y"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_EXPIRES_IN
|
# LABEL/ID_EXPIRES_IN
|
||||||
#: LABEL/ID_EXPIRES_IN
|
#: LABEL/ID_EXPIRES_IN
|
||||||
|
|||||||
@@ -1354,10 +1354,15 @@ class Installer extends Controller
|
|||||||
|
|
||||||
public function setConfiguration()
|
public function setConfiguration()
|
||||||
{
|
{
|
||||||
$query = <<<EOL
|
//a:4:{s:26:"login_enableForgotPassword";b:0;s:27:"login_enableVirtualKeyboard";b:0;s:21:"login_defaultLanguage";s:5:"pt-BR";s:10:"dateFormat";s:15:"d \\d\\e F \\d\\e Y";}
|
||||||
INSERT INTO CONFIGURATION (CFG_UID, CFG_VALUE) VALUES
|
$value = array(
|
||||||
('ENVIRONMENT_SETTINGS', 'a:3:{s:26:"login_enableForgotPassword";b:0;s:27:"login_enableVirtualKeyboard";b:0;s:21:"login_defaultLanguage";s:5:"pt-BR";}');
|
'login_defaultLanguage' => "pt-BR",
|
||||||
EOL;
|
"dateFormat" => 'd \d\e F \d\e Y'
|
||||||
|
);
|
||||||
|
|
||||||
|
$value = serialize($value);
|
||||||
|
$query = "INSERT INTO CONFIGURATION (CFG_UID, CFG_VALUE) VALUES ('ENVIRONMENT_SETTINGS', '".mysql_real_escape_string($value)."')";
|
||||||
|
|
||||||
$this->mysqlQuery($query);
|
$this->mysqlQuery($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,12 @@ try {
|
|||||||
$aFields['PHP_START_DATE'] = date( 'Y-m-d' );
|
$aFields['PHP_START_DATE'] = date( 'Y-m-d' );
|
||||||
$aFields['PHP_END_DATE'] = date( 'Y-m-d', mktime( 0, 0, 0, date( 'm' ), date( 'd' ), date( 'Y' ) + 5 ) );
|
$aFields['PHP_END_DATE'] = date( 'Y-m-d', mktime( 0, 0, 0, date( 'm' ), date( 'd' ), date( 'Y' ) + 5 ) );
|
||||||
|
|
||||||
|
$aFields['SCH_LIST'] = '';
|
||||||
|
foreach ($_SESSION['_DBArray']['cases_scheduler'] as $key => $item) {
|
||||||
|
$aFields['SCH_LIST'] .= ($item['SCH_UID'] != $_GET['SCH_UID']) ? htmlspecialchars($item['SCH_NAME'], ENT_QUOTES) . '^' : '' ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_Edit.xml', '', $aFields, 'cases_Scheduler_Update' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_Edit.xml', '', $aFields, 'cases_Scheduler_Update' );
|
||||||
|
|
||||||
G::RenderPage( 'publishBlank', 'blank' );
|
G::RenderPage( 'publishBlank', 'blank' );
|
||||||
|
|||||||
@@ -86,6 +86,11 @@ try {
|
|||||||
|
|
||||||
$aFields['UID_SCHEDULER'] = "scheduler";
|
$aFields['UID_SCHEDULER'] = "scheduler";
|
||||||
|
|
||||||
|
$aFields['SCH_LIST'] = '';
|
||||||
|
foreach ($_SESSION['_DBArray']['cases_scheduler'] as $key => $item) {
|
||||||
|
$aFields['SCH_LIST'] .= htmlspecialchars($item['SCH_NAME'], ENT_QUOTES) . '^';
|
||||||
|
}
|
||||||
|
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_New.xml', '', $aFields, 'cases_Scheduler_Save' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_New.xml', '', $aFields, 'cases_Scheduler_Save' );
|
||||||
G::RenderPage( 'publishBlank', 'blank' );
|
G::RenderPage( 'publishBlank', 'blank' );
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ if (isset( $parameters->TO )) {
|
|||||||
//echo '<pre>';print_r($parameters->TO);
|
//echo '<pre>';print_r($parameters->TO);
|
||||||
foreach ($parameters->TO as $item) {
|
foreach ($parameters->TO as $item) {
|
||||||
$row = explode( '|', $item );
|
$row = explode( '|', $item );
|
||||||
|
$row[1] = trim($row[1]);
|
||||||
|
|
||||||
switch ($row[0]) {
|
switch ($row[0]) {
|
||||||
case 'usr':
|
case 'usr':
|
||||||
require_once ('classes/model/Users.php');
|
require_once ('classes/model/Users.php');
|
||||||
@@ -117,6 +119,8 @@ if (isset( $parameters->CC )) {
|
|||||||
$paramCC[] = Array ('id' => 'char','name' => 'char' );
|
$paramCC[] = Array ('id' => 'char','name' => 'char' );
|
||||||
foreach ($parameters->CC as $item) {
|
foreach ($parameters->CC as $item) {
|
||||||
$row = explode( '|', $item );
|
$row = explode( '|', $item );
|
||||||
|
$row[1] = trim($row[1]);
|
||||||
|
|
||||||
switch ($row[0]) {
|
switch ($row[0]) {
|
||||||
case 'usr':
|
case 'usr':
|
||||||
require_once ('classes/model/Users.php');
|
require_once ('classes/model/Users.php');
|
||||||
@@ -156,6 +160,8 @@ if (isset( $parameters->BCC )) {
|
|||||||
$paramBCC[] = Array ('id' => 'char','name' => 'char' );
|
$paramBCC[] = Array ('id' => 'char','name' => 'char' );
|
||||||
foreach ($parameters->BCC as $item) {
|
foreach ($parameters->BCC as $item) {
|
||||||
$row = explode( '|', $item );
|
$row = explode( '|', $item );
|
||||||
|
$row[1] = trim($row[1]);
|
||||||
|
|
||||||
switch ($row[0]) {
|
switch ($row[0]) {
|
||||||
case 'usr':
|
case 'usr':
|
||||||
require_once ('classes/model/Users.php');
|
require_once ('classes/model/Users.php');
|
||||||
|
|||||||
@@ -50,13 +50,16 @@ function skinList ()
|
|||||||
$wildcard = '@';
|
$wildcard = '@';
|
||||||
}
|
}
|
||||||
|
|
||||||
$classicSkin = '';
|
$filterList = array();
|
||||||
if (defined('PARTNER_FLAG')) {
|
if (defined('PARTNER_FLAG')) {
|
||||||
$classicSkin = '00000000000000000000000000000001';
|
$filterList = array(
|
||||||
|
'00000000000000000000000000000001',
|
||||||
|
'00000000000000000000000000000002'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($skinList['skins'] as $key => $value) {
|
foreach ($skinList['skins'] as $key => $value) {
|
||||||
if (!isset($value['SKIN_ID']) || $value['SKIN_ID'] != $classicSkin) {
|
if (! isset($value['SKIN_ID']) || ! in_array($value['SKIN_ID'], $filterList)) {
|
||||||
if ($value['SKIN_FOLDER_ID'] != 'simplified' && $value['SKIN_FOLDER_ID'] != 'uxs' && $value['SKIN_FOLDER_ID'] != 'uxmodern') {
|
if ($value['SKIN_FOLDER_ID'] != 'simplified' && $value['SKIN_FOLDER_ID'] != 'uxs' && $value['SKIN_FOLDER_ID'] != 'uxmodern') {
|
||||||
if ($skinList['currentSkin'] == $value['SKIN_FOLDER_ID']) {
|
if ($skinList['currentSkin'] == $value['SKIN_FOLDER_ID']) {
|
||||||
$value['SKIN_STATUS'] = $wildcard . G::LoadTranslation( 'ID_ACTIVE' );
|
$value['SKIN_STATUS'] = $wildcard . G::LoadTranslation( 'ID_ACTIVE' );
|
||||||
|
|||||||
@@ -726,7 +726,7 @@ class SkinEngine
|
|||||||
G::LoadClass( "configuration" );
|
G::LoadClass( "configuration" );
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
if ( defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
|
if ( defined('SYS_SYS') && $conf->exists("ENVIRONMENT_SETTINGS")) {
|
||||||
$smarty->assign('udate', $conf->getSystemDate(date('Y-m-d H:i:s')));
|
$smarty->assign('udate', $conf->getSystemDate(date('Y-m-d')));
|
||||||
} else {
|
} else {
|
||||||
$smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG));
|
$smarty->assign('udate', G::getformatedDate(date('Y-m-d'), 'M d, yyyy', SYS_LANG));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,9 @@
|
|||||||
<tr style="display: none;">
|
<tr style="display: none;">
|
||||||
<td colspan="2">{$form.SCH_UID}</td>
|
<td colspan="2">{$form.SCH_UID}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr style="display: none;">
|
||||||
|
<td colspan="2">{$form.SCH_LIST}</td>
|
||||||
|
</tr>
|
||||||
<tr style="display: none">
|
<tr style="display: none">
|
||||||
<td colspan="2">{$form.SCH_ADVANCED}</td>
|
<td colspan="2">{$form.SCH_ADVANCED}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
<SCH_UID type="hidden" >
|
<SCH_UID type="hidden" >
|
||||||
<en></en>
|
<en></en>
|
||||||
</SCH_UID>
|
</SCH_UID>
|
||||||
|
<SCH_LIST type="hidden" >
|
||||||
|
</SCH_LIST>
|
||||||
<PREV_SCH_END_DATE type="hidden" >
|
<PREV_SCH_END_DATE type="hidden" >
|
||||||
<en></en>
|
<en></en>
|
||||||
</PREV_SCH_END_DATE>
|
</PREV_SCH_END_DATE>
|
||||||
@@ -48,7 +50,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<SCH_NAME type="text" maxlength="100" validate="Any" required="1" readonly="0" size="40" mode="edit" mask="" strto="" dependentfields="" defaultvalue="" hint="" formula="" function="" sqlconnection="" savelabel="0">
|
<SCH_NAME type="text" maxlength="100" validate="Any" required="1" readonly="0" size="40" mode="edit" mask="" strto="" dependentfields="" defaultvalue="" hint="" formula="" function="" sqlconnection="" savelabel="0">
|
||||||
<en>Description</en>
|
<en>Name</en>
|
||||||
</SCH_NAME>
|
</SCH_NAME>
|
||||||
<PRO_UID type="hidden" required="1" style="width:300px" dependentfields="TAS_UID" mode="edit">
|
<PRO_UID type="hidden" required="1" style="width:300px" dependentfields="TAS_UID" mode="edit">
|
||||||
</PRO_UID>
|
</PRO_UID>
|
||||||
@@ -247,7 +249,7 @@ WHERE A.PRO_UID='@#PRO_UID' AND A.TAS_START = 'TRUE' ]]>
|
|||||||
|
|
||||||
</CASE_SH_PLUGIN_UID>
|
</CASE_SH_PLUGIN_UID>
|
||||||
|
|
||||||
<UPDATE type="submit" onClick="if(validateSchedulerFields()) {return true;} else {return false;}">
|
<UPDATE type="button" onClick="validateSchedulerFields(this.form)">
|
||||||
<en>Update</en>
|
<en>Update</en>
|
||||||
</UPDATE>
|
</UPDATE>
|
||||||
|
|
||||||
@@ -758,18 +760,36 @@ function collapseAdvancedOptions(){
|
|||||||
* @return true/false boolean
|
* @return true/false boolean
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function validateSchedulerFields(){
|
function validateSchedulerFields(oForm) {
|
||||||
|
|
||||||
var validFields = true;
|
var schedulerTitle = document.getElementById('form[SCH_NAME]').value;
|
||||||
var requiredFields = '';
|
schedulerTitle = schedulerTitle.replace(/^\s*|\s*$/g,"");
|
||||||
var badFormatFields = '';
|
if (schedulerTitle == '') {
|
||||||
var startDate = document.getElementById('form[SCH_START_DATE]').value;
|
document.getElementById('form[SCH_NAME]').focus();
|
||||||
var endDate = document.getElementById('form[SCH_END_DATE]').value;
|
msgBox("@G::LoadTranslation(ID_REQUIRED_NAME_CASE_SCHEDULER)", 'alert');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
startDate = startDate.split("-");
|
var listNames = document.getElementById('form[SCH_LIST]').value;
|
||||||
endDate = endDate.split("-");
|
listNames = listNames.split("^");
|
||||||
startDate = new Date(startDate[0],startDate[1],startDate[2]);
|
for (var i= 1; i<listNames.length; i++) {
|
||||||
endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
if (schedulerTitle.toLowerCase() == (listNames[i]).toLowerCase()) {
|
||||||
|
document.getElementById('form[SCH_NAME]').focus();
|
||||||
|
msgBox("@G::LoadTranslation(ID_DUPLICATE_CASE_SCHEDULER_NAME)", 'alert');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getField("SCH_NAME").value = schedulerTitle;
|
||||||
|
var validFields = true;
|
||||||
|
var requiredFields = '';
|
||||||
|
var badFormatFields = '';
|
||||||
|
var startDate = document.getElementById('form[SCH_START_DATE]').value;
|
||||||
|
var endDate = document.getElementById('form[SCH_END_DATE]').value;
|
||||||
|
|
||||||
|
startDate = startDate.split("-");
|
||||||
|
endDate = endDate.split("-");
|
||||||
|
startDate = new Date(startDate[0],startDate[1],startDate[2]);
|
||||||
|
endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
||||||
|
|
||||||
if (document.getElementById('form[SCH_START_DATE]').value==''){
|
if (document.getElementById('form[SCH_START_DATE]').value==''){
|
||||||
requiredFields = requiredFields + 'Start Date,';
|
requiredFields = requiredFields + 'Start Date,';
|
||||||
@@ -782,7 +802,7 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getElementById('form[SCH_START_TIME]').value==''){
|
if (document.getElementById('form[SCH_START_TIME]').value=='') {
|
||||||
requiredFields = requiredFields + 'Start Time,';
|
requiredFields = requiredFields + 'Start Time,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
@@ -790,38 +810,36 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
// for time format hh:mm
|
// for time format hh:mm
|
||||||
var regExpString = "([0-1]\\d|2[0-3]):([0-5]\\d)";
|
var regExpString = "([0-1]\\d|2[0-3]):([0-5]\\d)";
|
||||||
var timeRegexp = new RegExp(regExpString);
|
var timeRegexp = new RegExp(regExpString);
|
||||||
if (!timeRegexp.test(document.getElementById('form[SCH_START_TIME]').value)){
|
if (!timeRegexp.test(document.getElementById('form[SCH_START_TIME]').value)) {
|
||||||
msgBox('The time format is invalid','alert');
|
msgBox('The time format is invalid','alert');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (document.getElementById('form[SCH_OPTION]').value == 5) {
|
if (document.getElementById('form[SCH_OPTION]').value == 5) {
|
||||||
if (document.getElementById('form[SCH_REPEAT_EVERY]').value==''){
|
if (document.getElementById('form[SCH_REPEAT_EVERY]').value=='') {
|
||||||
requiredFields = requiredFields + 'Every,';
|
requiredFields = requiredFields + 'Every,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch(document.getElementById('form[SCH_OPTION]').value){
|
switch(document.getElementById('form[SCH_OPTION]').value) {
|
||||||
// daily
|
|
||||||
case '1':
|
case '1':
|
||||||
|
// daily
|
||||||
// if(document.getElementById('form[SCH_DAYS_PERFORM_TASK][1]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][2]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][3]').checked==true){
|
//if(document.getElementById('form[SCH_DAYS_PERFORM_TASK][1]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][2]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][3]').checked==true){
|
||||||
if(document.getElementById('form[SCH_DAYS_PERFORM_TASK]').value!=''){
|
if(document.getElementById('form[SCH_DAYS_PERFORM_TASK]').value!=''){
|
||||||
validFields = true;
|
validFields = true;
|
||||||
} else {
|
} else {
|
||||||
requiredFields = requiredFields + 'Weekdays,';
|
requiredFields = requiredFields + 'Weekdays,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// weekly
|
|
||||||
case '2':
|
case '2':
|
||||||
if (document.getElementById('form[SCH_EVERY_DAYS]').value==''){
|
// weekly
|
||||||
|
if (document.getElementById('form[SCH_EVERY_DAYS]').value=='') {
|
||||||
requiredFields = requiredFields + 'Number of Weeks,';
|
requiredFields = requiredFields + 'Number of Weeks,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
} else {
|
} else {
|
||||||
for (week=1;week<=4;week++){
|
for (week=1;week<=4;week++) {
|
||||||
weekIdOne = 'form[SCH_WEEK_DAYS]['+week+']';
|
weekIdOne = 'form[SCH_WEEK_DAYS]['+week+']';
|
||||||
if (document.getElementById(weekIdOne).checked==true){
|
if (document.getElementById(weekIdOne).checked==true) {
|
||||||
validFields = true;
|
validFields = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@@ -829,9 +847,9 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!validFields){
|
if (!validFields){
|
||||||
for (week=1;week<=3;week++){
|
for (week=1;week<=3;week++) {
|
||||||
weekIdTwo = 'form[SCH_WEEK_DAYS_2]['+(week+4)+']';
|
weekIdTwo = 'form[SCH_WEEK_DAYS_2]['+(week+4)+']';
|
||||||
if (document.getElementById(weekIdTwo).checked==true){
|
if (document.getElementById(weekIdTwo).checked==true) {
|
||||||
validFields = true;
|
validFields = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@@ -839,28 +857,27 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!validFields){
|
if (!validFields) {
|
||||||
requiredFields = requiredFields + 'Weeks,';
|
requiredFields = requiredFields + 'Weeks,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//monthly
|
|
||||||
case '3':
|
case '3':
|
||||||
if (document.getElementById('form[SCH_START_DAY][1]').checked==true||document.getElementById('form[SCH_START_DAY][2]').checked==true){
|
//monthly
|
||||||
for (month=1;month<=4;month++){
|
if (document.getElementById('form[SCH_START_DAY][1]').checked==true||document.getElementById('form[SCH_START_DAY][2]').checked==true) {
|
||||||
|
for (month=1;month<=4;month++) {
|
||||||
monthIdOne = 'form[SCH_MONTHS]['+month+']';
|
monthIdOne = 'form[SCH_MONTHS]['+month+']';
|
||||||
monthIdTwo = 'form[SCH_MONTHS_2]['+(month+4)+']';
|
monthIdTwo = 'form[SCH_MONTHS_2]['+(month+4)+']';
|
||||||
monthIdThree = 'form[SCH_MONTHS_3]['+(month+8)+']';
|
monthIdThree = 'form[SCH_MONTHS_3]['+(month+8)+']';
|
||||||
|
if (document.getElementById(monthIdOne).checked==true||document.getElementById(monthIdTwo).checked==true||document.getElementById(monthIdThree).checked==true) {
|
||||||
if (document.getElementById(monthIdOne).checked==true||document.getElementById(monthIdTwo).checked==true||document.getElementById(monthIdThree).checked==true){
|
|
||||||
validFields = true;
|
validFields = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!validFields){
|
if (!validFields) {
|
||||||
requiredFields = requiredFields + 'Months,';
|
requiredFields = requiredFields + 'Months,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
@@ -868,17 +885,13 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
requiredFields = requiredFields + 'Start Day,';
|
requiredFields = requiredFields + 'Start Day,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
//run once
|
|
||||||
case '4':
|
case '4':
|
||||||
|
|
||||||
validFields = true;
|
|
||||||
|
|
||||||
break;
|
|
||||||
//run once
|
//run once
|
||||||
|
validFields = true;
|
||||||
|
break;
|
||||||
case '5':
|
case '5':
|
||||||
|
//run once
|
||||||
validFields = true;
|
validFields = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -895,7 +908,7 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
msgBox(message, 'alert');
|
msgBox(message, 'alert');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
oForm.submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
<tr style="display: none;">
|
<tr style="display: none;">
|
||||||
<td colspan="2">{$form.SCH_UID}</td>
|
<td colspan="2">{$form.SCH_UID}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr style="display: none;">
|
||||||
|
<td colspan="2">{$form.SCH_LIST}</td>
|
||||||
|
</tr>
|
||||||
<tr style="display: none;">
|
<tr style="display: none;">
|
||||||
<td colspan="2">{$form.SCH_USER_UID}</td>
|
<td colspan="2">{$form.SCH_USER_UID}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
<![CDATA[ SELECT count( * )+1 AS UID FROM CASE_SCHEDULER ]]>
|
<![CDATA[ SELECT count( * )+1 AS UID FROM CASE_SCHEDULER ]]>
|
||||||
<en></en>
|
<en></en>
|
||||||
</SCH_UID>
|
</SCH_UID>
|
||||||
|
<SCH_LIST type="hidden" >
|
||||||
|
</SCH_LIST>
|
||||||
<PHP_CURRENT_DATE type="hidden" >
|
<PHP_CURRENT_DATE type="hidden" >
|
||||||
</PHP_CURRENT_DATE>
|
</PHP_CURRENT_DATE>
|
||||||
|
|
||||||
@@ -230,7 +231,7 @@
|
|||||||
<en>Start a case based on following registered Plugin.</en>
|
<en>Start a case based on following registered Plugin.</en>
|
||||||
</SELECT_PLUGIN>
|
</SELECT_PLUGIN>
|
||||||
|
|
||||||
<SAVE type="submit" onClick="if(validateSchedulerFields()) {return true;} else {return false;}">
|
<SAVE type="button" onClick="validateSchedulerFields(this.form)">
|
||||||
<en>Save</en>
|
<en>Save</en>
|
||||||
</SAVE>
|
</SAVE>
|
||||||
|
|
||||||
@@ -243,7 +244,6 @@ hideAll();
|
|||||||
hideProperties();
|
hideProperties();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function $_GET(q,s) {
|
function $_GET(q,s) {
|
||||||
s = (s) ? s : self.location.search;
|
s = (s) ? s : self.location.search;
|
||||||
var re = new RegExp('&'+q+'=([^&]*)','i');
|
var re = new RegExp('&'+q+'=([^&]*)','i');
|
||||||
@@ -622,51 +622,69 @@ function case_userSchedulerValidate(username, password) {
|
|||||||
* @return true/false boolean
|
* @return true/false boolean
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function validateSchedulerFields(){
|
function validateSchedulerFields(oForm) {
|
||||||
|
|
||||||
getField("SCH_NAME").value = getField("SCH_NAME").value.trim();
|
var schedulerTitle = document.getElementById('form[SCH_NAME]').value;
|
||||||
|
schedulerTitle = schedulerTitle.replace(/^\s*|\s*$/g,"");
|
||||||
|
if (schedulerTitle == '') {
|
||||||
|
document.getElementById('form[SCH_NAME]').focus();
|
||||||
|
msgBox("@G::LoadTranslation(ID_REQUIRED_NAME_CASE_SCHEDULER)", 'alert');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var validFields = true;
|
var listNames = document.getElementById('form[SCH_LIST]').value;
|
||||||
var requiredFields = '';
|
listNames = listNames.split("^");
|
||||||
var badFormatFields = '';
|
if (schedulerTitle.toLowerCase() == (listNames[i]).toLowerCase()) {
|
||||||
var startDate = document.getElementById('form[SCH_START_DATE]').value;
|
if (schedulerTitle == listNames[i]) {
|
||||||
var endDate = document.getElementById('form[SCH_END_DATE]').value;
|
document.getElementById('form[SCH_NAME]').focus();
|
||||||
|
msgBox("@G::LoadTranslation(ID_DUPLICATE_CASE_SCHEDULER_NAME)", 'alert');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getField("SCH_NAME").value = schedulerTitle;
|
||||||
|
|
||||||
startDate = startDate.split("-");
|
var validFields = true;
|
||||||
endDate = endDate.split("-");
|
var requiredFields = '';
|
||||||
startDate = new Date(startDate[0],startDate[1],startDate[2]);
|
var badFormatFields = '';
|
||||||
endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
var startDate = document.getElementById('form[SCH_START_DATE]').value;
|
||||||
|
var endDate = document.getElementById('form[SCH_END_DATE]').value;
|
||||||
|
|
||||||
if (document.getElementById('form[SCH_START_DATE]').value==''){
|
startDate = startDate.split("-");
|
||||||
|
endDate = endDate.split("-");
|
||||||
|
startDate = new Date(startDate[0],startDate[1],startDate[2]);
|
||||||
|
endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
||||||
|
|
||||||
|
if (document.getElementById('form[SCH_START_DATE]').value=='') {
|
||||||
requiredFields = requiredFields + 'Start Date,';
|
requiredFields = requiredFields + 'Start Date,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
} else {
|
} else {
|
||||||
if (document.getElementById('form[SCH_END_DATE]').value!='')
|
if (document.getElementById('form[SCH_END_DATE]').value!='') {
|
||||||
if (startDate>endDate){
|
if (startDate>endDate) {
|
||||||
badFormatFields = badFormatFields + 'Start Date can\'t be greater than End Date';
|
badFormatFields = badFormatFields + 'Start Date can\'t be greater than End Date';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// check if the field time is compliant with the regular expression
|
// check if the field time is compliant with the regular expression
|
||||||
// for time format hh:mm
|
// for time format hh:mm
|
||||||
var regExpString = "([0-1]\\d|2[0-3]):([0-5]\\d)";
|
var regExpString = "([0-1]\\d|2[0-3]):([0-5]\\d)";
|
||||||
var timeRegexp = new RegExp(regExpString);
|
var timeRegexp = new RegExp(regExpString);
|
||||||
if (document.getElementById('form[SCH_OPTION]').value != 5) {
|
if (document.getElementById('form[SCH_OPTION]').value != 5) {
|
||||||
if (!timeRegexp.test(document.getElementById('form[SCH_START_TIME]').value)){
|
if (!timeRegexp.test(document.getElementById('form[SCH_START_TIME]').value)) {
|
||||||
msgBox('The time format is invalid','alert');
|
msgBox('The time format is invalid','alert');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (document.getElementById('form[SCH_START_TIME]').value==''){
|
if (document.getElementById('form[SCH_START_TIME]').value=='') {
|
||||||
requiredFields = requiredFields + 'Execution Time,';
|
requiredFields = requiredFields + 'Execution Time,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (document.getElementById('form[SCH_REPEAT_EVERY]').value==''){
|
if (document.getElementById('form[SCH_REPEAT_EVERY]').value=='') {
|
||||||
requiredFields = requiredFields + 'Every,';
|
requiredFields = requiredFields + 'Every,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch(document.getElementById('form[SCH_OPTION]').value){
|
switch (document.getElementById('form[SCH_OPTION]').value) {
|
||||||
// daily
|
// daily
|
||||||
case '1':
|
case '1':
|
||||||
//if(document.getElementById('form[SCH_DAYS_PERFORM_TASK][1]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][2]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][3]').checked==true){
|
//if(document.getElementById('form[SCH_DAYS_PERFORM_TASK][1]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][2]').checked==true||document.getElementById('form[SCH_DAYS_PERFORM_TASK][3]').checked==true){
|
||||||
@@ -676,17 +694,16 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
requiredFields = requiredFields + 'Weekdays,';
|
requiredFields = requiredFields + 'Weekdays,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// weekly
|
// weekly
|
||||||
case '2':
|
case '2':
|
||||||
if (document.getElementById('form[SCH_EVERY_DAYS]').value==''){
|
if (document.getElementById('form[SCH_EVERY_DAYS]').value=='') {
|
||||||
requiredFields = requiredFields + 'Number of Weeks,';
|
requiredFields = requiredFields + 'Number of Weeks,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
} else {
|
} else {
|
||||||
for (week=1;week<=4;week++){
|
for (week=1;week<=4;week++) {
|
||||||
weekIdOne = 'form[SCH_WEEK_DAYS]['+week+']';
|
weekIdOne = 'form[SCH_WEEK_DAYS]['+week+']';
|
||||||
if (document.getElementById(weekIdOne).checked==true){
|
if (document.getElementById(weekIdOne).checked==true) {
|
||||||
validFields = true;
|
validFields = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@@ -696,7 +713,7 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
if (!validFields){
|
if (!validFields){
|
||||||
for (week=1;week<=3;week++){
|
for (week=1;week<=3;week++){
|
||||||
weekIdTwo = 'form[SCH_WEEK_DAYS_2]['+(week+4)+']';
|
weekIdTwo = 'form[SCH_WEEK_DAYS_2]['+(week+4)+']';
|
||||||
if (document.getElementById(weekIdTwo).checked==true){
|
if (document.getElementById(weekIdTwo).checked==true) {
|
||||||
validFields = true;
|
validFields = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@@ -733,20 +750,14 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
requiredFields = requiredFields + 'Start Day,';
|
requiredFields = requiredFields + 'Start Day,';
|
||||||
validFields = false;
|
validFields = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
//run once
|
//run once
|
||||||
case '4':
|
case '4':
|
||||||
|
|
||||||
validFields = true;
|
validFields = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
//run every
|
//run every
|
||||||
case '5':
|
case '5':
|
||||||
|
|
||||||
validFields = true;
|
validFields = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
validFields = false;
|
validFields = false;
|
||||||
@@ -757,12 +768,12 @@ endDate = new Date(endDate[0],endDate[1],endDate[2]);
|
|||||||
msgBox(message, 'alert');
|
msgBox(message, 'alert');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (badFormatFields!=''){
|
if (badFormatFields!='') {
|
||||||
var message = badFormatFields;
|
var message = badFormatFields;
|
||||||
msgBox(message, 'alert');
|
msgBox(message, 'alert');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
oForm.submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user