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