Author: reto
Date: Mon Aug  9 17:16:04 2010
New Revision: 983742

URL: http://svn.apache.org/viewvc?rev=983742&view=rev
Log:
CLEREZZA-243: adding crmf field to form for gecko/xhtml

Modified:
    
incubator/clerezza/issues/CLEREZZA-243/org.apache.clerezza.platform.accountcontrolpanel/org.apache.clerezza.platform.accountcontrolpanel.core/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/profile-staticweb/scripts/profile.js

Modified: 
incubator/clerezza/issues/CLEREZZA-243/org.apache.clerezza.platform.accountcontrolpanel/org.apache.clerezza.platform.accountcontrolpanel.core/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/profile-staticweb/scripts/profile.js
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/issues/CLEREZZA-243/org.apache.clerezza.platform.accountcontrolpanel/org.apache.clerezza.platform.accountcontrolpanel.core/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/profile-staticweb/scripts/profile.js?rev=983742&r1=983741&r2=983742&view=diff
==============================================================================
--- 
incubator/clerezza/issues/CLEREZZA-243/org.apache.clerezza.platform.accountcontrolpanel/org.apache.clerezza.platform.accountcontrolpanel.core/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/profile-staticweb/scripts/profile.js
 (original)
+++ 
incubator/clerezza/issues/CLEREZZA-243/org.apache.clerezza.platform.accountcontrolpanel/org.apache.clerezza.platform.accountcontrolpanel.core/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/profile-staticweb/scripts/profile.js
 Mon Aug  9 17:16:04 2010
@@ -14,13 +14,12 @@ $(document).ready(function() {
 
 var crmfObject;
 function setCRMFRequest() {
-       var formContents = $("#keygenform").serialize();
-       var newContents = jQuery.extend({}, formContents);
-       newContents.crmf = crmfObject.request
-       $.post("profile/keygen",newContents,
-       function(data) {
-               alert("congrats");
-       });
+       var hiddenField = $("<input type=\"hidden\" name=\"crmf\" id=\"crmf\" 
\/>");
+       $("#keygenform").append(hiddenField)
+       //var formContents = $("#keygenform").serialize();
+       //var newContents = jQuery.extend({}, formContents);
+       hiddenField.val(crmfObject.request)
+       $("#keygenform").submit()
 }
 
 function spkacFix() {
@@ -28,9 +27,12 @@ function spkacFix() {
        if ($("#spkac").val()) {
                return true;
        } else {
-               alert("fix needed by firefox in xhtml mode")
+               if ($("#crmf").val()) {
+                       return true;
+               }
+               //alert("fix needed by firefox in xhtml mode")
                crmfObject = crypto.generateCRMFRequest(
-               'CN=Fred',
+               'CN=Ignored',
                "regToken", "authenticator", // not sure
                null, // base-64 cert for key
                // escrow. set this to null


Reply via email to