From b692cb0cd14f0ac03cc47781adf16c992888a1e7 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 5 Dec 2024 18:03:30 +0100 Subject: [PATCH] chore: rename Importer.isValid to Importer.canSubmit We are not really checking the validity of the form. --- umap/static/umap/js/modules/importer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/modules/importer.js b/umap/static/umap/js/modules/importer.js index cd9e7356..756a1d2e 100644 --- a/umap/static/umap/js/modules/importer.js +++ b/umap/static/umap/js/modules/importer.js @@ -203,7 +203,7 @@ export default class Importer extends Utils.WithTemplate { ) this.qs('[name=layer-name]').toggleAttribute('hidden', Boolean(this.layerId)) this.qs('#clear').toggleAttribute('hidden', !this.layerId) - this.qs('[name=submit').toggleAttribute('disabled', !this.isValid()) + this.qs('[name=submit').toggleAttribute('disabled', !this.canSubmit()) } onFileChange(e) { @@ -258,7 +258,7 @@ export default class Importer extends Utils.WithTemplate { this.qs('[type=file]').showPicker() } - isValid() { + canSubmit() { if (!this.format) return false const hasFiles = Boolean(this.files.length) const hasRaw = Boolean(this.raw)