Use oninput on ng_form.html.haml instead of onchange

This commit is contained in:
Çağrı Özkan
2023-10-25 17:11:30 +03:00
parent e465015184
commit 38d1de896c
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +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()",
oninput: "angular.element(enterprise_form).scope().setFormDirty()",
"ng-controller" => 'enterpriseCtrl',
"ng-cloak" => true } do |f|

View File

@@ -3,7 +3,7 @@
= f.label :name, t('.name')
%span.required *
.eight.columns.omega
= f.text_field :name, { oninput: "angular.element(enterprise_form).scope().setFormDirty()", placeholder: t('.name_placeholder') }
= f.text_field :name, { placeholder: t('.name_placeholder') }
- if @groups.present?
.row
.three.columns.alpha