Template.resetPassword.events({
    'submit #resetPassword'(event) {
        event.preventDefault();

        console.log('event capté');
        let newPassword = $('#Password').val();

        let token = FlowRouter.getParam('token');
        Accounts.resetPassword( token, newPassword, function( error ) {
          if ( error ) {
            Bert.alert( error.reason, 'error' );
          } else {
            FlowRouter.go( 'root' );
            console.log( 'Password changed!' );
          }
        });
    }
});
