30 lines
1.0 KiB
JavaScript
Raw Normal View History

2011-05-03 12:49:43 +00:00
$(document).ready(function(){
$('#password').live('click', function(){
var dialogOpts = {
bgiframe: true,
autoOpen: false,
height: 180,
modal: true,
buttons: {
'Modifier': function() {
var pass = $('input[name=npass1]').val();
if (pass != $('input[name=npass2]').val()) {
$('#form-message').html('Mots de passe différents.');
} else {
$('input[name="frmOptions[changepwd]"]').val('1');
$('input[name="frmOptions[password]"]').val(pass);
$('#password').html('Sauver pour enregistrer la modification du mot de passe');
$(this).dialog('close');
}
},
'Annuler': function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$("#dialog").dialog(dialogOpts);
$("#dialog").dialog('open');
return false;
});
});