Skip to content
Snippets Groups Projects
Commit 4191e8d7 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

disable import button if file isn't valid

parent 217da943
No related branches found
No related tags found
1 merge request!728REDMINE_ISSUE-19251 | Listes de valeurs pré-enr. - Vérification que l'option existe bien dans la liste ne fonctionne pas dans le cas où j'ai un string
......@@ -765,6 +765,9 @@ export default {
if (jsonValidity) {
this.geojsonFileToImport = files[0]; // TODO: Remove this value from state as it is stored (first attempt didn't work)
this.SET_FILE_TO_IMPORT(this.geojsonFileToImport);
} else {
// Clear any previously selected geojson file to disable import button
this.geojsonFileToImport = geojsonFileToImport;
}
// Stop the loading process
......@@ -826,6 +829,9 @@ export default {
if (csvValidity) {
this.csvFileToImport = files[0]; // TODO: Remove this value from state as it is stored (first attempt didn't work)
this.SET_FILE_TO_IMPORT(this.csvFileToImport);
} else {
// Clear any previously selected geojson file to disable import button
this.csvFileToImport = csvFileToImport;
}
// Stop the loading process
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment