X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageRegister.js;h=ca1ddb36607c79ba2cc307e77676117e68ce7282;hp=797806efab8dacc7c9e98148cbb6ffdb91bb07c9;hb=ce1fba00ff3eaa6708d6070763f74a400273203b;hpb=9d95f5af441fda194444405983e4d110c2514680 diff --git a/js/pageRegister.js b/js/pageRegister.js index 797806e..ca1ddb3 100755 --- a/js/pageRegister.js +++ b/js/pageRegister.js @@ -1,4 +1,20 @@ -// coding: utf-8 +// coding: utf-8 +// Copyright 2008 Grégory Burri +// +// This file is part of Euphorik. +// +// Euphorik is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Euphorik is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Euphorik. If not, see . function PageRegister(client, formateur, util) { @@ -12,11 +28,11 @@ function PageRegister(client, formateur, util) PageRegister.prototype.contenu = function() { return '\ -
\ +\ \ \ \ - \ + \ \ \ \ @@ -31,7 +47,7 @@ PageRegister.prototype.contenu = function() \
login\
password\
\ -' +
' } PageRegister.prototype.charger = function() @@ -55,14 +71,9 @@ PageRegister.prototype.charger = function() thisPage.util.messageDialogue("Un mot de passe est obligatoire") else if (password != passwordRe) thisPage.util.messageDialogue("Les mots de passes ne correspondent pas") - else if(!thisPage.client.enregistrement(login, thisPage.util.md5(password))) - { - thisPage.util.messageDialogue(thisPage.client.dernierMessageErreur, messageType.erreur) - } - else + else if(thisPage.client.enregistrement(login, thisPage.util.md5(password))) { - // TODO : avertir que l'enregistrement s'est bien déroulé - thisPage.client.majMenu() + thisPage.util.messageDialogue("Enregistrement réussi") thisPage.pages.afficherPage("minichat") } }