user_data.js

Go to the documentation of this file.
00001 // -*-C-*- //tell emacs to use C mode
00002 /*
00003   This file is part of  DocBookWiki.  DocBookWiki is a web application
00004   that displays and edits DocBook documents.
00005 
00006   Copyright (C) 2004, 2005, 2006, 2007
00007   Dashamir Hoxha, dashohoxha@users.sourceforge.net
00008 
00009   DocBookWiki is free software;  you can redistribute it and/or modify
00010   it under the terms of the GNU General Public License as published by
00011   the Free  Software Foundation; either  version 2 of the  License, or
00012   (at your option) any later version.
00013 
00014   DocBookWiki is distributed  in the hope that it  will be useful, but
00015   WITHOUT  ANY   WARRANTY;  without  even  the   implied  warranty  of
00016   MERCHANTABILITY or  FITNESS FOR A  PARTICULAR PURPOSE.  See  the GNU
00017   General Public License for more details.
00018 
00019   You should  have received a copy  of the GNU  General Public License
00020   along  with  DocBookWiki;  if   not,  write  to  the  Free  Software
00021   Foundation, Inc., 59 Temple  Place, Suite 330, Boston, MA 02111-1307
00022   USA
00023 */
00024 
00025 function change_passwd()
00026 {
00027   var form = document.passwd;
00028   var new_password_1 = form.new_password_1.value;
00029   var new_password_2 = form.new_password_2.value;
00030 
00031   //check that New Password and Confirm Password are equal
00032   if (new_password_1 != new_password_2)
00033     {
00034       alert(T_("Passwords do not match. Please try again."));
00035       form.new_password_1.value = '';
00036       form.new_password_2.value = '';
00037       form.new_password_1.focus();
00038       return;
00039     }
00040 
00041   var event_args = ('new_password=' + new_password_1);
00042   SendEvent('user_data', 'change_passwd', event_args);
00043 }
00044 
00045 function save()
00046 {
00047   var form = document.profile;
00048   var name  = form.name.value;
00049   var email = form.email.value;
00050 
00051   name = name.replace(/:/, '');
00052   email = email.replace(/:/, '');
00053   var event_args = ('name=' + name + ';' + 'email=' + email);
00054   SendEvent('user_data', 'save', event_args);
00055 }

Generated on Wed Jan 9 08:27:32 2008 for DokBookWiki by  doxygen 1.5.2