Open Journal Systems  3.3.0
ConfirmationModal Class Reference
Inheritance diagram for ConfirmationModal:
Modal LinkActionRequest JsEventConfirmationModal RedirectConfirmationModal RemoteActionConfirmationModal

Public Member Functions

 __construct ($dialogText, $title=null, $titleIcon='modal_confirm', $okButton=null, $cancelButton=null, $canClose=true)
 
 getCancelButton ()
 
 getDialogText ()
 
 getLocalizedOptions ()
 
 getOkButton ()
 
- Public Member Functions inherited from Modal
 __construct ($title=null, $titleIcon=null, $canClose=true, $closeOnFormSuccessId=null, $closeCleanVueInstances=[])
 
 getCanClose ()
 
 getCloseButtonText ()
 
 getJSLinkActionRequest ()
 
 getTitle ()
 
 getTitleIcon ()
 
- Public Member Functions inherited from LinkActionRequest
 __construct ()
 

Data Fields

 $_cancelButton
 
 $_dialogText
 
 $_okButton
 
- Data Fields inherited from Modal
 $_canClose
 
 $_closeCleanVueInstances
 
 $_closeOnFormSuccessId
 
 $_title
 
 $_titleIcon
 

Detailed Description

Class defining a simple confirmation modal either with remote action or not.

Definition at line 18 of file ConfirmationModal.inc.php.

Constructor & Destructor Documentation

◆ __construct()

ConfirmationModal::__construct (   $dialogText,
  $title = null,
  $titleIcon = 'modal_confirm',
  $okButton = null,
  $cancelButton = null,
  $canClose = true 
)

Constructor

Parameters
$dialogTextstring The localized text to appear in the dialog modal.
$titlestring (optional) The localized modal title.
$titleIconstring (optional) The icon to be used in the modal title bar.
$okButtonstring (optional) The localized text to appear on the confirmation button.
$cancelButtonstring (optional) The localized text to appear on the cancel button.
$canCloseboolean (optional) Whether the modal will have a close button.
$widthint (optional) Override the default width of 'auto' for confirmation modals. Useful for modals that display large blocks of text.

Definition at line 63 of file ConfirmationModal.inc.php.

Member Function Documentation

◆ getCancelButton()

ConfirmationModal::getCancelButton ( )

Get the translation key for the cancel button text.

Returns
string

Definition at line 91 of file ConfirmationModal.inc.php.

References $_cancelButton.

Referenced by getLocalizedOptions().

◆ getDialogText()

ConfirmationModal::getDialogText ( )

Get the translation key for the dialog text.

Returns
string

Definition at line 100 of file ConfirmationModal.inc.php.

References $_dialogText.

Referenced by getLocalizedOptions().

◆ getLocalizedOptions()

ConfirmationModal::getLocalizedOptions ( )

◆ getOkButton()

ConfirmationModal::getOkButton ( )

Get the translation key for the confirmation button text.

Returns
string

Definition at line 82 of file ConfirmationModal.inc.php.

References $_okButton.

Referenced by getLocalizedOptions().

Field Documentation

◆ $_cancelButton

string ConfirmationModal::$_cancelButton

a translation key defining the text for the cancel button of the modal.

Definition at line 35 of file ConfirmationModal.inc.php.

Referenced by getCancelButton().

◆ $_dialogText

string ConfirmationModal::$_dialogText

a translation key defining the text for the dialog text.

Definition at line 44 of file ConfirmationModal.inc.php.

Referenced by getDialogText().

◆ $_okButton

string ConfirmationModal::$_okButton

A translation key defining the text for the confirmation button of the modal.

Definition at line 26 of file ConfirmationModal.inc.php.

Referenced by getOkButton().


The documentation for this class was generated from the following file: