JSFiddle - React, Tailwind, and code Playground

by hescano

HTML

<div id="dialog-confirm" style="display:none" tabindex="-1">  
    <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
        Do you want to create a new profile ? 
    </p>
</div>

JavaScript

$("#dialog-confirm").dialog({
                    title: 'Main Information',
                    resizable: false,
                    height:140,
                    modal: true,
                    closeOnEscape:true,
                    buttons: {        
                        "Yes": function() {
                            document.getElementById('form1:newProfile' ).value="true";
                            if(disableSaveFlag) return false; else disableEnableSaveBtn('true');
                               $( this ).dialog( "close" );
                        },
                        "No": function() {
                            document.getElementById('form1:newProfile' ).value="false";
                            if(disableSaveFlag) return false; else disableEnableSaveBtn('true');
                            $( this ).dialog( "close" );
                        }      
                    },
    open:function(){
         $("#dialog-confirm").focus()
    }
                });