mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
When a user hit cancel while editing a product it took them to the spree products index page instead of the bulk edit page. The button was part of a shared view for all resources so changing it's actions were not readily available. It was suggested that instead of carrying our own separate controller action we could just override the index action of the products controller with the bulk edit functionality instead. This has the advantage of removing some overrides and allows us to not add additional overrides in the future.
11 lines
655 B
Plaintext
11 lines
655 B
Plaintext
%a.close-reveal-modal{"ng-click" => "$close()"}
|
|
%i.fa.fa-times-circle{'aria-hidden' => "true"}
|
|
|
|
%form#image_upload{ name: 'form', novalidate: true, enctype: 'multipart/form-data', multipart: true, ng: { controller: "ProductImageCtrl" } }
|
|
%div.image-preview
|
|
%img.spinner{ src: "/assets/spinning-circles.svg", ng: { hide: "!imageUploader.isUploading" }}
|
|
%img.preview{ng: {src: "{{imagePreview}}", class: "{'faded': imageUploader.isUploading}"}}
|
|
|
|
%label{for: 'image-upload', class: 'button'} {{ 'admin.products.index.upload_an_image' | t }}
|
|
%input#image-upload{hidden: true, type: 'file', 'nv-file-select' => true, uploader: "imageUploader"}
|