bug 807: Some more markup changes
[cacert-devel.git] / pages / account / 16.php
1 <? /*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 include_once("../includes/shutdown.php");
19 ?>
20 <form method="post" action="account.php">
21 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
22 <tr>
23 <td colspan="2" class="title"><?=_("New Client Certificate")?></td>
24 </tr>
25 <tr>
26 <td class="DataTD"><?=_("Add")?></td>
27 <td class="DataTD"><?=_("Address")?></td>
28 <?
29 if (array_key_exists('emails',$_SESSION['_config']) && is_array($_SESSION['_config']['emails'])) {
30 $i = 1;
31 foreach($_SESSION['_config']['emails'] as $val) {
32 ?>
33 <tr>
34 <td class="DataTD"><label for="email<?=$i?>"><?=_("Email")?></label></td>
35 <td class="DataTD"><input type="text" id="email<?=$i?>" name="emails[]" value="<?=$val?>"/></td>
36 </tr>
37 <?
38 $i++;
39 }
40 } ?>
41 <tr>
42 <td class="DataTD"><label for="email0"><?=_("Email")?></td>
43 <td class="DataTD"><input type="text" id="email0" name="emails[]"/></td>
44 </tr>
45 <tr>
46 <td class="DataTD"><label for="name"><?=_("Name")?></label></td>
47 <td class="DataTD"><input type="text" id="name" name="name" value="<?=array_key_exists('name',$_SESSION['_config'])?($_SESSION['_config']['name']):''?>"/></td>
48 </tr>
49 <tr>
50 <td class="DataTD"><label for="OU"><?=_("Department")?></label></td>
51 <td class="DataTD"><input type="text" id="OU" name="OU" value="<?=array_key_exists('OU',$_SESSION['_config'])?($_SESSION['_config']['OU']):''?>"/></td>
52 </tr>
53
54 <tr name="expertoff" style="display:none">
55 <td class="DataTD">
56 <input type="checkbox" id="expertbox" name="expertbox" onchange="showExpert(this.checked)" />
57 </td>
58 <td class="DataTD">
59 <label for="expertbox"><?=_("Show advanced options")?></label>
60 </td>
61 </tr>
62 <tr name="expert">
63 <td class="DataTD" colspan="2" align="left">
64 <input type="radio" id="root1" name="rootcert" value="1" checked="checked" /> <label for="root1"><?=_("Sign by class 1 root certificate")?></label><br />
65 <input type="radio" id="root2" name="rootcert" value="2" /> <label for="root2"><?=_("Sign by class 3 root certificate")?></label><br />
66 <?=str_replace("\n", "<br>\n", wordwrap(_("Please note: 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. Until we are included in browsers this might not be a desirable option for most people"), 60))?>
67 </td>
68 </tr>
69 <? if($_SESSION['profile']['codesign'] && $_SESSION['profile']['points'] >= 100) { ?>
70 <tr name="expert">
71 <td class="DataTD" colspan="2" align="left">
72 <input type="checkbox" id="codesign" name="codesign" value="1" />
73 <label for="codesign"><?=_("Code Signing")?></label>
74 </td>
75 </tr>
76 <? } ?>
77 <tr>
78 <td class="DataTD" colspan="2" align="left">
79 <label for="description"><?=_("Optional comment, only used in the certificate overview")?></label><br />
80 <input type="text" id="description" name="description" maxlength="80" size="80" />
81 </td>
82 </tr>
83 <tr>
84 <td class="DataTD" colspan="2">
85 <input type="submit" name="add_email" value="<?=_("Add Another Email Address")?>">
86 <input type="submit" name="process" value="<?=_("Next")?>" />
87 </td>
88 </tr>
89 </table>
90 <input type="hidden" name="oldid" value="<?=$id?>">
91 </form>
92
93 <script language="javascript">
94 function showExpert(a)
95 {
96 b=document.getElementsByName("expert");
97 for(i=0;b.length>i;i++)
98 {
99 if(!a) {b[i].setAttribute("style","display:none"); }
100 else {b[i].removeAttribute("style");}
101 }
102 b=document.getElementsByName("expertoff");
103 for(i=0;b.length>i;i++)
104 {
105 b[i].removeAttribute("style");
106 }
107
108 }
109 showExpert(false);
110 </script>