mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
Fix submit on close
This commit is contained in:
parent
6223b05eb1
commit
0d60cd90b6
6 changed files with 27 additions and 6 deletions
|
|
@ -15,7 +15,9 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
|||
width: 400,
|
||||
height: 'auto'
|
||||
},
|
||||
actions: {},
|
||||
actions: {
|
||||
submitRoll: this.submitRoll
|
||||
},
|
||||
form: {
|
||||
handler: this.updateRollConfiguration,
|
||||
submitOnChange: true,
|
||||
|
|
@ -38,6 +40,15 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
|||
return context;
|
||||
}
|
||||
|
||||
static async submitRoll() {
|
||||
await this.close({ submitted: true });
|
||||
}
|
||||
|
||||
/** @override */
|
||||
_onClose(options={}) {
|
||||
if ( !options.submitted ) this.config = false;
|
||||
}
|
||||
|
||||
static async configure(config={}) {
|
||||
return new Promise(resolve => {
|
||||
const app = new this(config);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue