2015-12-01 05:06:34 +00:00
|
|
|
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
|
|
|
Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
|
|
|
/-------------------------------------------------------------------------------------------------------/
|
|
|
|
|
2015-12-17 14:38:15 +00:00
|
|
|
@version 3.1.0
|
|
|
|
@build 17th December, 2015
|
2015-12-01 05:06:34 +00:00
|
|
|
@created 15th June, 2012
|
|
|
|
@package Cost Benefit Projection
|
|
|
|
@subpackage submitbutton.js
|
|
|
|
@author Llewellyn van der Merwe <http://www.vdm.io>
|
|
|
|
@owner Deutsche Gesellschaft für International Zusammenarbeit (GIZ) Gmb
|
|
|
|
@copyright Copyright (C) 2015. All Rights Reserved
|
|
|
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
|
|
|
|
/-------------------------------------------------------------------------------------------------------/
|
|
|
|
Cost Benefit Projection Tool.
|
|
|
|
/------------------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
Joomla.submitbutton = function(task)
|
|
|
|
{
|
|
|
|
if (task == ''){
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
var isValid=true;
|
|
|
|
var action = task.split('.');
|
|
|
|
if (action[1] != 'cancel' && action[1] != 'close'){
|
|
|
|
var forms = $$('form.form-validate');
|
|
|
|
for (var i=0;i<forms.length;i++){
|
|
|
|
if (!document.formvalidator.isValid(forms[i])){
|
|
|
|
isValid = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isValid){
|
|
|
|
Joomla.submitform(task);
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
alert(Joomla.JText._('country, some values are not acceptable.','Some values are unacceptable'));
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|