/*
*
Display confirm button on alert

@param string $btnText
@param string $btnColor

@return RealRashid\SweetAlert\Toaster::alert();
511460
public function showConfirmButton($btnText = 'Ok', $btnColor = '#3085d6')
    {
        $this->config['showConfirmButton'] = true;
        $this->config['confirmButtonText'] = $btnText;
        $this->config['confirmButtonColor'] = $btnColor;
        $this->config['allowOutsideClick'] = false;
        $this->removeTimer();
        $this->flash();

        return $this;
    }
1369393
public function confirm($question, $yesScript, $noScript)
    {
        $title = $this->getConfirmTitle();
        if(!$noScript)
        {
            return "jaxon.dialogs.bootbox.confirm(" . $question . ",'" .
                $title . "',function(){" . $yesScript . ";})";
        }
        else
        {
            return "jaxon.dialogs.bootbox.confirm(" . $question . ",'" .
                $title . "',function(){" . $yesScript . ";},function(){" . $noScript . ";})";
        }
    }
527455
def confirm(*args, **kwargs):
    """"""
    try:
        return click.confirm(*args, **kwargs)
    except click.Abort:
        return False
955546
function () {
            var t = this,
                prefix = t.o.prefix;

            var $btnPane = t.$btnPane = $('<div/>', {
                class: prefix + 'button-pane'
            });

            $.each(t.o.btns, function (i, btnGrp) {
                if (!$.isArray(btnGrp)) {
                    btnGrp = [btnGrp];
                }

                var $btnGroup = $('<div/>', {
                    class: prefix + 'button-group ' + ((btnGrp.indexOf('fullscreen') >= 0) ? prefix + 'right' : '')
                });
                $.each(btnGrp, function (i, btn) {
                    try { // Prevent buildBtn error
                        if (t.isSupportedBtn(btn)) { // It's a supported button
                            $btnGroup.append(t.buildBtn(btn));
                        }
                    } catch (c) {
                    }
                });

                if ($btnGroup.html().trim().length > 0) {
                    $btnPane.append($btnGroup);
                }
            });

            t.$box.prepend($btnPane);
        }
1342560
public function SendOrderNotification($sSendToMail = null, $sSendToName = null)
    {
        $bOrderSend = false;

        if (is_null($sSendToMail)) {
            $sSendToMail = $this->fieldUserEmail;
        }
        if (is_null($sSendToName)) {
            $sSendToName = $this->fieldAdrBillingFirstname.' '.$this->fieldAdrBillingLastname;
        }

        $oMail = $this->GetOrderNotificationEmailProfile(self::MAIL_CONFIRM_ORDER);

        TCMSImage::ForceNonSSLURLs(true); // force image urls to non ssl for use in order email
        if (is_null($oMail)) {
            $bOrderSend = TGlobal::Translate('chameleon_system_shop.order_notification.error_mail_template_not_found', array('%emailTemplate%' => self::MAIL_CONFIRM_ORDER));
        } else {
            $aMailData = $this->sqlData;
            $aMailData = $this->AddOrderNotificationEmailData($aMailData);
            $aMailData = $this->AddOrderNotificationEmailComplexData($aMailData);
            $oMail->AddDataArray($aMailData);
            $aOrderDetails = $this->GetSQLWithTablePrefix();
            $oMail->AddDataArray($aOrderDetails);
            $oMail->ChangeToAddress($sSendToMail, $sSendToName);
            $bOrderSend = $oMail->SendUsingObjectView('emails', 'Customer');
            $this->SaveOrderNotificationDataToOrder($bOrderSend, $oMail, $sSendToMail);
        }
        TCMSImage::ForceNonSSLURLs(false); // reset - force non ssl urls

        return $bOrderSend;
    }
508187
public function setText($strText)
    {

        // If text passed in, clean it up and store it for subsequent queries
        if ($strText !== false) {
            self::$strText = Text::cleanText($strText);
        }

        return self::$strText;
    }
838534
public function alert($msg)
    {
        if (is_array($msg)) {
            $msg = join("\n", $msg);
        }

        $this->last_selector = null;

        return $this->cmd(1, array($this->typecast($msg, true)));
    }
898433
public function acceptAlert()
    {
        try {
            $this->session->accept_alert();
        } catch (\WebDriver\Exception\NoAlertOpenError $e) {
            throw new PHPUnitException(
                "Well, tried to accept the alert, but there wasn't one. Dangit."
            );
        }

        return $this;
    }
813987
private JButton getBtnOk() {
		if (btnOk == null) {
			btnOk = new JButton();
			btnOk.setText(Constant.messages.getString("alert.add.button.save"));
			btnOk.addActionListener(new java.awt.event.ActionListener() { 

				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {
					Alert alert = alertViewPanel.getAlert();
					try {
						ExtensionAlert extAlert = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAlert.class);
						if (alert.getAlertId() >= 0) {
							// Its an existing alert so save it
							extAlert.updateAlert(alert);
						} else {
						    if (httpMessage != null) {
						        historyRef = new HistoryReference(Model.getSingleton().getSession(), historyType, httpMessage);
						    }
						    
						    alert.setSource(Alert.Source.MANUAL);
						    // Raise it
							extAlert.alertFound(alert, historyRef);
						}
					} catch (Exception ex) {
					    logger.error(ex.getMessage(), ex);
					}
					clearAndCloseDialog();
				}
			});

		}
		return btnOk;
	}
549911
public function setButtonCheckboxAction(
        string $url = null,
        string $addPostUrl = null,
        string $text = null,
        string $confirmText = null,
        string $class = null,
        string $icon = ''
    ): ButtonInterface {
        $addPostUrl = $addPostUrl ?: '?deleted=';
        $class = $class ?: 'btn btn-default btn-outline-primary js_btnCustomAction js_linkDelete';
        $text = $text ?: GridView::trans('grid.selectDelete');
        $confirmText = $confirmText ?: GridView::trans('grid.clickDelete');

        return $this->setActionCustom($url . $addPostUrl, $text, $class, $icon)
            ->setAction(self::TYPE_ACTION_CUSTOM)
            ->setConfirmText($confirmText)
            ->setOptions([
                'data-url'     => $this->getUrl(),
                'data-confirm' => $confirmText,
            ]);
    }
723138
public function notify() : ResponseHelper {
        $this->notified = true;

        app('antares.messages')->add($this->type, $this->message);

        return $this;
    }
109266
public static function CreateSubmitCancelButton($captionSubmit, $captionCancel, $urlCancel)
	{
		$button = XmlInputButtons::CreateSubmitButton($captionSubmit);
		$button->addButton($captionCancel, "cancel", "javacript:window.location = '$urlCancel'");
		return $button;
	}
843025
public function alert()
	{
		?>
		<p>The format of the function is:</p>
		<pre class="code php">alert($html, $class = 'info', $icon = '');</pre>
		<?php
		p('Pass text only to output a basic Bootstrap "info" alert box:');
		alert('Just text passed');

		p('Pass a 2nd argument of a Bootstrap <a href="http://getbootstrap.com/components/#alerts" target="_blank">alert</a> message class:');
		alert('Passed with "success"', 'success');
		alert('Passed with "warning"', 'warning');
		alert('Passed with "danger"', 'danger');

		p('Pass a 2nd argument of a boolean state to render tick or cross icons:');
		alert('Passed with true', true);
		alert('Passed with false', false);

		p('Pass a 3rd argument of a string to render a custom <a href="http://fontawesome.io/icons/" target="_blank">Font Awesome</a> icon:');
		alert('Passed with "info" and "info"', 'info', 'info');
		alert('Passed with "warning" and "bolt"', 'warning', 'bolt');
	}
39866
public function &createAction(string $type, string $text, string $href = '', bool $ajax = false, string $confirm = ''): Action
    {
        $action = new Action();

        $action->setType($type);
        $action->setText($text);

        if (!empty($href)) {
            $action->setHref($href);
        }

        $action->setAjax($ajax);

        if (!empty($confirm)) {
            $action->setConfirm('confirm');
        }

        $this->addAction($action);

        return $action;
    }
1117689
protected function askYesNo(string $description, boolean $default)
    {
        $helper   = $this->getHelper('question');
        $question = new ConfirmationQuestion($description, $default);

        return $helper->ask($this->input, $this->output, $question);
    }
152842
public function confirm_select($nowait = false)
    {
        list($class_id, $method_id, $args) = $this->protocolWriter->confirmSelect($nowait);

        $this->send_method_frame(array($class_id, $method_id), $args);

        if ($nowait) {
            return null;
        }

        $this->wait(array(
            $this->waitHelper->get_wait('confirm.select_ok')
        ), false, $this->channel_rpc_timeout);
        $this->next_delivery_tag = 1;
    }
367315
public static function sendBlackAlert(string $text, int $to_user_id = USER_ID, int $from_user_id = 0): UsersMessageEntity
    {
        return self::sendMessage($text, $to_user_id, $from_user_id, self::TOASTR_MESSAGE_COLOR_BLACK);
    }