/** * Constructor * @param $dialogText string The localized text to appear * in the dialog modal. * @param $title string (optional) The localized modal title. * @param $titleIcon string (optional) The icon to be used * in the modal title bar. * @param $okButton string (optional) The localized text to * appear on the confirmation button. * @param $cancelButton string (optional) The localized text to * appear on the cancel button. * @param $canClose boolean (optional) Whether the modal will * have a close button. * @param $width int (optional) Override the default width of 'auto' * for confirmation modals. Useful for modals that display * large blocks of text. */ function ConfirmationModal($dialogText, $title = null, $titleIcon = 'modal_confirm', $okButton = null, $cancelButton = null, $canClose = true, $width = MODAL_WIDTH_AUTO) { $title = is_null($title) ? __('common.confirm') : $title; parent::Modal($title, $titleIcon, $canClose, $width); $this->_okButton = is_null($okButton) ? __('common.ok') : $okButton; $this->_cancelButton = is_null($cancelButton) ? __('common.cancel') : $cancelButton; $this->_dialogText = $dialogText; }
/** * Constructor * @param $dialogText string (optional) * @param $title string (optional) * @param $remoteAction string (optional) A URL to be called * when the confirmation button is clicked. * @param $titleIcon string (optional) * @param $okButton string (optional) * @param $cancelButton string (optional) * @param $canClose boolean (optional) */ function ConfirmationModal($dialogText, $title = null, $remoteAction = null, $titleIcon = null, $okButton = 'common.ok', $cancelButton = 'common.cancel', $canClose = true) { parent::Modal($title, $titleIcon, $canClose); $this->_remoteAction = $remoteAction; $this->_okButton = $okButton; $this->_cancelButton = $cancelButton; $this->_dialogText = $dialogText; }
/** * Constructor * @param $url string The URL of the AJAX resource to load into the modal. * @param $title string (optional) The localized modal title. * @param $titleIcon string (optional) The icon to be used in the modal title bar. * @param $canClose boolean (optional) Whether the modal will have a close button. */ function AjaxModal($url, $title = null, $titleIcon = null, $canClose = true) { parent::Modal($title, $titleIcon, $canClose); $this->_url = $url; }