From 38d1de896c3dbd52a0e4220d1c2edf34ad8c8716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fr=C4=B1=20=C3=96zkan?= Date: Wed, 25 Oct 2023 17:11:30 +0300 Subject: [PATCH] Use oninput on ng_form.html.haml instead of onchange --- app/views/admin/enterprises/_ng_form.html.haml | 2 +- app/views/admin/enterprises/form/_primary_details.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/enterprises/_ng_form.html.haml b/app/views/admin/enterprises/_ng_form.html.haml index 9dd03271ea..fbbe158024 100644 --- a/app/views/admin/enterprises/_ng_form.html.haml +++ b/app/views/admin/enterprises/_ng_form.html.haml @@ -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| diff --git a/app/views/admin/enterprises/form/_primary_details.html.haml b/app/views/admin/enterprises/form/_primary_details.html.haml index 8d1dd96110..04609e9b58 100644 --- a/app/views/admin/enterprises/form/_primary_details.html.haml +++ b/app/views/admin/enterprises/form/_primary_details.html.haml @@ -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