0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 17:30:29 +01:00

Merge pull request #201 from paviliondev/file-upload-test

Fix manager fix uploads
Dieser Commit ist enthalten in:
Angus McLeod 2022-08-15 16:35:12 +02:00 committet von GitHub
Commit f7d074fb05
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
4 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -68,7 +68,7 @@ export default Controller.extend({
file: null, file: null,
filename: null, filename: null,
}); });
$("#file-upload").val(""); document.getElementById("custom-wizard-file-upload").value = "";
}, },
@observes("importing", "destroying") @observes("importing", "destroying")
@ -83,7 +83,7 @@ export default Controller.extend({
actions: { actions: {
upload() { upload() {
$("#file-upload").click(); document.getElementById("custom-wizard-file-upload").click();
}, },
clearFile() { clearFile() {
@ -102,7 +102,7 @@ export default Controller.extend({
if (maxFileSize < file.size) { if (maxFileSize < file.size) {
this.setMessage("error", "file_size_error"); this.setMessage("error", "file_size_error");
this.set("file", null); this.set("file", null);
$("#file-upload").val(""); document.getElementById("custom-wizard-file-upload").value = "";
} else { } else {
this.setProperties({ this.setProperties({
file, file,

Datei anzeigen

@ -12,7 +12,7 @@
{{/if}} {{/if}}
{{input {{input
id="file-upload" id="custom-wizard-file-upload"
type="file" type="file"
accept="application/json" accept="application/json"
input=(action "setFile")}} input=(action "setFile")}}

Datei anzeigen

@ -26,7 +26,7 @@
} }
} }
#file-upload { #custom-wizard-file-upload {
display: none; display: none;
} }

Datei anzeigen

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
# name: discourse-custom-wizard # name: discourse-custom-wizard
# about: Create custom wizards # about: Create custom wizards
# version: 1.22.4 # version: 1.22.5
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George
# url: https://github.com/paviliondev/discourse-custom-wizard # url: https://github.com/paviliondev/discourse-custom-wizard
# contact_emails: development@pavilion.tech # contact_emails: development@pavilion.tech