mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Rename prepareProductsForSubmit to submitProducts
This commit is contained in:
@@ -261,7 +261,7 @@ productsApp.controller "AdminBulkProductsCtrl", [
|
||||
$scope.displayFailure "Server returned with error status: " + status
|
||||
|
||||
|
||||
$scope.prepareProductsForSubmit = ->
|
||||
$scope.submitProducts = ->
|
||||
productsToSubmit = filterSubmitProducts($scope.dirtyProducts)
|
||||
$scope.updateProducts productsToSubmit
|
||||
|
||||
|
||||
@@ -77,6 +77,6 @@
|
||||
%td.actions
|
||||
%td.actions
|
||||
%a{ 'ng-click' => 'deleteVariant(product,variant)', :class => "delete-variant icon-trash no-text" }
|
||||
%input{ :type => 'button', :value => 'Update', 'ng-click' => 'prepareProductsForSubmit()'}
|
||||
%input{ :type => 'button', :value => 'Update', 'ng-click' => 'submitProducts()'}
|
||||
%span{ id: "update-status-message", 'ng-style' => 'updateStatusMessage.style' }
|
||||
{{ updateStatusMessage.text }}
|
||||
|
||||
@@ -480,7 +480,7 @@ describe "AdminBulkProductsCtrl", ->
|
||||
2:
|
||||
id: 2
|
||||
|
||||
scope.prepareProductsForSubmit()
|
||||
scope.submitProducts()
|
||||
|
||||
it "filters returned dirty products", ->
|
||||
expect(filterSubmitProducts).toHaveBeenCalledWith
|
||||
|
||||
Reference in New Issue
Block a user