geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r477664 - in /geronimo/server/trunk/applications/console: geronimo-console-framework/src/main/webapp/js/ geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/ geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/ ge...
Date Tue, 21 Nov 2006 13:20:35 GMT
Author: vamsic007
Date: Tue Nov 21 05:20:34 2006
New Revision: 477664

URL: http://svn.apache.org/viewvc?view=rev&rev=477664
Log:
GERONIMO-2533 Password setup forms should use a confirmation field

Modified:
    geronimo/server/trunk/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/configureKey.jsp
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/createKeystore.jsp
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/_sql.jsp
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/configure.jsp
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp

Modified: geronimo/server/trunk/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js?view=diff&rev=477664&r1=477663&r2=477664
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js
Tue Nov 21 05:20:34 2006
@@ -14,6 +14,9 @@
 //   See the License for the specific language governing permissions and
 //   limitations under the License.
 //======================================================================
+
+// $Rev$ $Date$
+
 function textElementsNotEmpty(formName, elementNameArray){
     var obj;
     for(i in elementNameArray){
@@ -85,5 +88,20 @@
     var yy = (d0.getYear() < 10 ? '0' : '') + d0.getYear();
     var d1 = mm+'/'+dd+'/'+yy;
     return inpDate == d1;
+}
+
+function passwordElementsConfirm(formName, elementNameArray) {
+    var pwd, cnf;
+    for(i in elementNameArray){
+        var elem = elementNameArray[i];
+        pwd = eval("document.forms['" + formName + "'].elements['"+ elem +"']");
+        cnf = eval("document.forms['" + formName + "'].elements['confirm-"+ elem +"']");
+        if(pwd.value != cnf.value){
+            alert(elem + " and confirm password do not match.");
+            pwd.focus(); 
+            return false;             
+        }
+    }
+    return true;
 }
     

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/configureKey.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/configureKey.jsp?view=diff&rev=477664&r1=477663&r2=477664
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/configureKey.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/configureKey.jsp
Tue Nov 21 05:20:34 2006
@@ -14,6 +14,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 --%>
+
+<%-- $Rev$ $Date$ --%>
+
 <%@ page import="org.apache.geronimo.console.util.PortletManager"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
@@ -23,6 +26,7 @@
 var <portlet:namespace/>formName = "<portlet:namespace/>KeystoreForm";
 var <portlet:namespace/>requiredFields = new Array("alias", "password", "certCN", "certO",
"certOU", "certL", "certST", "certC");
 var <portlet:namespace/>numericFields = new Array("valid");
+var <portlet:namespace/>passwordFields = new Array("password");
 function <portlet:namespace/>validateForm(){
     if(!textElementsNotEmpty(<portlet:namespace/>formName,<portlet:namespace/>requiredFields))
         return false;
@@ -30,6 +34,9 @@
         if(!checkIntegral(<portlet:namespace/>formName, <portlet:namespace/>numericFields[i]))
             return false;
     }
+    if(!passwordElementsConfirm(<portlet:namespace/>formName, <portlet:namespace/>passwordFields))
{
+        return false;
+    }
     return true;
 }
 </script>
@@ -52,6 +59,12 @@
             <th align="right">Password for new key:</th>
             <td>
                 <input type="password" name="password" size="20" maxlength="200" />
+            </td>
+        </tr>
+        <tr>
+            <th align="right">Confirm password:</th>
+            <td>
+                <input type="password" name="confirm-password" size="20" maxlength="200"
/>
             </td>
         </tr>
         <tr>

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/createKeystore.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/createKeystore.jsp?view=diff&rev=477664&r1=477663&r2=477664
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/createKeystore.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/keystore/createKeystore.jsp
Tue Nov 21 05:20:34 2006
@@ -14,11 +14,29 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 --%>
+
+<%-- $Rev$ $Date$ --%>
+
 <%@ page import="org.apache.geronimo.console.util.PortletManager"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <portlet:defineObjects/>
 
