$(document).ready(function()
{
    $('#app').change();

    $.setAjaxForm('#createForm', function(response)
    {
        if(response.result == 'success')
        {
            $('#ajaxModal .close').click();

            bootbox.dialog(
            {
                title: '&nbsp;',
                message: v.createTips,
                buttons:
                {
                    no:
                    {
                        label: v.notNow,
                        className: 'btn-secondary',
                        callback: function(){location.reload();}
                    },
                    yes:
                    {
                        label: v.toDesign,
                        className: 'btn-primary',
                        callback: function(){location.href = createLink('workflow', 'flowchart', 'module=' + response.module);}
                    }
                }
            });
        }
    });
});
