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