]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/account/MailCertificateAdd.templ
Implement a Template-Foreach (and use in "new email certificate")
[gigi.git] / src / org / cacert / gigi / pages / account / MailCertificateAdd.templ
index 480696d2602bd31e02e6f6c4764ddfdfcecb40c7..6ce1b15b1597fe104570f4b62d3cc3f4300cfe09 100644 (file)
@@ -11,7 +11,7 @@
 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper dataTable">
   <thead>
   <tr>
-    <td colspan="2" class="title"><?=_New Client Certificate?></td>
+    <th colspan="2" class="title"><?=_New Client Certificate?></th>
   </tr>
   </thead>
   <tbody>
     <td><?=_Add?></td>
     <td><?=_Address?></td>
   </tr>
-<!-- For each mail -->
+<? foreach($emails) { ?>
   <tr>
-    <td><input type="checkbox" id="addid<=intval($row['id'])>" name="addid[]" value="<=intval($row['id'])>"></td>
-    <td align="left"><label for="addid<=intval($row['id'])>"><=sanitizeHTML($row['email'])></label></td>
+    <td><input type="checkbox" id="addid<?=$id?>" name="addid[]" value="<?=$id?>"></td>
+    <td align="left"><label for="addid<?=$id?>"><?=$value?></label></td>
   </tr>
-<!-- For each mail -->
-<!-- if points > 50 -->
+<? } ?>
+
+<? if($points50) { ?>
   <tr>
     <td colspan="2" align="left">
       <input type="radio" id="incname0" name="incname" value="0" checked="checked" />
@@ -34,6 +35,7 @@
         <label for="incname1"><?=_Include?> 'fnamelname'</label><br />
     </td>
   </tr>
+<? } ?>
 
   <tr>
     <td>
@@ -60,7 +62,7 @@
     </td>
   </tr>
 
-<!-- if >50 points -->
+<? if($points50) { ?>
   <tr class="expert">
     <td colspan="2" align="left">
       <input type="radio" id="root1" name="rootcert" value="1" /> <label for="root1"><?=_Sign by class 1 root certificate?></label><br />
@@ -68,7 +70,7 @@
       <?=_Please note: If you use a certificate signed by the class 3 root, the class 3 root certificate needs to be imported into your email program as well as the class 1 root certificate so your email program can build a full trust path chain.?>
     </td>
   </tr>
-<!-- if >50 points -->
+<? } ?>
 
   <tr class="expert">
     <td colspan="2" align="left">
@@ -77,7 +79,7 @@
     </td>
   </tr>
 
-<!-- if codesign -->
+<? if($codesign) { ?>
   <tr class="expert">
     <td>
       <input type="checkbox" id="codesign" name="codesign" value="1" />
@@ -87,7 +89,7 @@
       <?=_Please note: By ticking this box you will automatically have your name included in the certificate.?></label>
     </td>
   </tr>
-<!-- if codesign -->
+<? } ?>
 
   <tr class="expert">
     <td>