fix: replace all native confirm() dialogs with styled modal macros
Some checks failed
Some checks failed
Migrated ~68 native browser confirm() calls across 74 files to use the project's confirm_modal/confirm_modal_dynamic Jinja2 macros, providing consistent styled confirmation dialogs instead of plain browser popups. Modules updated: core, tenancy, cms, marketplace, messaging, billing, customers, orders, cart. Uses danger/warning/info variants and double-confirm pattern for destructive delete operations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,9 @@ function storeContentPageEditor(pageId) {
|
||||
loadingDefault: false,
|
||||
defaultContent: null,
|
||||
|
||||
// Delete confirmation modal state
|
||||
showDeletePageConfirm: false,
|
||||
|
||||
// Initialize
|
||||
async init() {
|
||||
// Prevent multiple initializations
|
||||
@@ -211,14 +214,6 @@ function storeContentPageEditor(pageId) {
|
||||
|
||||
// Delete page (revert to default for overrides)
|
||||
async deletePage() {
|
||||
const message = this.isOverride
|
||||
? 'Are you sure you want to revert to the platform default? Your customizations will be lost.'
|
||||
: 'Are you sure you want to delete this page? This cannot be undone.';
|
||||
|
||||
if (!confirm(message)) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
contentPageEditLog.info('Deleting page:', this.pageId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user