30 lines
1.0 KiB
JavaScript
30 lines
1.0 KiB
JavaScript
$(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;
|
|
});
|
|
|
|
}); |