05-17-2019 09:50 AM
I was trying to get a Self-Service/Password Change portal based on the instructions provided in the thread below but I am not able to get it working:
Solved! Go to Solution.
11-01-2019 08:13 AM
11-07-2019 11:05 AM
12-02-2019 03:14 PM
Jason have you been able to work on that write up to resolve this issue?
12-03-2019 09:43 AM
@javier437 wrote:
Jason have you been able to work on that write up to resolve this issue?
For now try this. I will working on fixing the updated portal as well
change password in sponsor portal
Here is the code for Change password customization in sponsor portal. Can you please try the below script in the Sponsor portal customization --> Create Account for Known Guests --> Instructional Text <script> var pwdBtnDisplayed = false; $(document).on('pageshow', function() { $('.cisco-navbar').remove(); $('.create-guest-type-step').remove(); $('.create-guest-info-step').hide(); $('.create-access-info-step').hide(); if(!pwdBtnDisplayed){ for(var i=0; i<5 ; i++){ $('.ui-listview').children()[0].remove(); } } if(!pwdBtnDisplayed){ $('.cisco-nav-content').append('<center><input onclick="changePasswordFn()" target="_self" type="button" value="Password Change"/></center>'); pwdBtnDisplayed = true; } window.addEventListener('resize', function(){ if(window.innerWidth < 960){ removeMedisqueryCSS(); } }); }); function changePasswordFn (){ location.href='#changePwd'; } function removeMedisqueryCSS() { if (typeof window.CSSMediaRule !== "function") return false; //Your browser doesn't support media query feature var s = document.styleSheets,r, i, j, k; if (!s) return; //no style sheets found // walk throuth css sheets for (i = 0; i < s.length; i++) { // get all rules r = s[i].cssRules; if (!r) continue; for (j = 0; j < r.length; j++) { //If there's a rule for media query if (r[j] instanceof CSSMediaRule){ if((r[j].media.mediaText).indexOf("60em") < 0){ for (k = 0; k < r[j].cssRules.length; k++) { r[j].deleteRule(r[j].cssRules[k]); } } } } } } </script>
for my devices portal ISE 2.4
Enable Change password and disable Post-Login Banner Page and AUP from the settings. Try to add the below code in Optional Content 2 of the respective pages. In the below code, highlighted Portal id should be changed according to your portal.
Change Password page ===================== <script> $('#ui_changepwd_submit_button').on('click', function(evt){ sessionStorage.setItem('passwordChanged', true); }); $(document).on('pageshow', function() { var logoutAction = ''; $('a').each(function(){ if($(this).attr('href').indexOf("Logout") !== -1){ logoutAction = $(this).attr('href'); } }); $('a[href="HomePreLoad.action?from=MY_DEVICES_HOME"]').attr('href', logoutAction); var passwordChanged = sessionStorage.getItem('passwordChanged') == "true"; if (passwordChanged) { alert('Password has been changed'); sessionStorage.setItem('passwordChanged', false); var logoutUrl = $('[href="Logout.action?portal=582293e0-011a-11ea-88a9-e2ae93fcfd8a"]').attr('href'); window.location = logoutUrl; }; }); </script> My Devices page =============== <script> setTimeout(function(){ $('.ui-panel-content-wrap').hide(); $('.ui-link-inherit').first().click(); }, 100); </script>
ISE 2.6 code for my devices
Enable Change password and disable Post-Login Banner Page and AUP from the settings. Try to add the below code in Optional Content 2 of the respective pages. In the below code, highlighted Portal id should be changed according to your portal.
ISE version 2.6 Enable Change password and disable Post-Login Banner Page and AUP from the settings. Try to add the below code in Optional Content 2 of the respective pages. Login Page ============ <script> $(document).on('pageshow', function() { sessionStorage.setItem('passwordChanged', false); }); </script> Change Password page ==================== <script> setTimeout(function(){ sessionStorage.setItem('passwordChanged', false); $('#ui_changepwd_cancel_button').attr('href', 'javascript:document.forms["logout"].submit()'); $('#ui_changepwd_submit_button').on('click', function(evt){ sessionStorage.setItem('passwordChanged', true); }); }, 1000); </script> My Devices page =============== <script> $(document).on('pageshow', function() { $('.ui-panel-content-wrap').hide(); var passwordChanged = sessionStorage.getItem('passwordChanged') == "true"; if (passwordChanged) { alert('Password has been changed'); sessionStorage.setItem('passwordChanged', false); document.forms['logout'].submit(); } else if (!passwordChanged){ document.forms['changePasswordPreLoad'].submit(); } }); </script> To remove the dropdown/pulldown in the right side corner of the change password page, please use the below script in the Optional content 2 of Change Password page. This will be applicable for both 2.4 as well as 2.6 versions. <script> setTimeout(function(){ var deskUser = $(".cisco-desktop-header-menu-button").text(); $(".cisco-desktop-header-menu-button").remove(); $(".cisco-mobile-header-menu-button").remove(); var infoiconDesc = $(".cisco-desktop-menu-button")[0].outerHTML $(".cisco-desktop-menu-button").replaceWith('<div class="ui-btn-right">'+deskUser+infoiconDesc+'</div>'); $('.ui-btn-icon-notext .ui-btn-inner .ui-icon').css('margin','16px 1px 2px 3px'); }, 1000); </script>
09-18-2019 06:18 AM
I've used the API web app available on this thread and it's better then the BYOD workaround and it's also free.
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