diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx
index 71f3285d2..ca8ed1f4b 100644
--- a/web/pgadmin/static/js/SchemaView/index.jsx
+++ b/web/pgadmin/static/js/SchemaView/index.jsx
@@ -445,6 +445,7 @@ function SchemaDialogView({
const isNew = schema.isNew(schema.origData);
const checkIsMounted = useIsMounted();
const preFormReadyQueue = useRef([]);
+ const Notifier = props.Notifier || Notify;
const depListenerObj = useRef(new DepListener());
/* The session data */
@@ -578,7 +579,7 @@ function SchemaDialogView({
};
/* Confirm before reset */
if(props.confirmOnCloseReset) {
- Notify.confirm(
+ Notifier.confirm(
gettext('Warning'),
gettext('Changes will be lost. Are you sure you want to reset?'),
resetIt,
@@ -605,7 +606,7 @@ function SchemaDialogView({
changeData[schema.idAttribute] = schema.origData[schema.idAttribute];
}
if (schema.warningText) {
- Notify.confirm(
+ Notifier.confirm(
gettext('Warning'),
schema.warningText,
()=> {
@@ -626,7 +627,7 @@ function SchemaDialogView({
props.onSave(isNew, changeData)
.then(()=>{
if(schema.informText) {
- Notify.alert(
+ Notifier.alert(
gettext('Warning'),
schema.informText,
);
@@ -785,6 +786,7 @@ SchemaDialogView.propTypes = {
customSaveBtnName: PropTypes.string,
customSaveBtnIconType: PropTypes.string,
formClassName: CustomPropTypes.className,
+ Notifier: PropTypes.object,
};
const usePropsStyles = makeStyles((theme)=>({
diff --git a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx
index bfcf872ef..bfecf7535 100644
--- a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx
+++ b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/NewConnectionDialog.jsx
@@ -249,6 +249,7 @@ export default function NewConnectionDialog({onClose, onSave}) {
disableDialogHelp={true}
isTabView={false}
formClassName={classes.root}
+ Notifier={queryToolCtx.modal}
/>;
}
diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx
index f766ff927..f29eed95c 100644
--- a/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx
+++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/MainToolBar.jsx
@@ -151,6 +151,7 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) {
'rollback': true,
'filter': true,
'limit': false,
+ 'execute-options': !queryToolCtx.params.is_query_tool,
});
const {openMenuName, toggleMenu, onMenuClose} = usePgMenuGroup();
const [checkedMenuItems, setCheckedMenuItems] = React.useState({});
@@ -306,9 +307,11 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) {
if(isInTxn()) {
setDisableButton('commit', false);
setDisableButton('rollback', false);
+ setDisableButton('execute-options', true);
} else {
setDisableButton('commit', true);
setDisableButton('rollback', true);
+ setDisableButton('execute-options', !queryToolCtx.params.is_query_tool);
}
eventBus.registerListener(QUERY_TOOL_EVENTS.WARN_TXN_CLOSE, warnTxnClose);
return ()=>{
@@ -338,7 +341,7 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) {
});
};
const onHelpClick=()=>{
- let url = url_for('help.static', {'filename': 'query_tool.html'});
+ let url = url_for('help.static', {'filename': queryToolCtx.params.is_query_tool ? 'query_tool.html' : 'editgrid.html'});
window.open(url, 'pgadmin_help');
};
const confirmDiscard=(callback)=>{
@@ -504,7 +507,7 @@ export function MainToolBar({containerRef, onFilterClick, onManageMacros}) {
onClick={executeQuery} disabled={buttonsDisabled['execute']} shortcut={queryToolPref.execute_query}/>
} splitButton
name="menu-autocommit" ref={autoCommitMenuRef} accesskey={shortcut_key(queryToolPref.btn_delete_row)}
- onClick={toggleMenu} disabled={!queryToolCtx.params.is_query_tool}/>
+ onClick={toggleMenu} disabled={buttonsDisabled['execute-options']}/>
}