Going back to the input from the preview no longer empties the textfield, allowing for easier edits before importing
This commit is contained in:
parent
b6a1af9926
commit
3e9bc42ca4
4 changed files with 19 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ export class DHImporterApp extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
this.step = "input";
|
||||
this.parsedData = null;
|
||||
this.parsedDataType = null;
|
||||
this.inputText = "";
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -45,7 +46,8 @@ export class DHImporterApp extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
types: {
|
||||
adversary: "Adversary",
|
||||
environment: "Environment"
|
||||
}
|
||||
},
|
||||
inputText: this.inputText
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -75,6 +77,9 @@ export class DHImporterApp extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
const text = form.querySelector("textarea[name='text']").value;
|
||||
const type = form.querySelector("select[name='type']").value;
|
||||
|
||||
// Store input text
|
||||
this.inputText = text;
|
||||
|
||||
if (!text) {
|
||||
ui.notifications.warn("Please enter text to import.");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue