cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3043
Views
0
Helpful
1
Comments
Jason Kunst
Cisco Employee
Cisco Employee

The following information is used to provide basic examples of customizing the ISE Sponsor Portal Manage Accounts page.

For basic information on customization, getting started, please reference the ISE Web Portal Customization Guide

Note these examples will not work with the ISE Portal Builder 

 

 

Disable Auto-Complete Search Capability

Please find the script for disabling the auto search in the sponsor portal and will work for Manage accounts page. This was requested by customer as the auto-complete wasn't responding quick enough (if you have this issue open a tac case as well).

Copy the below script into the textarea Sponsor Portal -> Page Customization -> Sponsor Portal Settings -> Instructional Text :

<script>
var addedElement = false;   

setTimeout(function() {
    $('a.ui_manage_accounts_button').on("click", function(){
        $('.ui-input-search')[0].setAttribute("id", "hiddenElement");
        var searchBtnonEnter = $('<div id="dupeField" class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield ui-body-a"><input type="text" data-type="search" name="search" class="ui-input-text ui-body-a" title="Username, First Name, Last Name, Email, Phone Number"><a href="#" class="ui-input-clear ui-btn ui-btn-up-a ui-shadow ui-btn-corner-all ui-fullsize ui-btn-icon-notext ui-input-clear-hidden" title="clear text" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="delete" data-iconpos="notext" data-theme="a" data-mini="false"><span class="ui-btn-inner"><span class="ui-btn-text">clear text</span><span class="ui-icon ui-icon-delete ui-icon-shadow">&nbsp;</span></span></a></div>');
        if(!addedElement){
            searchBtnonEnter.insertAfter('#hiddenElement');
            addedElement = true;
        }
        $('#hiddenElement').hide();
        disableAutoSearch();
    });
}, 3000);
  
function disableAutoSearch(){
    setTimeout(function() {
        $('#dupeField').on('keypress', function(event) {
            if (event.keyCode == '13') {
                $('input[name="search"]').trigger('input');
                $('input[name="search"]')[0].value = $('input[name="search"]')[1].value;
                $('.ui-input-clear').removeClass('ui-input-clear-hidden');
            }
        });  
        $('#dupeField').on('input', function(event) {
           return false;
        });
        $('.ui-input-clear').on('click', function(event) {
           $('input[name="search"]')[0].value = $('input[name="search"]')[1].value = '';
        });
     }, 3000);
}
</script>

 

Swapping position of OK and Cancel buttons

This is available in "Manage accounts", inside of modal windows, when you trying - suspend, extend some account etc...

 

Development said it might be slightly unstable due to limited options of timeout settings: Therefore limited support

Work Centers > Guest Access > Portal & Components > Sponsor Portals > Choose your portal then Portal Page Customization > Sponsor portal settings> Instructional text

<script>
var cancelButtons = [];
var okButtons = [];
setTimeout(function(){
  $('.ui-grid-c li').on('click', function(){
    setTimeout(function(){
      $('.ui-controlgroup-controls a').on('click', function(){
        setTimeout(function(){
          var button = $('[data-role="button"]').find('.ui-btn-text');
          for (i=0; i<=button.length; i++) {
            if ($(button[i]).text() === 'Cancel'){
              cancelButtons.push(button[i]);
            }
 
            if ($(button[i]).text() === 'Ok' || $(button[i]).text() === 'OK'){
              okButtons.push(button[i]);
            }
          }
 
          for (i=0; i<=okButtons.length;) {
            var okButton = $($(okButtons[i]).parent().parent());
            var cancelButton = $($(cancelButtons[i]).parent().parent())
 
            okButton.insertBefore(cancelButton);
            i++;
          }
        }, 200);
      });
    }, 2000);
  })
}, 3000);  
</script>

 

Allow Only Pending Account Management

This script will hide the create tab, manage tab and notification tab while remain the pending account tab. It will also make the pending account tab as the first page when they sign in.

 

Work Centers > Guest Access > Portal & Components > Sponsor Portals > Choose your portal

Portal Page Customization > Sponsor portal settings> Instructional text

  

 

<script>
setTimeout(function() {
    $($('.cisco-navbar')[0]).hide();
    $($('.cisco-navbar')[9]).hide();
    $($('.ui_approve_accounts_button')[1]).click();
}, 300);
</script>

 

Hide Columns - Example with Email and Phone Number

For releases prior to ISE 2.2 we don't have the capability for the sponsor or an admin to be able to re-order or hide columns in the manage accounts tab. A customer required that their sponsors never be able to view the email and phone number. The following Javascript can be used to hide the email and phone number columns. 

Note: In ISE 2.2 you can hide them as a sponsor but there is no way for the admin to hide them for sponsors without this script. There is no way to globally disable them.

 

Work Centers > Guest Access > Portal & Components > Sponsor Portals > Choose your portal then Portal Page Customization > Create Accounts > Create Account for Known Guests >Optional Content 2

 

