706194
From 7807bcc55b4927fc327830d2237200772d2e1106 Mon Sep 17 00:00:00 2001
706194
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
706194
Date: Fri, 17 Jun 2022 15:40:04 -0300
706194
Subject: [PATCH] webui IdP: Remove arrow notation due to uglify-js limitation.
706194
706194
uglify-js 2.x series do not support ECMAScript 6 arrow notation ('=>')
706194
for callback definition.
706194
706194
This patch changes the arrow definition callbacks for regular anonymous
706194
function definitions.
706194
---
706194
 install/ui/src/freeipa/idp.js | 10 +++++-----
706194
 1 file changed, 5 insertions(+), 5 deletions(-)
706194
706194
diff --git a/install/ui/src/freeipa/idp.js b/install/ui/src/freeipa/idp.js
706194
index ada09c075..be3c4f0e6 100644
706194
--- a/install/ui/src/freeipa/idp.js
706194
+++ b/install/ui/src/freeipa/idp.js
706194
@@ -227,7 +227,7 @@ IPA.add_idp_policy = function() {
706194
         // For custom template we show custom fields
706194
         // and mark all of them required and passed to the RPC
706194
         // If show_custom is false, the opposite happens
706194
-        custom_fields.forEach(fname => {
706194
+        custom_fields.forEach(function(fname) {
706194
             widget_f = that.container.fields.get_field(fname);
706194
             widget_f.set_required(show_custom);
706194
             widget_f.set_enabled(show_custom);
706194
@@ -235,7 +235,7 @@ IPA.add_idp_policy = function() {
706194
         });
706194
 
706194
         // For template fields we show them if custom aren't shown
706194
-        template_fields.forEach(fname => {
706194
+        template_fields.forEach(function(fname) {
706194
             widget_f = that.container.fields.get_field(fname);
706194
             widget_f.set_enabled(!show_custom);
706194
             widget_f.widget.set_visible(!show_custom);
706194
@@ -252,7 +252,7 @@ IPA.add_idp_policy = function() {
706194
         var value = prov_f.get_value()[0];
706194
 
706194
         // First, clear template fields from the previous provider choice
706194
-        template_fields.forEach(fname => {
706194
+        template_fields.forEach(function(fname) {
706194
             widget_f = that.container.fields.get_field(fname);
706194
             widget_f.widget.set_visible(false);
706194
             widget_f.set_required(false);
706194
@@ -260,9 +260,9 @@ IPA.add_idp_policy = function() {
706194
         });
706194
 
706194
         // Second, enable and get required template-specific fields
706194
-        idp.templates.forEach(idp_v => {
706194
+        idp.templates.forEach(function(idp_v) {
706194
             if (idp_v['value'] == value) {
706194
-                idp_v['fields'].forEach(fname => {
706194
+                idp_v['fields'].forEach(function(fname) {
706194
                     widget_f = that.container.fields.get_field(fname);
706194
                     widget_f.set_required(true);
706194
                     widget_f.set_enabled(true);
706194
-- 
706194
2.36.1
706194