07-19-2019 07:38 AM
I have a few questions regarding customisation scripts within sponsored guest and sponsor portals:
1) I'm using this script to hide columns in the Manage Accounts screen of the sponsor portal. It works however there is a delay before the columns are hidden, noticeable to the user. Presumably this is the 3000 or 1000 msec values. How can I ensure the column isn't seen at all? I tied lowering these values but after the column disappears, I can't get it to show again on the same client even after clearing browser cache and restarting and logging back into the sponsor portal. I'm not in a position to be able to test on other clients.
<script> var manageAccSelected= false; setTimeout(function() { $('a.ui_manage_accounts_button').on("click", function(){ displayColumns(); }); }, 3000); function displayColumns(){ setTimeout(function() { if(!manageAccSelected){ manageAccSelected = true; var arr = [1,2,3,4,5,16]; for (var j = 1; j<=16 ; j++) { if($('#col-'+j)[0].checked){ $('#col-'+j).click(); } } for (var i in arr) { if(!$('#col-'+arr[i])[0].checked){ $('#col-'+arr[i]).click(); } } $('.ui-table-columntoggle-btn')[0].style.display = "none"; } }, 1000); } </script>
2) I want to hide the Decline button on a Hotspot portal so only Accept appears but no luck with the following:
<script> (function(){ $(document).ready(function() { $(".ui_aup_decline_button").hide(); }); })(); </script>
Solved! Go to Solution.
07-28-2019 10:56 AM - edited 07-28-2019 11:03 AM
On 2, if we want the button aligned properly and/or if to provide more customization, we may use ISE Portal Builder. This tool is currently not allowing to remove the Decline button completely, as shown in the portal I shared with you, so I opened CSCvq69362
As a workaround, I manually edited out the UI elements for the Decline button in the javascript file in the exported zip file, and then uploaded it to ISE. Below is what I removed in my test hotspot portal:
<div class="t t-button t-button_cancel" style=""><div class="b-content-holder"><input class="f-cancel-button" style="style.input" type="submit" value="Decline"><\/div><\/div><\/div>
which corresponding to
<div class="t t-button t-button_cancel" style=""><div class="b-content-holder"><input class="f-cancel-button" style="border-color: rgb(179, 179, 179); background-color: rgb(238, 238, 238);" type="submit" value="Decline"></div></div>
07-19-2019 08:26 AM
07-20-2019 03:34 PM
On 1, see Hide columns - example email and phone number
On 2, I am able to hide the Deny button as below. It does not resize the button, however.
<script> $('#ui_aup_decline_button').remove(); </script>
07-22-2019 08:55 AM
Cheers - much appreciated.
I will give these a go.
07-28-2019 10:56 AM - edited 07-28-2019 11:03 AM
On 2, if we want the button aligned properly and/or if to provide more customization, we may use ISE Portal Builder. This tool is currently not allowing to remove the Decline button completely, as shown in the portal I shared with you, so I opened CSCvq69362
As a workaround, I manually edited out the UI elements for the Decline button in the javascript file in the exported zip file, and then uploaded it to ISE. Below is what I removed in my test hotspot portal:
<div class="t t-button t-button_cancel" style=""><div class="b-content-holder"><input class="f-cancel-button" style="style.input" type="submit" value="Decline"><\/div><\/div><\/div>
which corresponding to
<div class="t t-button t-button_cancel" style=""><div class="b-content-holder"><input class="f-cancel-button" style="border-color: rgb(179, 179, 179); background-color: rgb(238, 238, 238);" type="submit" value="Decline"></div></div>
07-27-2019 12:34 PM
... 1) I'm using this script to hide columns in the Manage Accounts screen of the sponsor portal. It works however there is a delay before the columns are hidden, noticeable to the user. Presumably this is the 3000 or 1000 msec values. How can I ensure the column isn't seen at all? I tied lowering these values but after the column disappears, I can't get it to show again on the same client even after clearing browser cache and restarting and logging back into the sponsor portal. I'm not in a position to be able to test on other clients.
The javascript you tested with appears from ISE Sponsor Portal manage accounts page customization for GDPR compliance privacy (hide fields) -- Restrict sponsor edit and hide sensitive information -- ISE Community.
You are correct the 3000 and 1000 values in msec in the javascript from the source above. I tried a couple of different combinations and found 1500 and 150 giving me reasonable results. In my testings, I used Mozilla Firefox to access ISE admin web UI and Google Chrome/IE browser in Incognito mode to test the sponsor portal after editing. I also noticed that it not un-hiding the columns, even with a different sponsor portal, until I closing all instances of the Incognito browser windows/tabs and re-launching a new one.
Below shows the script I used and a screen capture when I tested it in IE.
<script> var manageAccSelected= false; setTimeout(function() { $('a.ui_manage_accounts_button').on("click", function(){ displayColumns(); }); }, 1500); function displayColumns(){ setTimeout(function() { if(!manageAccSelected){ manageAccSelected = true; var arr = [1,2,10,14,15,16]; for (var j = 1; j<=16 ; j++) { if($('#col-'+j)[0].checked){ $('#col-'+j).click(); } } for (var i in arr) { if(!$('#col-'+arr[i])[0].checked){ $('#col-'+arr[i]).click(); } } $('.ui-table-columntoggle-btn')[0].style.display = "none"; } }, 150); } </script>
07-29-2019 04:54 AM
Thanks very much for the extensive follow-ups.
I'll give these a go soon - cheers.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide