Force description when submitting a recognizer report (#1547)

This commit is contained in:
Martynas Bagdonas 2018-08-13 23:14:18 +08:00 committed by Dan Stillman
parent 8d8410ffa0
commit 51996b537d

View file

@ -4672,12 +4672,17 @@ var ZoteroPane = new function()
if(!items.length) return; if(!items.length) return;
let input = {value: ''}; let input = {value: ''};
Services.prompt.prompt( let confirmed;
null, do {
Zotero.getString('recognizePDF.reportMetadata'), confirmed = Services.prompt.prompt(
Zotero.getString('general.describeProblem'), null,
input, null, {} Zotero.getString('recognizePDF.reportMetadata'),
); Zotero.getString('general.describeProblem'),
input, null, {}
);
} while(confirmed && !input.value);
if(!confirmed) return;
try { try {
await Zotero.RecognizePDF.report(items[0], input.value); await Zotero.RecognizePDF.report(items[0], input.value);