From fdfeda689ab8820070c1cea08a3933354c3f4808 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Fri, 15 Aug 2025 22:38:49 +0200 Subject: [PATCH] Set the finish buttons on levelup and creation to disable after first click --- module/applications/characterCreation/characterCreation.mjs | 4 +++- module/applications/levelup/levelup.mjs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/applications/characterCreation/characterCreation.mjs b/module/applications/characterCreation/characterCreation.mjs index 693f6c5a..f9f832e8 100644 --- a/module/applications/characterCreation/characterCreation.mjs +++ b/module/applications/characterCreation/characterCreation.mjs @@ -494,7 +494,9 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl this.render(); } - static async finish() { + static async finish(_, button) { + button.disabled = true; + const primaryAncestryFeature = this.setup.primaryAncestry.system.primaryFeature; const secondaryAncestryFeature = this.setup.secondaryAncestry?.uuid ? this.setup.secondaryAncestry.system.secondaryFeature diff --git a/module/applications/levelup/levelup.mjs b/module/applications/levelup/levelup.mjs index 4cca1194..0b3f8970 100644 --- a/module/applications/levelup/levelup.mjs +++ b/module/applications/levelup/levelup.mjs @@ -650,7 +650,9 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2) this.render(); } - static async save() { + static async save(_, button) { + button.disabled = true; + const levelupData = Object.keys(this.levelup.levels).reduce((acc, level) => { if (level >= this.levelup.startLevel) { acc[level] = this.levelup.levels[level].toObject();