[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [bodega-webapp-client] views: Add a second email field into the register form.
From:       Antonis Tsiapaliokas <kok3rs () gmail ! com>
Date:       2013-03-21 17:41:11
Message-ID: 20130321174111.EF69DA604F () git ! kde ! org
[Download RAW message or body]

Git commit 63119d01ba45ca5742eef20bddc7b966c4602dec by Antonis Tsiapaliokas.
Committed on 21/03/2013 at 18:39.
Pushed by tsiapaliokas into branch 'master'.

Add a second email field into the register form.
This will save our users from trouble in case
they make some typo in the first field

BUG: 317125

M  +10   -0    views/register.jade

http://commits.kde.org/bodega-webapp-client/63119d01ba45ca5742eef20bddc7b966c4602dec

diff --git a/views/register.jade b/views/register.jade
index 9f4548b..20ff0ba 100644
--- a/views/register.jade
+++ b/views/register.jade
@@ -15,6 +15,14 @@ block body
             return false;
         }
 
+        if ($('#email').val() !== $('#email2').val()) {
+            $('#email').attr('placeholder', 'Your email addresses does not match.');
+            $('#email2').attr('placeholder', 'Your email addresses does not \
match.'); +            $('#field-control').addClass('error');
+            $('#help-password').text('Your email addresses does not match');
+            return false;
+        }
+
         if ($('#password').val().length < 8 || $('#password2').val() < 8 ) {
             $('#password').attr('placeholder', 'Your password must be at least 8 \
                digits.');
             $('#password2').attr('placeholder', 'Your password must be at least 8 \
digits.'); @@ -45,6 +53,8 @@ block body
             .input
               input.xlarge(type='text', placeholder='Enter your Email Adress', \
                name='email', id='email', required)
             .input
+              input.xlarge(type='text', placeholder='Enter your Email Adress Again', \
name='email2', id='email2', required) +            .input
               input.xlarge(type='password', placeholder='Enter your Password', \
                name='password', id='password' , required)
             .input
               input.xlarge(type='password', placeholder='Retype your Password', \
name='password2', id='password2' , required)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic