cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1075
Views
0
Helpful
3
Replies

Restrict/Validate the person being visited email address in Sponsor portal Known page

reachmearun.s
Level 1
Level 1

I am trying to restrict Sponsor to enter mycompany.com domain in the person being visited field and restrict any other personal emails entered in this field. I am currently running ISE 2.2 with Patch14. 

 

I have found a bug related to it - https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvq23221/?rfs=iqvred  and logged a case with TAC.

 

Please see the attached picture where in the Sponsor portal is allows me to use any personal emails to be entered in the person being visited field. Is there any working Java script to achieve this function. 

 

 

 

 

2 Accepted Solutions

Accepted Solutions

Jason Kunst
Cisco Employee
Cisco Employee
Please check http://cs.co/ise-guest look at sponsor portal create known accounts there is example there

View solution in original post

I have tried this scripts  and  it is working now for the sponsor portal

 

Create Account for Known Guests (Paste this Script in Instructional text)
=======================================================================
<script>
    function customEmailValidator(){
        $.validator.addMethod("customemailvalidator", function(value, element) { 
            return /^(\w+\.?)+@(domain1|domain2|domain3)\.com$/.test( value );
        }, 'Please enter a valid email.'); 
         
        $(".personBeingVisited").rules("add",{customemailvalidator:true});                        
    }             
    $(document).ready(function(){
        setTimeout(function() {
            customEmailValidator();
                $('#createButton').on('click', function(evt){
                    setTimeout(function() {
                        $('.approve-accounts-content > div.ui-navbar > ul > li.ui-block-b > a').on('click', function(){
                            setTimeout(function() {
                                customEmailValidator();
                            }, 6000);
                        });
                    }, 4000);
                });
            $('.ui_create_accounts_button').on('click', function(){
                setTimeout(function() {
                    customEmailValidator();
                }, 5000);
            });
        }, 5000);
    });
</script>
 

 

View solution in original post

3 Replies 3

Jason Kunst
Cisco Employee
Cisco Employee
Please check http://cs.co/ise-guest look at sponsor portal create known accounts there is example there

I have tried this scripts  and  it is working now for the sponsor portal

 

Create Account for Known Guests (Paste this Script in Instructional text)
=======================================================================
<script>
    function customEmailValidator(){
        $.validator.addMethod("customemailvalidator", function(value, element) { 
            return /^(\w+\.?)+@(domain1|domain2|domain3)\.com$/.test( value );
        }, 'Please enter a valid email.'); 
         
        $(".personBeingVisited").rules("add",{customemailvalidator:true});                        
    }             
    $(document).ready(function(){
        setTimeout(function() {
            customEmailValidator();
                $('#createButton').on('click', function(evt){
                    setTimeout(function() {
                        $('.approve-accounts-content > div.ui-navbar > ul > li.ui-block-b > a').on('click', function(){
                            setTimeout(function() {
                                customEmailValidator();
                            }, 6000);
                        });
                    }, 4000);
                });
            $('.ui_create_accounts_button').on('click', function(){
                setTimeout(function() {
                    customEmailValidator();
                }, 5000);
            });
        }, 5000);
    });
</script>
 

 

how to place this script in portal page ?

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: