english/libraries/joomla/html/toolbar/button/confirm.php
/**
	 * Get the JavaScript command for the button
	 *
	 * @param   object  $definition	Button definition
	 *
	 * @return  string  JavaScript command string
	 * @since   11.1
	 */
Get the JavaScript command for the button
@param   object  $definition Button definition

@return  string  JavaScript command string
@since   11.1
Get the JavaScript command for the button @param object $definition Button definition @return string JavaScript command string @since 11 . 1
protected function _getCommand($msg, $name, $task, $list)
	{
		JHtml::_('behavior.framework');
		$message	= JText::_('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST');
		$message	= addslashes($message);
		if ($list) {
			$cmd = "javascript:if (document.adminForm.boxchecked.value==0){alert('$message');}else{if (confirm('$msg')){Joomla.submitbutton('$task');}}";
		} else {
			$cmd = "javascript:if (confirm('$msg')){Joomla.submitbutton('$task');}";
		}
		return $cmd;
	}
protected function _getCommand ( $ msg , $ name , $ task , $ list ) { JHtml :: _ ( 'behavior.framework' ) ; $ message = JText :: _ ( 'JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST' ) ; $ message = addslashes ( $ message ) ; if ( $ list ) { $ cmd = " javascript:if (document.adminForm.boxchecked.value==0){alert(' $ message ');}else{if (confirm(' $ msg ')){Joomla.submitbutton(' $ task ');}} " ; } else { $ cmd = " javascript:if (confirm(' $ msg ')){Joomla.submitbutton(' $ task ');} " ; } return $ cmd ; }
Get the JavaScript command for the button
 @param   object  $definition Button definition
Get the JavaScript command for the button @param object $definition Button definition