com_release_checking/admin/views/context/submitbutton.js

24 lines
753 B
JavaScript

/**
* @package Joomla.CMS
* @maintainer Llewellyn van der Merwe <https://git.vdm.dev/Llewellyn>
*
* @created 29th July, 2020
* @copyright (C) 2020 Open Source Matters, Inc. <http://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Joomla.submitbutton = function(task)
{
if (task == ''){
return false;
} else {
var action = task.split('.');
if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('context, some values are not acceptable.','Some values are unacceptable'));
return false;
}
}
}