cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
702
Views
0
Helpful
4
Replies

choose time zone -> filter locations

jacob.parker
Level 1
Level 1

Hello Gents, 

https://community.cisco.com/t5/security-documents/ise-guest-self-registration-person-being-visited-sponsor-choose/ta-p/3636453

i need a script that filter the results of locations by choosing the time zone dropdown form field. 

Similar like the link posted above.
 

For Example:

Time Zone: France, Germany, Spain, Poland. 

Locations: Nantes, Paris | Berlin, Hamburg, Stuttgart | Burgos, Cascante, Martorell | Kormoniki, Sroda Slaska

 

Now i want, that when the time zone value is on Spain that the dropdown form field for location only show Burgos, Cascante and Martorell. 

 

I anybody able to show me, how the script should look like?

 

Kind regards

Jacob

1 Accepted Solution

Accepted Solutions

Jason - i adjust your script 

https://community.cisco.com/t5/security-documents/ise-guest-self-registration-person-being-visited-sponsor-choose/ta-p/3636453

and everything works fine for me. Perfect!!! It was a hard job for me.....but finally it's a victory for me. :-)

 

Result: Time Zone value filter custom field ui_duration_text and copy the outcome to "ui_comany". (normally on hide) 


self-registration_europe.png

 

Thanks

 

Kind regards

Jacob

 

View solution in original post

4 Replies 4

Jason Kunst
Cisco Employee
Cisco Employee
Have you thought about returning a different portal depending on NAD locations to reduce the listing? I am not sure if this is possible but will check

Yes  - i thought about ist. 

But i don't have an idea to implement it. 

 

Jason: 

https://community.cisco.com/t5/security-documents/ise-guest-self-registration-person-being-visited-sponsor-choose/ta-p/3636453

This is your script. It should be easy for you to edit this script for my needs. 

 

Steps:

1. time zones -> on change go to step 2. 

2. custom field (dropdown) to set special values for locations.

 

script:

<script>
(function(){
setTimeout(function(){

//Script for dropdown weekly/quarterly & sms formularfield not required !!

var setup = function(){

if(($("#guestUser\\.fieldValues\\.ui_location").val()) == 'Germany') {

persons = {

'Berlin':'Berlin',
'Munich':'Munich',

}
} else if (($("#guestUser\\.fieldValues\\.ui_location").val()) == 'Spain') {

 

persons = {

'Burgos':'Burgos',
'Cascante':'Cascante',

}

} else {

persons = {

'Choose department': 'Choose department',

}

}

return persons;

}

setup();

jQuery("input[name='guestUser.fieldValues.ui_company']").parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_duration_text']").parent().hide();

jQuery("input[name='guestUser.fieldValues.ui_duration_text']").parent().after("<div class='ui-select'><div data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' data-icon='arrow-d' data-iconpos='right' data-theme='a' class='ui-btn ui-shadow ui-btn-corner-all ui-btn-icon-right ui-btn-up-a' id='outerDiv'><span class='ui-btn-inner'><span class='ui-btn-text'><span id='displayName'></span></span><span class='ui-icon ui-icon-arrow-d ui-icon-shadow'> </span></span><select name='guestUser.fieldValues.ui_duration_text' id='guestUser.fieldValues.ui_duration_text' class='ui-body-a'></select></div></div>");

jQuery.each( persons, function( key, value ) {

jQuery('#guestUser\\.fieldValues\\.ui_duration_text').append("<option value="+value+">"+key+"</option>");

});

jQuery('#guestUser\\.fieldValues\\.ui_duration_text > option:first-child').attr('selected', 'selected');

jQuery('#guestUser\\.fieldValues\\.ui_duration_text').on('change', function(evt){

jQuery("#guestUser\\.fieldValues\\.ui_company").val(jQuery(this).val());

jQuery('#displayName').html(jQuery(this).find('option:selected').text());

});

jQuery('#guestUser\\.fieldValues\\.ui_duration_text').trigger('change');

},250);

})();

 

</script>

 

It works so far, but if i choose another ui_location value the dropdown field for ui_duration_text trigger no change. 

Maybe you have a solution for this.

 

aim:

choose time zone ("ui_location") -> on change -> filter and focus the new values on dropdown field "ui_duration_text" (custom field). 

"ui_duration_text" copy the new value automatically to "ui_comany". I need this to transfer the value with the "approval request email" to make it visible for the internal customers. 

 

Kind regards

Jacob

 

 

 

Implement separate self-registration portals per location. each portal has a different type of locations used and reduced set
http://cs.co/ise-guest
a similar example of how to map location group is here
https://community.cisco.com/t5/security-documents/ise-guest-amp-web-authentication/ta-p/3657224#toc-hId--1748277323

ISE and Location-Based Web Authentication Portals - examples on how to redirect to different portal depending on NAD locations

Jason - i adjust your script 

https://community.cisco.com/t5/security-documents/ise-guest-self-registration-person-being-visited-sponsor-choose/ta-p/3636453

and everything works fine for me. Perfect!!! It was a hard job for me.....but finally it's a victory for me. :-)

 

Result: Time Zone value filter custom field ui_duration_text and copy the outcome to "ui_comany". (normally on hide) 


self-registration_europe.png

 

Thanks

 

Kind regards

Jacob