]> WPIA git - gigi.git/commitdiff
Use "Profile" in issue-certificate-form.
authorFelix Dörre <felix@dogcraft.de>
Sun, 3 Aug 2014 17:13:37 +0000 (19:13 +0200)
committerFelix Dörre <felix@dogcraft.de>
Sun, 3 Aug 2014 17:13:37 +0000 (19:13 +0200)
src/org/cacert/gigi/pages/account/CertificateIssueForm.java
src/org/cacert/gigi/pages/account/CertificateIssueForm.templ

index 82abb21aeb940ad5cfddd8935a597cab98cc7676..847aac88caeac6bae89fd09d2d79adabeb28a2be 100644 (file)
@@ -116,8 +116,10 @@ public class CertificateIssueForm extends Form {
                         outputError(out, req, "You need to accept the CCA.");
                         return false;
                     }
+                    CertificateProfile profile = CertificateProfile.getByName(req.getParameter("profile"));
+
                     System.out.println("issuing " + selectedDigest);
-                    result = new Certificate(LoginPage.getUser(req).getId(), "/commonName=CAcert WoT User", selectedDigest.toString(), this.csr, this.csrType, CertificateProfile.getById(1));
+                    result = new Certificate(LoginPage.getUser(req).getId(), "/commonName=CAcert WoT User", selectedDigest.toString(), this.csr, this.csrType, profile);
                     result.issue().waitFor(60000);
                     return true;
                 }
index 64e1c58d24f0c9ed5cfd5c985b2ff15d917d4987..55eb1219f0360dd1b5f612f8cb3ede2212e04676 100644 (file)
   </tr>
   </thead>
   <tbody>
+  <tr>
+    <td>
+    </td>
+    <td>
+    <?=_Key type?>: 
+    <select name="profile">
+    <? foreach($profiles) { ?>
+      <option value="<?=$key?>"><?=$name?></option>
+    <? } ?>
+    </select>
+    </td>
+  </tr>
   <tr>
     <td><?=_Add?></td>
     <td><?=_Address?></td>
       <label for="expertbox"><?=_Show advanced options?></label>
     </td>
   </tr>
-  <tr>
-    <td>
-    </td>
-    <td>
-    <select name="profile">
-    <? foreach($profiles) { ?>
-      <option value="<?=$key?>"><?=$name?></option>
-    <? } ?>
-    </select>
-    </td>
-  </tr>
-
 
   <tr class="expert">
     <td colspan="2" align="left">