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