+<script language="JavaScript">
+var <portlet:namespace/>formName = "<portlet:namespace/>KeystoreForm";
+var <portlet:namespace/>requiredFields = new Array("filename", "password");
+var <portlet:namespace/>passwordFields = new Array("password");
+function <portlet:namespace/>validateForm(){
+    if(!textElementsNotEmpty(<portlet:namespace/>formName, <portlet:namespace/>requiredFields))
{
+        return false;
+    }
+    if(!passwordElementsConfirm(<portlet:namespace/>formName, <portlet:namespace/>passwordFields))
{
+        return false;
+    }
+    return true;
+}
+</script>
+
 <form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
     <input type="hidden" name="mode" value="createKeystore-after" />
     <table border="0">
@@ -34,8 +52,14 @@
                 <input type="password" name="password" size="20" maxlength="200" />
             </td>
         </tr>
+        <tr>
+            <th align="right">Confirm password:</th>
+            <td>
+                <input type="password" name="confirm-password" size="20" maxlength="200"
/>
+            </td>
+        </tr>
     </table>
-    <input type="submit" value="Create Keystore" />
+    <input type="submit" value="Create Keystore" onClick="return <portlet:namespace/>validateForm();"/>
 </form>
 
 

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/_sql.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/_sql.jsp?view=diff&rev=477664&r1=477663&r2=477664
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/_sql.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/_sql.jsp
Tue Nov 21 05:20:34 2006
@@ -14,6 +14,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 --%>
+
+<%-- $Rev$ $Date$ --%>
+
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
@@ -21,7 +24,9 @@
       <script language="JavaScript">
         var <portlet:namespace/>requiredFieldsCommon = new Array('option-userSelect',
'option-groupSelect');
         var <portlet:namespace/>requiredFieldsJDBC = new Array('option-jdbcDriver',
'jar', 'option-jdbcURL', 'option-jdbcUser', 'option-jdbcPassword');
+        var <portlet:namespace/>passwordFieldsJDBC = new Array('option-jdbcPassword');
         function <portlet:namespace/>changeRequiredFields(par) {
+          <portlet:namespace/>passwordFields = <portlet:namespace/>passwordFieldsJDBC;
           if(par.value != '') // Database pool is selected
             <portlet:namespace/>requiredFields = <portlet:namespace/>requiredFieldsCommon;
           else
@@ -135,6 +140,11 @@
       <tr>
         <th><div align="right">JDBC Password</div></th>
         <td><input name="option-jdbcPassword" type="password"
+                   size="20" value="${realm.options['jdbcPassword']}"></td>
+      </tr>
+      <tr>
+        <th><div align="right">Confirm Password</div></th>
+        <td><input name="confirm-option-jdbcPassword" type="password"
                    size="20" value="${realm.options['jdbcPassword']}"></td>
       </tr>
       <tr>

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/configure.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/configure.jsp?view=diff&rev=477664&r1=477663&r2=477664
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/configure.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/configure.jsp
Tue Nov 21 05:20:34 2006
@@ -14,6 +14,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 --%>
+
+<%-- $Rev$ $Date$ --%>
+
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
@@ -22,8 +25,15 @@
 <script language="JavaScript">
 var <portlet:namespace/>formName = "<portlet:namespace/>RealmForm";
 var <portlet:namespace/>requiredFields;
+var <portlet:namespace/>passwordFields;
 function <portlet:namespace/>validateForm(){
-    return textElementsNotEmpty(<portlet:namespace/>formName,<portlet:namespace/>requiredFields);
+    if(!textElementsNotEmpty(<portlet:namespace/>formName,<portlet:namespace/>requiredFields))
{
+        return false;
+    }
+    if(!passwordElementsConfirm(<portlet:namespace/>formName, <portlet:namespace/>passwordFields))
{
+        return false;
+    }
+    return true;
 }
 </script>
 
@@ -84,6 +94,7 @@
   <c:otherwise>
     <script language="JavaScript">
       <portlet:namespace/>requiredFields = new Array();
+      <portlet:namespace/>passwordFields = new Array();
     </script>
     <c:forEach var="option" items="${realm.optionNames}">
       <tr>
@@ -92,6 +103,16 @@
                    type="<c:choose><c:when test="${optionMap[option].password}">password</c:when><c:otherwise>text</c:otherwise></c:choose>"
                    size="${optionMap[option].length}" value="${realm.options[option]}"></td>
       </tr>
+    <c:if test="${optionMap[option].password}">
+      <tr>
+        <th style="min-width: 140px"><div align="right">Confirm password:</div></th>
+        <td><input name="confirm-option-${option}" type="password"
+                   size="${optionMap[option].length}" value="${realm.options[option]}"></td>
+      </tr>
+      <script language="JavaScript">
+          <portlet:namespace/>passwordFields = <portlet:namespace/>passwordFields.concat(new
Array('option-${option}'))
+      </script>
+    </c:if>
       <tr>
         <td></td>
         <td>${optionMap[option].description}</td>

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp?view=diff&rev=477664&r1=477663&r2=477664
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
Tue Nov 21 05:20:34 2006
@@ -14,6 +14,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 --%>
+
+<%-- $Rev$ $Date$ --%>
+
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
 <portlet:defineObjects/>
@@ -22,6 +25,7 @@
 var <portlet:namespace/>formName = "<portlet:namespace/>HttpsForm";
 var <portlet:namespace/>requiredFields = new Array("host");
 var <portlet:namespace/>numericFields = new Array("port", "maxThreads");
+var <portlet:namespace/>passwordFields = new Array();
 function <portlet:namespace/>validateForm(){
     if(!textElementsNotEmpty(<portlet:namespace/>formName, <portlet:namespace/>requiredFields))
{
         return false;
@@ -31,6 +35,9 @@
             return false;
         }
     }
+    if(!passwordElementsConfirm(<portlet:namespace/>formName, <portlet:namespace/>passwordFields))
{
+        return false;
+    }
     return true;
 }
 </script>
