<div id="dialog" title="{change_pass_dialog}" style="display: none">   
    <table style="width: 99%">
        <tr>
            <td style="width: 35%">{password}*</td>
            <td><input class="pass" type="password" name="password" id="password" value="" /></td>
        </tr>
        <tr>
            <td>{password1}*</td>
            <td><input class="pass" type="password" name="password1" id="password1" value="" /></td>
        </tr>
    </table>
</div>
<style>
    #dialog table td{
        padding-bottom: 10px;
    }
</style>
<script type="text/javascript">
    function change_pass(id) {
        $('#dialog').dialog({
            width: 440,
            height: 250,
            modal: true,
            resizable: false,
            buttons: {
                "{save_btn}": function() {
                    if ($('#password').val() == $('#password1').val()) {
                        $.post('/ajax/ciext/acl/acl_change_pass', {'pass' : $('#password').val(), 'id' : id}, 
                        function(data){
                            alert(data);
                            $('#dialog').dialog( "close" );
                        });
                    } else {
                        $('.pass').attr('style', 'color:red');
                    }
                },
                "{cancel_btn}": function() {
                    $( this ).dialog( "close" );
                }
            }
        });
        return false;
    }
</script>
