Commits

Juan Carlos Picado Herrera committed 77b3ea9 Merge

Merge

  • Participants
  • Parent commits d2ab4ea, ac9d7c6 1
    1. 9ded955

Comments (0)

Files changed (23)

 #!/bin/bash
 DOJO_PATH=dojo
-SVN_DOJO=http://svn.dojotoolkit.org/src/tags/release-1.6.0/
-FILE_DOJO=http://download.dojotoolkit.org/release-1.6.0/dojo-release-1.6.0-src.zip
-FILE_NAME=dojo-release-1.6.0-src.zip
+SVN_DOJO=http://svn.dojotoolkit.org/src/tags/release-1.6.1/
+FILE_DOJO=http://download.dojotoolkit.org/release-1.6.1/dojo-release-1.6.1-src.zip
+FILE_NAME=dojo-release-1.6.1-src.zip
 
 function createFromDownload {
         if [ -d ${DOJO_PATH} ]; then
     wget ${FILE_DOJO}
     echo "ZIP - Create work path"
     unzip ${FILE_NAME}
-    mv dojo-release-1.6.0-src ${DOJO_PATH}
+    mv dojo-release-1.6.1-src ${DOJO_PATH}
     echo "ZIP - Copy Resources"
     rm ${FILE_NAME}
     copyResources

File encuestame-mvc/src/main/java/org/encuestame/mvc/controller/security/SignUpAccountFormController.java

 import org.apache.log4j.Logger;
 import org.encuestame.core.config.EnMePlaceHolderConfigurer;
 import org.encuestame.core.security.util.PasswordGenerator;
-import org.encuestame.mvc.util.WidgetUtil;
 import org.encuestame.mvc.validator.ValidateOperations;
 import org.encuestame.persistence.domain.security.UserAccount;
 import org.encuestame.utils.captcha.ReCaptchaResponse;
 import org.encuestame.utils.security.SignUpBean;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
+import org.springframework.ui.ModelMap;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
      * @param model
      * @return
      */
-    @RequestMapping(value = "/signup", method = RequestMethod.GET)
+    @RequestMapping(value = "/user/signup", method = RequestMethod.GET)
     public String addHandler(Model model) {
         final Boolean privateHome = EnMePlaceHolderConfigurer
         .getBooleanProperty("application.signup.enabled");
      * @param status
      * @return
      */
-    //@RequestMapping(method = RequestMethod.POST)
-    public String processSubmit(
-        HttpServletRequest req,
-        @RequestParam("recaptcha_challenge_field") String challenge,
-        @RequestParam("recaptcha_response_field") String response,
-        @ModelAttribute SignUpBean user, BindingResult result, SessionStatus status) {
-             log.info("recaptcha_challenge_field "+challenge);
-             log.info("recaptcha_response_field "+response);
-             final String email = filterValue(user.getEmail());
-             final String username = filterValue(user.getUsername());
+    @RequestMapping(value = "/user/signup/create", method = RequestMethod.POST)
+    public String processSubmit(final ModelMap model,
+        HttpServletRequest req) {
+                log.info("u**************************************");
+                log.info("u**************************************");
+                log.info("u**************************************");
+                log.info("u**************************************");
+                log.info("u**************************************");
+                log.info("u**************************************");
+               final SignUpBean user = new SignUpBean();
+               user.setEmail("juan@jotadeveloper.com");
+               user.setUsername("jota22");
+             final String email = filterValue("juan@jotadeveloper.com");
+             final String username = filterValue("jota22");
              log.info("username "+username);
              log.info("password "+email);
-             final ReCaptchaResponse reCaptchaResponse = getReCaptcha().checkAnswer(req.getRemoteAddr(), challenge, response);
+             //final ReCaptchaResponse reCaptchaResponse = getReCaptcha().checkAnswer(req.getRemoteAddr(), challenge, response);
              final ValidateOperations validation = new ValidateOperations(getSecurityService());
 
              if(validation.validateUserEmail(email, null) != null){
                    log.warn("Email NOT VALID");
-                   result.rejectValue("email", "secure.email.notvalid"); //secure.email.notvalid
+//                   result.rejectValue("email", "secure.email.notvalid"); //secure.email.notvalid
              }
              if(!validation.validateUsername(username,  null)){
                  log.warn("Username NOT VALID");
-                  result.rejectValue("username", "secure.user.notvalid"); //secure.user.notvalid
+ //                 result.rejectValue("username", "secure.user.notvalid"); //secure.user.notvalid
              }
             //validate captcha
-            validation.validateCaptcha(reCaptchaResponse, result);
-            log.info("reCaptchaResponse "+reCaptchaResponse.getErrorMessage());
-            log.info("reCaptchaResponse "+reCaptchaResponse.isValid());
-            log.info("result.hasErrors() "+result.hasErrors());
-            if (result.hasErrors()) {
-                return "register";
-            }
-            else {
+ //           validation.validateCaptcha(reCaptchaResponse, result);
+            //log.info("reCaptchaResponse "+reCaptchaResponse.getErrorMessage());
+            //log.info("reCaptchaResponse "+reCaptchaResponse.isValid());
+           // log.info("result.hasErrors() "+result.hasErrors());
+//            if (result.hasErrors()) {
+//                return "register";
+ //           }
+//            else {
                 final String password = PasswordGenerator.getPassword(PASSWORD_LENGHT);
                 user.setPassword(password);
                 //create
                 final UserAccount unitUserBean = getSecurityService().singupUser(user);
-                status.setComplete();
+              //  status.setComplete();
                 log.info("password generated "+password);
                 log.info("New User with userId: " + unitUserBean.getUid() + " added at " + new Date());
                 //authenticate(req, username, password); //TODO: I don't know why we have Lazy here.
-                return "redirect:/user/signin";
-            }
+                return "redirect:/user/dashboard";
+   //         }
     }
 }

File encuestame-mvc/src/main/java/org/encuestame/mvc/controller/security/json/ValidatorServiceJsonController.java

             if (value.isEmpty() || value.length() < ValidateOperations.MIN_EMAIL_LENGTH) {
                 jsonResponse.put("msg", getMessage("secure.email.emtpy", request, null));
             } else {
-                valid = validateOperations.validateEmail(value);
+                valid = validateOperations.validateUserEmail(value, null);
                 log.debug("validate EMAIL"+valid);
                 if (valid) {
                     jsonResponse.put("msg", getMessage("secure.email.valid", request, null));

File encuestame-mvc/src/main/java/org/encuestame/mvc/validator/ValidateOperations.java

      */
     public Boolean validateUserEmail(final String email, final UserAccount user, final UserAccount userLogged){
         log.debug("validating email... ->"+email);
+        log.debug("validating email UserAccount... ->"+user);
         Boolean valid = false;
         if (this.validateEmail(email)) {
             if (user == null) {

File encuestame-war/src/main/webapp/WEB-INF/jsp/includes/taglibs.jsp

-<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
 <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 <%@page import="org.encuestame.mvc.util.WidgetUtil"%>
-<%@page import="org.encuestame.core.config.EnMePlaceHolderConfigurer"%>
-<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
-<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
+<%@page import="org.encuestame.core.config.EnMePlaceHolderConfigurer"%>

File encuestame-war/src/main/webapp/WEB-INF/spring/encuestame-security-context.xml

         <security:intercept-url pattern="/profile/**" access="permitAll" />
         <security:intercept-url pattern="/tags/**"  access="permitAll" />
         <security:intercept-url pattern="/signin/**" access="permitAll" />
-        <security:intercept-url pattern="/signup" access="permitAll" />
-        <security:intercept-url pattern="/signup/**" access="permitAll" />
+        <security:intercept-url pattern="/user/signin/**" access="permitAll" />
+        <security:intercept-url pattern="/user/signup/**" access="permitAll" />
+        <security:intercept-url pattern="/user/signup/create" access="permitAll" />
         <security:intercept-url pattern="/user/forgot/**" access="permitAll" />
-        <security:intercept-url pattern="/user/signup/**" access="permitAll"  />
         <security:intercept-url pattern="/user/logout" access="hasRole('ENCUESTAME_USER')"  />
         <security:intercept-url pattern="/admon/**/*"  access="hasRole('ENCUESTAME_ADMIN')" />
         <security:intercept-url pattern="/settings/**/*" access="hasRole('ENCUESTAME_USER')" />

File encuestame-war/src/main/webapp/WEB-INF/views/user/web/signin.jsp

         </form>
         <div class="singup">
            <span >
+<<<<<<< .merge_file_tHqgiO
                 New User? <a href="<%=request.getContextPath()%>/signup"><span>Sign Up</span></a> for free
+=======
+                New User? <a href="<%=request.getContextPath()%>/user/signup"><span>Sign Up</span></a> for free
+>>>>>>> .merge_file_cH6utJ
            </span>
         </div>
          <c:if test="${social}">

File encuestame-war/src/main/webapp/WEB-INF/views/user/web/signup.jsp

   dojo.require("encuestame.org.core.commons.validator.RealNameValidator");
   dojo.require("encuestame.org.core.commons.validator.UsernameValidator");
   dojo.require("encuestame.org.core.shared.utils.StandBy");
+  dojo.require("encuestame.org.core.commons.signup.Signup");
+  dojo.require("dijit.form.Form");
   encuestame.constants.passwordExcludes =  <%=WidgetUtil.getPasswordBlackList("passwords.inc")%>;
 </script>
 <div id="web-signup-wrapper" class="enme-auto-center">
     <div class="web-form-wrapper">
             <div class="leftMessage">
             </div>
-            <form method="POST"
-                action="<%=request.getContextPath()%>/signup/create" class="signup-form defaultForm" autocomplete="false">
+            <form method="POST" id="signupForm" dojoType="dijit.form.Form" jsId="signupForm" encType="multipart/form-data"
+                action="<%=request.getContextPath()%>/user/signup/create"
+                class="signup-form defaultForm"
+                autocomplete="false">
                 <fieldset class="textbox">
                     <div class="section name">
-                        <div dojoType="encuestame.org.core.commons.validator.RealNameValidator" enviroment="ext"></div>
+                        <div id="rm" dojoType="encuestame.org.core.commons.validator.RealNameValidator" enviroment="ext"></div>
                     </div>
                     <div class="section password">
-                         <div dojoType="encuestame.org.core.commons.validator.PasswordValidator" enviroment="ext"></div>
+                         <div id="pssw" dojoType="encuestame.org.core.commons.validator.PasswordValidator" enviroment="ext"></div>
                     </div>
                     <div class="section email">
-                        <div dojoType="encuestame.org.core.commons.validator.EmailValidator" enviroment="ext"></div>
+                        <div id="em" dojoType="encuestame.org.core.commons.validator.EmailValidator" enviroment="ext"></div>
                     </div>
                      <div class="section username">
-                        <div dojoType="encuestame.org.core.commons.validator.UsernameValidator" enviroment="ext"></div>
+                        <div id="usrva" dojoType="encuestame.org.core.commons.validator.UsernameValidator" enviroment="ext"></div>
                     </div>
                     <input type="hidden" name="context" value="front">
                 </fieldset>
             <div class="standby">
-                <div id="standby" dojoType="encuestame.org.core.shared.utils.StandBy"></div>
+                <div id="standby" dojoType="encuestame.org.core.shared.utils.StandBy" target="signupForm"></div>
                 </div>
                 <fieldset>
-                    <div>
-                        <input class="submit button promotional" type="submit" value="Sign Up Now">
+                    <div class="center">
+                        <div dojoType="encuestame.org.core.commons.signup.Signup"></div>
                     </div>
                     <div>
                         <input type="hidden" value="1">
                     </div>
                 </fieldset>
             </form>
-
-        <!-- --------------------------------------------------------------------------------------------------------------------- -->
-        <form class="form" action="<%=request.getContextPath()%>/user/signup/authenticate"  method="post">
-        </form>
     </div>
 </div>

File encuestame-war/src/main/webapp/resource/css/default.css

   width: 100%;
   margin-top: 15px;
 }
+
 #footer .powered{
  float: right;
 }
 
+.center {
+ text-align: center;
+}
+
 #footer .footer{
   font-size: 0.9em;
   height: 20px;

File encuestame-war/src/main/webapp/resource/css/public.css

   background-repeat: no-repeat;
   font-weight: bold;
   font-size: 13px;
-  line-height: 16px;
+  margin: 15px;
 }
 
 #web-signup-wrapper  .textbox .validator-wrapper .shadow-input-message {
   position: relative;
 }
 
-#web-signup-wrapper .textbox input, .textbox .shadow-input-message {
-  font: 20px "Helvetica Neue",Helvetica,Arial,sans-serif;
+#web-signup-wrapper .textbox input button, .textbox .shadow-input-message {
+
 }
 
 #web-signup-wrapper  .shadow-input-message {

File encuestame-war/src/main/webapp/resource/js/encuestame.profile.js

                 "encuestame.org.core.shared.utils.AccountPicture",
                 "encuestame.org.core.commons.social.LinksPublished",
                 "encuestame.org.core.commons.tweetPoll.detail.TweetPollAnswer",
+                "encuestame.org.core.commons.signup.Signup",
                 "encuestame.org.core.commons.tweetPoll.TweetPollList",
                 "encuestame.org.core.commons.tweetPoll.TweetPollListDetail",
                 "encuestame.org.core.commons.tweetPoll.HashTags",

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons.js

     web : "web"
 };
 encuestame.constants.errorCodes = {
-    002 : "Enter your first and last name.",
-    003 : "Whats your email address?",
-    006 : "Doesn't look like a valid email.",
-    007 : "An email is required!",
-    008 : "This email is already registered",
-    012 : "Password is too obvious.",
-    013 : "Password is not secure enough.",
-    014 : "Password must be at least 6 characters. No whitespace.",
-    015 : "Password cannot be blank!",
-    017 : "This username is already taken!",
-    018 : "Invalid username!",
-    019:  "A username is required!"
+    "002" : "Enter your first and last name.",
+    "003" : "Whats your email address?",
+    "006" : "Doesn't look like a valid email.",
+    "007" : "An email is required!",
+    "008" : "This email is already registered",
+    "012" : "Password is too obvious.",
+    "013" : "Password is not secure enough.",
+    "014" : "Password must be at least 6 characters. No whitespace.",
+    "015" : "Password cannot be blank!",
+    "017" : "This username is already taken!",
+    "018" : "Invalid username!",
+    "019":  "A username is required!"
 };
 encuestame.constants.messageCodes = {
-    001 : "Name looks great",
-    004 : "We will email you a confirmation.",
-    005 : "Validating...",
-    007 : "An email is required!",
-    008 : "This email is already registered",
-    009 : "Password is perfect!<",
-    010 : "Password is okay.",
-    011 : "Password could be more secure.",
-    016 : "Don't worry, you can change it later."
+    "001" : "Name looks great",
+    "004" : "We will email you a confirmation.",
+    "005" : "Validating...",
+    "007" : "An email is required!",
+    "008" : "This email is already registered",
+    "009" : "Password is perfect!",
+    "010" : "Password is okay.",
+    "011" : "Password could be more secure.",
+    "016" : "Don't worry, you can change it later."
 };
 
 encuestame.constants.version = { version : "1.1.37"};

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/signup/Signup.js

+dojo.provide("encuestame.org.core.commons.signup.Signup");
+
+dojo.require("dojo.io.iframe");
+dojo.require("dijit.form.TextBox");
+dojo.require("dijit.form.ComboButton");
+dojo.require("dijit.MenuItem");
+dojo.require("dijit.Menu");
+
+dojo.declare("encuestame.org.core.commons.signup.Signup",
+        [dijit._Widget, dijit._Templated ], {
+    templatePath : dojo.moduleUrl("encuestame.org.core.commons.signup", "templates/signup.html"),
+
+    widgetsInTemplate : true,
+
+    value : 'Sign Up Now',
+
+    userWidget: null,
+    passWidget: null,
+    emailWidget: null,
+    realWidget: null,
+    standWidget: null,
+
+    /*
+     *
+     */
+    postCreate : function() {
+        this.userWidget = dijit.byId("usrva");
+        this.passWidget = dijit.byId("pssw");
+        this.emailWidget = dijit.byId("em");
+        this.realWidget = dijit.byId("rm");
+        this.standWidget = dijit.byId("standby");
+                if (this.userWidget == null || this.passWidget == null
+                || this.emailWidget == null || this.realWidget == null
+                || this.standWidget == null) {
+        } else {
+             dojo.connect(this._submit, "onclick", dojo.hitch(this, function(event) {
+                 console.debug("standby init");
+                 this.standWidget.startup();
+                 this.standWidget.start();
+                 console.debug("standby init 2");
+                 this._checkValidWidgets();
+             }));
+             dojo.connect(this._input, "ondoubleclick", dojo.hitch(this, function(event) {
+                 console.debug("calm down cowboy !!");
+             }));
+        }
+    },
+
+    createNewAccountService : function(){
+         console.debug("createNewAccountService signupForm", signupForm);
+         signupForm.submit();
+    },
+
+    _checkValidWidgets : function(){
+        console.debug("standby init 3");
+        console.debug("standby init 3",this.userWidget.isValid);
+        console.debug("standby init 3", this.passWidget.isValid);
+        console.debug("standby init 3",this.emailWidget.isValid);
+        console.debug("standby init 3",this.realWidget.isValid);
+        if(this.userWidget.isValid && this.passWidget.isValid && this.emailWidget.isValid && this.realWidget.isValid){
+            console.debug("_checkValidWidgets 1");
+            this.createNewAccountService(this.userWidget, this.passWidget, this.emailWidget, this.realWidget);
+        } else {
+            console.debug("_checkValidWidgets 2");
+            this.standWidget.stop();
+            this.userWidget.recheck("username");
+            this.passWidget.validatePassword();
+            this.emailWidget.recheck("email");
+            this.realWidget.recheck("real_name");
+        }
+    },
+
+    _create : function(event){
+        this.uploadImage();
+    }
+});

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/signup/SignupProfile.js

 
 dojo.declare("encuestame.org.core.commons.signup.SignupProfile",
         [dijit._Widget, dijit._Templated ], {
-    templatePath : dojo.moduleUrl("encuestame.org.core.commons.signup.", "templates/profile.html"),
+    templatePath : dojo.moduleUrl("encuestame.org.core.commons.signup", "templates/profile.html"),
 
     widgetsInTemplate : true,
 

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/signup/templates/signup.html

+<div>
+    <button class="submit button" type="button" dojoAttachPoint="_submit" value="${value}">${value}</button>
+</div>

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/validator/AbstractValidatorWidget.js

     focusDefault : false,
     enviroment : "external",
     isValid : false,
+    inputTextValue : "",
     toolTip : true,
     postCreate : function(){
         this.inherited(arguments);
         if (this.focusDefault) {
             dijit.focus( dojo.byId("input_"+this.id));
         }
-        if(!this.noEvents) {
+        if (!this.noEvents) {
             dojo.connect(this._input, "onchange", dojo.hitch(this, function(event) {
                 this._validate(event);
             }));
         }
     },
 
+    getServiceUrl : function(){
+        return "";
+    },
+
+    recheck : function(data){
+         this._loadService(
+                   this.getServiceUrl(), {
+                   context : this.enviroment,
+                   data : this.inputTextValue
+               }, this.error);
+    },
+
+    error : function() {
+        console.info("override");
+    },
+
     /*
      *
      */
     _showToolTip : function(){
         var position = dojo.position(dojo.byId("input_"+this.id), true);
         var node = dojo.byId("_tooltip_"+this.id);
-        console.info("_showToolTip", position);
+        //console.info("_showToolTip", position);
         if (node) {
             dojo.style(node, "opacity", "0");
             var fadeArgs = {
             dojo.style(node, "display", "block");
             dojo.fadeIn(fadeArgs).play();
             dojo.style(node, "top",  "0px");
-            console.info("_showToolTip", node);
+            //console.info("_showToolTip", node);
         }
     },
 
     _hideToolTip : function(){
         var node = dojo.byId("_tooltip_"+this.id);
-        console.info("_hideToolTip", node);
+        //console.info("_hideToolTip", node);
         if (node) {
             dojo.style(node, "opacity", "1");
             var fadeArgs = {
          */
         _showErrorMessage : function(data){
             var node = dojo.byId("_message_"+this.id);
-            console.info("_showSuccessMessage", data);
+            //console.info("_showSuccessMessage", data);
             if (node) {
                 dojo.empty(node);
                 var p = dojo.doc.createElement("p");

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/validator/EmailValidator.js

     /*
     *
     */
-   _validate : function(event){
+   _validate : function(event) {
+           this.inputTextValue = this._input.value;
            this._loadService(
-           encuestame.service.publicService.validate.email, {
+           this.getServiceUrl(), {
            context : this.enviroment,
            email : this._input.value
        }, this.error);
    },
 
+   getServiceUrl : function(){
+       return encuestame.service.publicService.validate.email;
+   },
+
     error : function(error) {
        console.debug("error", error);
     }

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/validator/PasswordValidator.js

     toolTip : false,
     postCreate : function(){
         this.inherited(arguments);
+        dojo.connect(this._input, "onkeyup", dojo.hitch(this, function(event) {
+             this.inputTextValue = this._input.value.toLowerCase();
+             console.debug(this.inputTextValue);
+             if(this.inputTextValue.length > 0){
+                 this._validate(this.inputTextValue);
+             } else {
+                 var data = {};
+                 data.msg = encuestame.constants.errorCodes["015"];
+                 this._showErrorMessage(data);
+             }
+
+        }));
     },
+
     _validateBlackListPassword : function(password){
         var valid = false;
         dojo.forEach(encuestame.constants.passwordExcludes,
                     console.debug(item);
         }));
         return valid;
-    }
+    },
+
+    validatePassword :function() {
+        this._validate(this.inputTextValue);
+    },
+
+    evaluateStrong : function(passwd) {
+        var intScore = 0;
+        var strVerdict = "weak";
+        var strLog = "";
+
+        if (passwd.length < 5) {
+            intScore = (intScore + 3);
+        } else if (passwd.length > 4 && passwd.length < 8) {
+            intScore = (intScore + 6);
+        } else if (passwd.length > 7 && passwd.length < 16) {
+            intScore = (intScore + 12);
+        } else if (passwd.length > 15) {
+            intScore = (intScore + 18);
+        }
+
+        if (passwd.match(/[a-z]/)) {
+            intScore = (intScore + 1);
+        }
+
+        if (passwd.match(/[A-Z]/)) {
+            intScore = (intScore + 5);
+        }
+
+        if (passwd.match(/\d+/)) {
+            intScore = (intScore + 5);
+        }
+
+        if (passwd.match(/(.*[0-9].*[0-9].*[0-9])/)) {
+            intScore = (intScore + 5);
+        }
+
+        if (passwd.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)) {
+            intScore = (intScore + 5);
+        }
+
+        if (passwd.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) {
+            intScore = (intScore + 5);
+        }
+
+        if (passwd.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) {
+            intScore = (intScore + 2);
+        }
+
+        if (passwd.match(/([a-zA-Z])/) && passwd.match(/([0-9])/)) {
+            intScore = (intScore + 2);
+        }
+
+        if (passwd.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)) {
+            intScore = (intScore + 2);
+        }
+
+        return intScore;
+    },
+
+    /*
+    *
+    */
+   _validate : function(password) {
+           var banned = false;
+           // check banned password.
+           if (encuestame.constants.passwordExcludes.indexOf(password.toLowerCase()) != -1) {
+               console.info(password.toLowerCase());
+               var data = {};
+               data.msg = encuestame.constants.errorCodes["012"];
+               banned = true;
+               this._showErrorMessage(data);
+           }
+          if (!banned) {
+              var data = {};
+              var intScore = this.evaluateStrong(password);
+              if (intScore < 16) {
+                  data.msg = encuestame.constants.errorCodes["012"];
+                  this.isValid = false;
+                  this._showErrorMessage(data);
+              } else if (intScore > 15 && intScore < 25) {
+                  data.msg =  encuestame.constants.errorCodes["013"];
+                  this._showErrorMessage(data);
+                  this.isValid = false;
+              } else if (intScore > 24 && intScore < 35) {
+                  data.msg = encuestame.constants.messageCodes["011"];
+                  this._showSuccessMessage(data);
+                  this.isValid = true;
+              } else if (intScore > 34 && intScore < 45) {
+                  data.msg = encuestame.constants.messageCodes["010"];
+                  this._showSuccessMessage(data);
+                  this.isValid = true;
+              } else {
+                  data.msg = encuestame.constants.messageCodes["009"];
+                  this._showSuccessMessage(data);
+                  this.isValid = true;
+              }
+          } else {
+                this.isValid = false;
+          }
+   },
+
+
+   /*
+    *
+    */
+   _showSuccessMessage : function(data){
+       var node = dojo.byId("_message_"+this.id);
+       if (node) {
+           dojo.empty(node);
+           var p = dojo.doc.createElement("p");
+           dojo.addClass(p, "success-message");
+           p.innerHTML = data.msg;
+           node.appendChild(p);
+       }
+   },
+
+     /*
+      *
+      */
+     _showErrorMessage : function(data){
+         var node = dojo.byId("_message_"+this.id);
+         console.info("_showSuccessMessage", data);
+         if (node) {
+             dojo.empty(node);
+             var p = dojo.doc.createElement("p");
+             dojo.addClass(p, "error-message");
+             p.innerHTML = data.msg;
+             node.appendChild(p);
+         }
+     }
 
 });

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/validator/RealNameValidator.js

     *
     */
    _validate : function(event){
+       this.inputTextValue = this._input.value;
            this._loadService(
-       encuestame.service.publicService.validate.realName, {
+       this.getServiceUrl(), {
            context : this.enviroment,
-           real_name : "432432342"
+           real_name : this._input.value
        }, this.error);
    },
 
+
+   getServiceUrl : function(){
+       return encuestame.service.publicService.validate.realName;
+   },
+
     error : function(error) {
        console.debug("error", error);
     }

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/validator/UsernameValidator.js

      *
      */
     _validate : function(event){
+        this.inputTextValue = this._input.value;
             this._loadService(
-        encuestame.service.publicService.validate.username, {
+            this.getServiceUrl(), {
             context : this.enviroment,
             username :  this._input.value
         }, this.error);
     },
 
+    getServiceUrl : function(){
+        return encuestame.service.publicService.validate.username;
+    },
+
     /**
      * Add suggestions
      * @param data

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/validator/templates/passwordValidator.html

     <div class="validator-wrapper">
         <div class="sidetip" id="_message_${id}">
         </div>
-        <input id="input_${id}" type="password" value="" name="user[user_password]" aria-required="true" class="" autocomplete="false">
+        <input id="input_${id}" type="password" value="" class="" dojoAttachPoint="_input" autocomplete="false">
             <span class="shadow-input-message" dojoAttachPoint="_shadow" >Password</span>
     </div>
     <div class="tooltip" dojoAttachPoint="_tooltip" id="_tooltip_${id}">

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/shared/utils/StandBy.js

 
 dojo.require("dijit._Templated");
 dojo.require("dijit._Widget");
-dojo.require("dijit.form.Button");
-dojo.require("dijit.form.TextBox");
-dojo.require("dojox.data.QueryReadStore");
+dojo.require("dojox.widget.Standby");
 dojo.require('encuestame.org.core.commons');
 
-dojo.declare(
-    "encuestame.org.core.shared.utils.StandBy",
-    [dijit._Widget, dijit._Templated],{
+dojo.declare("encuestame.org.core.shared.utils.StandBy", [ dijit._Widget,
+        dijit._Templated ], {
 
-        templatePath: dojo.moduleUrl("encuestame.org.core.shared.utils", "template/standBy.html"),
+    templatePath : dojo.moduleUrl("encuestame.org.core.shared.utils",
+            "template/standBy.html"),
 
-        /** Allow other widgets in the template. **/
-        widgetsInTemplate: true,
+    /** Allow other widgets in the template. * */
+    widgetsInTemplate : true,
 
-        size : "medium",
+    size : "medium",
+
+    target : "",
+
+    postCreate : function() {
+       this.init();
+    },
+
+    init : function() {
+
+    },
+
+    start : function() {
+        console.debug("STAND BY START", standById);
+        standById.show();
+    },
+
+    stop : function() {
+        console.debug("STAND BY START", standById);
+        standById.hide();
+    }
 
-        postCreate: function() {
-        }
 });

File encuestame-war/src/main/webapp/resource/js/encuestame/org/core/shared/utils/template/standBy.html

-<div style="display: none;">
-    sand by
-</div>
+<div class="stabdby-wrappers" style="min-height: 40px;" >
+    <div jdojoAttachPoint="_standBy" dojoType="dojox.widget.Standby" target=${target} jsId="standById"></div>
+</div