@@ -191,6 +198,12 @@
 	</td>
   </tr>
   <tr>
+    <td><div align="right">Confirm Password: </div></td>
+    <td>
+      <input name="confirm-keystorePassword" type="password" size="10">
+    </td>
+  </tr>
+  <tr>
     <td><div align="right"></div></td>
     <td><c:choose><c:when test="${mode eq 'save'}">Change</c:when><c:otherwise>Set</c:otherwise></c:choose>
       the password used to access the keystore file.<c:if test="${server ne 'jetty'}">
 This is also the
@@ -203,6 +216,9 @@
       <portlet:namespace/>requiredFields = <portlet:namespace/>requiredFields.concat(new
Array("keystorePassword"));
     </script>
   </c:if>
+    <script language="JavaScript">
+      <portlet:namespace/>passwordFields = <portlet:namespace/>passwordFields.concat(new
Array("keystorePassword"));
+    </script>
 
     <!-- Keystore Type Field -->
       <tr>
@@ -240,11 +256,20 @@
     </td>
   </tr>
   <tr>
+    <td><div align="right">Confirm Password: </div></td>
+    <td>
+      <input name="confirm-truststorePassword" type="password" size="10">
+    </td>
+  </tr>
+  <tr>
     <td><div align="right"></div></td>
     <td><c:choose><c:when test="${mode eq 'save'}">Change</c:when><c:otherwise>Set</c:otherwise></c:choose>
       the password used to verify the truststore file.<c:if test="${mode eq 'save'}">
 Leave
       this empty if you don't want to change the current password.</c:if></td>
   </tr>
+    <script language="JavaScript">
+      <portlet:namespace/>passwordFields = <portlet:namespace/>passwordFields.concat(new
Array("truststorePassword"));
+    </script>
 
 <!-- Truststore Type Field -->
   <tr>



Mime
View raw message