xlawrence    2005/09/01 10:37:54 CEST

  Modified files:
    core/src/java/org/jahia/bin JahiaConfigurationWizard.java 
  Log:
  Added missing focus attribute in case validation failed during processing of 
the default site values
  
  Revision  Changes    Path
  1.24      +12 -6     
jahia/core/src/java/org/jahia/bin/JahiaConfigurationWizard.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/bin/JahiaConfigurationWizard.java.diff?r1=1.23&r2=1.24&f=h
  
  
  
  Index: JahiaConfigurationWizard.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/bin/JahiaConfigurationWizard.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- JahiaConfigurationWizard.java     31 Aug 2005 14:08:42 -0000      1.23
  +++ JahiaConfigurationWizard.java     1 Sep 2005 08:37:54 -0000       1.24
  @@ -1,4 +1,4 @@
  -// $Id: JahiaConfigurationWizard.java,v 1.23 2005/08/31 14:08:42 xlawrence 
Exp $
  +// $Id: JahiaConfigurationWizard.java,v 1.24 2005/09/01 08:37:54 xlawrence 
Exp $
   //
   //                                   ____.
   //                       __/\ ______|    |__/\.     _______
  @@ -539,19 +539,20 @@
                       && siteservername != null && (siteservername.length() > 
0)
                       && sitekey != null && (sitekey.length() > 0)) {
   
  -                if 
(values.get("root_user").equals(values.get("adminUsername"))) {
  -                    msg = 
JahiaResourceBundle.getMessageResource("org.jahia.admin.JahiaDisplayMessage.usernameSameLogin.label",
  -                            newSelectedLocale, 
JahiaResourceBundle.ADMIN_DEFAULT_RESOURCE_BUNDLE);
  -                } else if (!JahiaTools.isAlphaValid(sitekey)) {
  +                if (!JahiaTools.isAlphaValid(sitekey)) {
  +                    request.setAttribute("focus", "sitekey");
                       msg = 
JahiaResourceBundle.getMessageResource("org.jahia.admin.warningMsg.onlyLettersDigitsUnderscore.label",
                               newSelectedLocale, 
JahiaResourceBundle.ADMIN_DEFAULT_RESOURCE_BUNDLE);
                   } else if (sitekey.equals("site")) {
  +                    request.setAttribute("focus", "sitekey");
                       msg = 
JahiaResourceBundle.getMessageResource("org.jahia.admin.warningMsg.chooseAnotherSiteKey.label",
                               newSelectedLocale, 
JahiaResourceBundle.ADMIN_DEFAULT_RESOURCE_BUNDLE);
                   } else if (siteservername.equals("default")) {
  +                    request.setAttribute("focus", "siteservername");
                       msg = 
JahiaResourceBundle.getMessageResource("org.jahia.admin.warningMsg.chooseAnotherServerName.label",
                               newSelectedLocale, 
JahiaResourceBundle.ADMIN_DEFAULT_RESOURCE_BUNDLE);
                   } else if (sitekey.equals(ExtDepSiteConstants.SERVER)) {
  +                    request.setAttribute("focus", "sitekey");
                       msg = 
JahiaResourceBundle.getMessageResource("org.jahia.admin.warningMsg.chooseAnotherSiteKey.label",
                               newSelectedLocale, 
JahiaResourceBundle.ADMIN_DEFAULT_RESOURCE_BUNDLE);
                   } else {
  @@ -565,7 +566,12 @@
               // Only perform these checks if no errors occured in the 
previous section
               if (! error) {
                   error = true;
  -                if (((String) values.get("adminUsername")).length() < 4) {   
                                         // check username length [minimum 4 
chars]
  +
  +                if 
(values.get("root_user").equals(values.get("adminUsername"))) {
  +                    request.setAttribute("focus", "adminUsername");
  +                    msg = 
JahiaResourceBundle.getMessageResource("org.jahia.admin.JahiaDisplayMessage.usernameSameLogin.label",
  +                            newSelectedLocale, 
JahiaResourceBundle.ADMIN_DEFAULT_RESOURCE_BUNDLE);
  +                } else if (((String) values.get("adminUsername")).length() < 
4) {                                            // check username length 
[minimum 4 chars]
                       request.setAttribute("focus", "adminUsername");
                       msg = 
JahiaResourceBundle.getMessageResource("org.jahia.bin.JahiaConfigurationWizard.JahiaConfigurationMsg.usernameshort.label",
                               newSelectedLocale);
  

Reply via email to