Author: Hugo Melo <hugo@riseup.net>
Fix units not being passed to import-modal
plugins/suppliers/public/javascripts/views/import-modal.tag.slim | 4 +- plugins/suppliers/public/javascripts/views/product-page.tag.slim | 1
diff --git a/plugins/suppliers/public/javascripts/views/import-modal.tag.slim b/plugins/suppliers/public/javascripts/views/import-modal.tag.slim index 0eb3af54d8883867c45aa0d0f37b9048c3077fca..99067ba21f87249046b6c741762002e20945b6e8 100644 --- a/plugins/suppliers/public/javascripts/views/import-modal.tag.slim +++ b/plugins/suppliers/public/javascripts/views/import-modal.tag.slim @@ -54,14 +54,14 @@ this.t = window.products.t confirmRemoveAll() { var input = $('input.remove_all_suppliers')[0] - if (input.check) + if (input.check) input.check = confirm(t('views.product.import.confirm_remove_all')) } import() { var self = this var importUrl = Routes.suppliers_plugin_product_path({profile: noosfero.profile, action: 'import'}) - + data = new FormData(); data.append( 'csv', $('input.csv')[0].files[0] ) data.append( 'remove_all_suppliers', $('input.remove_all_suppliers')[0].value ) diff --git a/plugins/suppliers/public/javascripts/views/product-page.tag.slim b/plugins/suppliers/public/javascripts/views/product-page.tag.slim index 928445c04965b1c7dca2682d4ac47ff603b0596b..11c7723e251628b12e6ff817b39b2215b004edb7 100644 --- a/plugins/suppliers/public/javascripts/views/product-page.tag.slim +++ b/plugins/suppliers/public/javascripts/views/product-page.tag.slim @@ -288,6 +288,7 @@ input.on('typeahead:selected', selected) } import() { + this.tags['import-modal'].units = opts.units } add() {