You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New boolean property Dialog::overrideYiiConfirm which defaults to true. Setting this to true will override all Yii confirmation dialogs with Krajee Dialog.
The text was updated successfully, but these errors were encountered:
How should this property be set?
I have tried either : \Yii::$container->set('kartik\dialog\Dialog', ['overrideYiiConfirm' => false]); or \Yii::$container->set('kartik\dialog\Dialog', ['useNative' => true]); in base controller and they both work. What is the best practice? Can it be set in the config files? It is an extension, but documentation on modification of extensions in config files is not easy to find. Thank you for all your excellent work. @kartik-v
Yes you need to do that way if you need to override the widget defaults. You can use either of the settings depending on what you need (useNative will always render the native browser dialog - while overrideYiiConfirm will just set it for the data-confirm behavior of yii).
But the recommended way to set this specific widget is to initialize the Dialog widget in your global view layout file that will be applied for all the views where you are using the specific layout.
You can then trigger the dialogs via javascript using the dialogLib krajeeDialog.
New boolean property
Dialog::overrideYiiConfirm
which defaults totrue
. Setting this totrue
will override all Yii confirmation dialogs with Krajee Dialog.The text was updated successfully, but these errors were encountered: