mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
22 lines
817 B
Plaintext
22 lines
817 B
Plaintext
-# Not all inputs are ng inputs, they don't make the ng-form dirty on change.
|
|
-# 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",
|
|
"ng-app" => 'admin.enterprises',
|
|
"ng-submit" => "navClear()",
|
|
"ng-controller" => 'enterpriseCtrl',
|
|
'onchange' => 'angular.element(enterprise).scope().enterprise.$setDirty()',
|
|
} do |f|
|
|
.row
|
|
.sixteen.columns.alpha
|
|
.four.columns.alpha
|
|
= render 'admin/shared/side_menu'
|
|
.one.column
|
|
.eleven.columns.omega.fullwidth_inputs
|
|
= render 'form', f: f
|
|
.row
|
|
.five.columns.alpha
|
|
|
|
.eleven.columns.alpha
|
|
= render partial: "spree/admin/shared/#{action}_resource_links"
|