mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Set enterprise form dirty on any change
Commit 4953c69123 introduced a bug that
the save button is not activated when changing enterprise fields.
https://github.com/openfoodfoundation/openfoodnetwork/issues/2195
This is reverting the change and fixes #2195.
Sadly, it re-opens
https://github.com/openfoodfoundation/openfoodnetwork/issues/1216.
But that one is not as severe as the current bug.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
-# ng-change is only valid for inputs, not for a form.
|
||||
-# So we use onchange and have to get the scope to access the ng controller
|
||||
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise_form",
|
||||
onchange: "angular.element(enterprise_form).scope().setFormDirty()",
|
||||
"ng-controller" => 'enterpriseCtrl',
|
||||
"ng-cloak" => true } do |f|
|
||||
|
||||
|
||||
Reference in New Issue
Block a user