-# Not all inputs are ng inputs, they don't make the 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
-# The nav-check-callback is warning on leave if the form is dirty.
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise",
  "ng-app" => 'admin.enterprises',
  "ng-submit" => "navClear()",
  "ng-controller" => 'enterpriseCtrl',
  "nav-check-callback" => 'enterpriseNavCallback',
  'onchange' => 'angular.element(enterprise).scope().enterprise.$setDirty()',
  } do |f|
  .row
    .sixteen.columns.alpha
      .four.columns.omega
        = render 'side_menu'
      .one.column &nbsp;
      .eleven.columns.alpha.fullwidth_inputs
        = render 'form', f: f
  .row
    .twelve.columns.alpha
      = render partial: "spree/admin/shared/#{action}_resource_links"

-# Not all inputs are ng inputs, they don't make the 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
-# The nav-check-callback is warning on leave if the form is dirty.
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise",
  "ng-app" => 'admin.enterprises',
  "ng-submit" => "navClear()",
  "ng-controller" => 'enterpriseCtrl',
  "nav-check-callback" => 'enterpriseNavCallback',
  'onchange' => 'angular.element(enterprise).scope().enterprise.$setDirty()',
  } do |f|
  .row
    .sixteen.columns.alpha
      .four.columns.alpha
        = render 'side_menu'
      .one.column &nbsp;
      .eleven.columns.omega.fullwidth_inputs
        = render 'form', f: f
  .row
    .five.columns.alpha
      &nbsp;
    .eleven.columns.alpha
      = render partial: "spree/admin/shared/#{action}_resource_links"

Rearrange columns for action buttons on enterprise form
Rearrange columns for action buttons on enterprise form
