Change button labels and color in delete confirmation dialog for all objects to improve UX. #6513

This commit is contained in:
Rohit Bhati
2024-12-18 17:25:36 +05:30
committed by GitHub
parent 2ba4f79a46
commit 8af25ba0c1
13 changed files with 72 additions and 29 deletions

View File

@@ -525,7 +525,7 @@ define('pgadmin.browser.node', [
title = gettext('Delete FORCE %s?', obj.label);
} else if (input.url == 'delete') {
msg = gettext('Are you sure you want to delete %s <b>"%s"</b> and all the objects that depend on it?',
msg = gettext('Are you sure you want to delete the %s <b>"%s"</b> and all the objects that depend on it?',
obj.label.toLowerCase(), d.label);
title = gettext('Delete CASCADE %s?', obj.label);
@@ -539,10 +539,10 @@ define('pgadmin.browser.node', [
}
} else {
if (obj.dropAsRemove) {
msg = gettext('Are you sure you want to remove %s "%s"?', obj.label.toLowerCase(), d.label);
msg = gettext('Are you sure you want to remove the %s <b>"%s"</b>?', obj.label.toLowerCase(), d.label);
title = gettext('Remove %s?', obj.label);
} else {
msg = gettext('Are you sure you want to delete %s <b>"%s"</b>?', obj.label.toLowerCase(), d.label);
msg = gettext('Are you sure you want to delete the %s <b>"%s"</b>?', obj.label.toLowerCase(), d.label);
title = gettext('Delete %s?', obj.label);
}
@@ -555,7 +555,7 @@ define('pgadmin.browser.node', [
return;
}
}
pgAdmin.Browser.notifier.confirm(title, msg,
pgAdmin.Browser.notifier.confirmDelete(title, msg,
function() {
getApiInstance().delete(
obj.generate_url(i, input.url, d, true),
@@ -592,7 +592,10 @@ define('pgadmin.browser.node', [
}
pgAdmin.Browser.notifier.alert(gettext('Error dropping/removing %s: "%s"', obj.label, objName), errmsg);
});
}
},
() => {},
gettext('Delete'),
gettext('Cancel'),
);
},
// Callback for creating script(s) & opening them in Query editor