Component-Builder/admin/compiler/joomla_3/submitbutton_site.js

27 lines
607 B
JavaScript
Raw Normal View History

2016-01-30 20:28:43 +00:00
###BOM###
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._('###sview###, some values are not acceptable.','Some values are unacceptable'));
return false;
}
}
}