Adding confirmation message when switching from advance configuration auth type
}
});
+ var authenticationType = $('input:radio[name=auth_type]:checked').val();
+ var isAuthTypeClicked = false;
+ var lastSelectedAuthType;
+ var changeAuthTypeMsg = "Changing the Authentication Type from Advanced Configuration to another will remove the " +
+ "advanced configurations when updating the Service Provider. Do you want to proceed?";
+
+ $('#advanceAuthnConfRow input[name=auth_type]').mouseup(function(){
+ lastSelectedAuthType = $('#advanceAuthnConfRow input[name=auth_type]:checked').val();
+ }).change(function(){
+ if(!isAuthTypeClicked && authenticationType == "flow" && $(this).val() !== "flow") {
+ isAuthTypeClicked = true;
+ CARBON.showConfirmationDialog(changeAuthTypeMsg,
+ function () {
+ return false;
+ },
+ function () {
+ $('#advanceAuthnConfRow input[name=auth_type][value=' + lastSelectedAuthType + ']').prop('checked', true);
+
+ });
+ }
+ });
+
+
if ($('#isNeedToUpdate').val() == 'true') {
$('#isNeedToUpdate').val('false');
var numberOfClaimMappings = document.getElementById("claimMappingAddTable").rows.length;