<script>
(function(){
 
jQuery(document).ready(function() {
//----------------Managed Accounts-----------------
jQuery(document).on('pageshow', '#'+cisco.ise.sponsor.pages.home.manageAccountsPageId,function() {
    jQuery(jQuery(".manage-accounts-table th")[6]).hide();
    jQuery(jQuery(".manage-accounts-table th")[5]).hide();
})
  
//handle table data loading in desktop for pending and manage guests
_handleTableDataUpdateOrig = cisco.ise.sponsor.pages.home.handleTableDataUpdate;
cisco.ise.sponsor.pages.home.handleTableDataUpdate = function(response, table){
    _handleTableDataUpdateOrig(response, table);
    //desktop view
    jQuery(jQuery(".manage-accounts-table tr td:nth-child(7)")).hide();
    jQuery(jQuery(".manage-accounts-table tr td:nth-child(6)")).hide();
    jQuery(jQuery(".approve-accounts-table tr td:nth-child(7)")).hide();
    jQuery(jQuery(".approve-accounts-table tr td:nth-child(6)")).hide();

    jQuery.each(jQuery(jQuery(".approve-accounts-table tr td:nth-child(2) a")),function(i, a){
        a = jQuery(a);
        if(a.text().indexOf("@")!=-1){
            var str =  a.text().substr(0,a.text().indexOf("@"));
            a.text(str);
            a.parent().attr("title",str);
        }

    });          


    jQuery.each(jQuery(jQuery(".manage-accounts-table tr td:nth-child(2) a")),function(i, a){
        a = jQuery(a);
        if(a.text().indexOf("@")!=-1){
            var str =  a.text().substr(0,a.text().indexOf("@"));
            a.text(str);
            a.parent().attr("title",str);
        }
    });                          
}
 
//handle listview loading of mobile for manage guests
_handleListviewManageDataUpdateOrig = cisco.ise.sponsor.pages.home.handleListviewManageDataUpdate;
cisco.ise.sponsor.pages.home.handleListviewManageDataUpdate = function(response, listview){
    _handleListviewManageDataUpdateOrig(response, listview);
    //mobile view
    clearLists(1,"manageAccounts");
}
 
//handle listview loading of mobile for approve guests
_handleListviewApproveDataUpdateOrig = cisco.ise.sponsor.pages.home.handleListviewApproveDataUpdate;
cisco.ise.sponsor.pages.home.handleListviewApproveDataUpdate = function(response, listview){
    _handleListviewApproveDataUpdateOrig(response, listview);
    //mobile view
    clearLists(0, "approveAccounts");
}
 
function clearLists(usernameIndex, id){               
    jQuery.each(jQuery(".wrap.ui-li-desc"),function(i, item){
        if(jQuery(this).contents()[2].nodeName.indexOf("text")!=-1){
            jQuery(this).contents()[2].nodeValue="";  
        }      
    })
    
    var items = jQuery("#"+id+" .ui-listview .ui-link-inherit");
    jQuery.each(items, function(i, item){
        item = jQuery(item);
        var username = item.contents()[usernameIndex];
        if(username.nodeValue.indexOf("@")!=-1){
            username.nodeValue = username.nodeValue.substring(0,username.nodeValue.indexOf("@"));
        }
    });
}
//----------------Approve Accounts----------------- 
jQuery(document).on('pageshow', '#'+cisco.ise.sponsor.pages.home.approveAccountsPageId,function() {
    jQuery(jQuery(".approve-accounts-table th")[6]).hide();
    jQuery(jQuery(".approve-accounts-table th")[5]).hide();
})
 
 
//----------------Details Panel-------------------- 
_populateKnownSummaryContainerOrig = cisco.ise.sponsor.pages.home.populateKnownSummaryContainer
cisco.ise.sponsor.pages.home.populateKnownSummaryContainer = function(response, panel, hideEmpty){
    jQuery.each(response.values,function(i, item){
        if(item.name=="emailAddress" || item.name=="phoneNumber"){
            item.name="____";
        }
        if(item.name=="username"){
            if(item.value.indexOf("@")!=-1){
                item.value = item.value.substr(0,item.value.indexOf("@"));
            }
        }
    });
    _populateKnownSummaryContainerOrig(response, panel, hideEmpty);
}
 
//--------------Edit Guest Panel--------------------
jQuery( "body" ).bind( "editAccessCreated", function() {
   jQuery("#editGuestPanelContent [key='emailAddress']").hide();
   jQuery("#editGuestPanelContent [key='phoneNumber']").hide();
   var username = jQuery("#editGuestPanelContent span:first");
   if(username.text().indexOf("@")!=-1){
        var str =username.text().substr(0,username.text().indexOf("@"));
        username.text(str);
    }
});
 
//remove email sort options from mobile listviews
jQuery(".sortByPopUp li [sort-by='email']").parent().remove();
 
})
 
})();
</script> 

 

Manage Accounts as a start page

This script will direct users to the manage account when they login

Please try this script for Sponsor Portal under Create Account for Known Guests > Instructional Text. 

Toggle into instructional text, paste the code, toggle out and save. 

If it loads too slow try shortening the timeout value

<script>
    setTimeout(function() {
        $('a.ui_manage_accounts_button').trigger('click');
    }, 1500);
</script>

 

Hiding Print Button from Account Details View

Add the below script in the Sponsor Portal > Page customizations > Sponsor Portal Settings > Instructional Text

<script>
    $(document).ready(function(){
          setTimeout(function() {
               $('#printAccount').hide();
          }, 5000);                    
    });
</script>

 

 

 

Comments
russell.sage
Level 1
Level 1

on the section allow pending account management. 

<script>
setTimeout(function() {
    $($('.cisco-navbar')[0]).hide();
    $($('.cisco-navbar')[9]).hide();
    $($('.ui_approve_accounts_button')[1]).click();
}, 300);
</script>

When you go to the portal is doesn't permit you to create new accounts but if you click on the username hyperlink it then takes you to a page that does. Do you know if it is possible to remove the create button here as well. I can remove the word create but not the button as far as I can tell from playing with the portal page customization settings 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: