summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2012-11-14 22:50:12 +0100
committerINOPIAE <inopiae@cacert.org>2012-11-14 22:50:12 +0100
commite6dee64e0f3b03060c6c0443b9bba090061db54e (patch)
tree5dfe7b1e74ae7c132d062c70a18f71f50866c488
parent3ecae0b73b5a750e7853838b3bded110011536e5 (diff)
downloadcacert-devel-e6dee64e0f3b03060c6c0443b9bba090061db54e.tar.gz
cacert-devel-e6dee64e0f3b03060c6c0443b9bba090061db54e.tar.xz
cacert-devel-e6dee64e0f3b03060c6c0443b9bba090061db54e.zip
Bug 782: fixed layout, change of comment not yet realised in overview 5.php
-rw-r--r--includes/account.php10
-rw-r--r--pages/account/3.php36
-rw-r--r--pages/account/5.php26
3 files changed, 40 insertions, 32 deletions
diff --git a/includes/account.php b/includes/account.php
index 2f57bf9..249a6b9 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -239,7 +239,7 @@
$_REQUEST['keytype'] = "MS";
$csr = clean_csr($_REQUEST['optionalCSR']);
}
- if(trim($_REQUEST['description']) == ""){
+ if(trim($_REQUEST['description']) != ""){
$_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
}else{
$_SESSION['_config']['description']= "";
@@ -660,7 +660,7 @@
exit;
}
- if(trim($_REQUEST['description']) == ""){
+ if(trim($_REQUEST['description']) != ""){
$_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
}else{
$_SESSION['_config']['description']= "";
@@ -1390,7 +1390,7 @@
$_SESSION['_config']['OU'] = mysql_real_escape_string(stripslashes(trim($_REQUEST['OU'])));
- if(trim($_REQUEST['description']) == ""){
+ if(trim($_REQUEST['description']) != ""){
$_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
}else{
$_SESSION['_config']['description']= "";
@@ -1424,7 +1424,7 @@
if($_SESSION['_config']['rootcert'] < 1 || $_SESSION['_config']['rootcert'] > 2)
$_SESSION['_config']['rootcert'] = 1;
- if(trim($_REQUEST['description']) == ""){
+ if(trim($_REQUEST['description']) != ""){
$_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
}else{
$_SESSION['_config']['description']= "";
@@ -1766,7 +1766,7 @@
exit;
}
- if(trim($_REQUEST['description']) == ""){
+ if(trim($_REQUEST['description']) != ""){
$_SESSION['_config']['description']= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
}else{
$_SESSION['_config']['description']= "";
diff --git a/pages/account/3.php b/pages/account/3.php
index b2e3184..2726952 100644
--- a/pages/account/3.php
+++ b/pages/account/3.php
@@ -52,35 +52,28 @@ if($_SESSION['profile']['points'] >= 50)
$lname = $_SESSION['profile']['lname'];
$suffix = $_SESSION['profile']['suffix'];
?>
- <tr>
- <td class="DataTD" colspan="2" align="left">
- <?=_("Optional comment, only used in the certifictate overview")?><br>
- <input type="text" name="description" maxlength="80" size=80>
- </td>
- </tr>
- <tr>
<td class="DataTD" colspan="2" align="left">
- <input type="radio" name="rootcert" value="1" checked> <?=_("Sign by class 1 root certificate")?><br>
- <input type="radio" name="rootcert" value="2"> <?=_("Sign by class 3 root certificate")?><br>
- <?=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"), 125))?>
+ <input type="radio" name="rootcert" value="1" checked> <?=_("Sign by class 1 root certificate")?><br>
+ <input type="radio" name="rootcert" value="2"> <?=_("Sign by class 3 root certificate")?><br>
+ <?=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"), 125))?>
</td>
</tr>
<tr>
<td class="DataTD" colspan="2" align="left">
- <input type="radio" name="incname" value="0" checked> <?=_("No Name")?><br>
-<? if($fname && $lname) { ?><input type="radio" name="incname" value="1"> <?=_("Include")?> '<?=$fname." ".$lname?>'<br><? } ?>
-<? if($fname && $mname && $lname) { ?><input type="radio" name="incname" value="2"> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname?>'<br><? } ?>
-<? if($fname && $lname && $suffix) { ?><input type="radio" name="incname" value="3"> <?=_("Include")?> '<?=$fname." ".$lname." ".$suffix?>'<br><? } ?>
-<? if($fname && $mname && $lname && $suffix) { ?><input type="radio" name="incname" value="4"> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname." ".$suffix?>'<br><? } ?>
+ <input type="radio" name="incname" value="0" checked> <?=_("No Name")?><br>
+ <? if($fname && $lname) { ?><input type="radio" name="incname" value="1"> <?=_("Include")?> '<?=$fname." ".$lname?>'<br><? } ?>
+ <? if($fname && $mname && $lname) { ?><input type="radio" name="incname" value="2"> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname?>'<br><? } ?>
+ <? if($fname && $lname && $suffix) { ?><input type="radio" name="incname" value="3"> <?=_("Include")?> '<?=$fname." ".$lname." ".$suffix?>'<br><? } ?>
+ <? if($fname && $mname && $lname && $suffix) { ?><input type="radio" name="incname" value="4"> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname." ".$suffix?>'<br><? } ?>
</td>
</tr>
<? } ?>
<? if($_SESSION['profile']['points'] >= 100 && $_SESSION['profile']['codesign'] > 0) { ?>
<tr>
<td class="DataTD" align="left">
- <input type="checkbox" name="codesign" value="1"> <?=_("Code Signing")?></td>
+ <input type="checkbox" name="codesign" value="1"> <?=_("Code Signing")?></td>
<td class="DataTD" align="left">
- <?=_("Please Note: By ticking this box you will automatically have your name included in any certificates.")?>
+ <?=_("Please Note: By ticking this box you will automatically have your name included in any certificates.")?>
</td>
</tr>
<? } ?>
@@ -91,7 +84,12 @@ if($_SESSION['profile']['points'] >= 50)
<?=_("By allowing certificate login, this certificate can be used to login into this account at https://secure.cacert.org/ .")?><br/>
</td>
</tr>
-
+ <tr>
+ <td class="DataTD" colspan="2" align="left">
+ <?=_("Optional comment, only used in the certifictate overview")?><br>
+ <input type="text" name="description" maxlength="100" size=100>
+ </td>
+ </tr>
<tr name="expertoff" style="display:none">
<td class="DataTD" colspan="2" align="left">
@@ -107,6 +105,8 @@ if($_SESSION['profile']['points'] >= 50)
<a href="http://wiki.cacert.org/wiki/SSO"><?=_("SSO WIKI Entry")?></a>
</td>
</tr>
+
+
<tr name="expert">
<td class="DataTD" colspan="2"><?=_("Optional Client CSR, no information on the certificate will be used")?></td>
</tr>
diff --git a/pages/account/5.php b/pages/account/5.php
index 539f237..52266ec 100644
--- a/pages/account/5.php
+++ b/pages/account/5.php
@@ -19,18 +19,17 @@
<form method="post" action="account.php">
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
- <td colspan="7" class="title"><?=_("Client Certificates")?> - <a href="account.php?id=5&amp;viewall=<?=!$viewall?>"><?=_("View all certificates")?></a></td>
+ <td colspan="9" class="title"><?=_("Client Certificates")?> - <a href="account.php?id=5&amp;viewall=<?=!$viewall?>"><?=_("View all certificates")?></a></td>
</tr>
<tr>
<td class="DataTD"><?=_("Renew/Revoke/Delete")?></td>
<td class="DataTD"><?=_("Status")?></td>
<td class="DataTD"><?=_("Email Address")?></td>
- <td class="DataTD"><?=_("SerialNumber")?></td>
- <td class="DataTD"><?=_("Comment")?></td>
+ <td class="DataTD"><?=_("SerialNumber")?></td>
<td class="DataTD"><?=_("Revoked")?></td>
<td class="DataTD"><?=_("Expires")?></td>
<td class="DataTD"><?=_("Login")?></td>
-
+ <td colspan="2" class="DataTD"><?=_("Comment *")?></td>
<?
$query = "select UNIX_TIMESTAMP(`emailcerts`.`created`) as `created`,
UNIX_TIMESTAMP(`emailcerts`.`expire`) - UNIX_TIMESTAMP() as `timeleft`,
@@ -58,7 +57,7 @@
{
?>
<tr>
- <td colspan="7" class="DataTD"><?=_("No client certificates are currently listed.")?></td>
+ <td colspan="9" class="DataTD"><?=_("No client certificates are currently listed.")?></td>
</tr>
<? } else {
while($row = mysql_fetch_assoc($res))
@@ -88,23 +87,32 @@
<td class="DataTD"><?=$verified?></td>
<td class="DataTD"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></td>
<? } ?>
- <td class="DataTD"><?=$row['serial']?></td>
- <td class="DataTD"><?=$row['description']?></td>
+ <td class="DataTD"><?=$row['serial']?></td>
<td class="DataTD"><?=$row['revoke']?></td>
<td class="DataTD"><?=$row['expires']?></td>
<td class="DataTD">
<input type="checkbox" name="disablelogin_<?=$row['id']?>" value="1" <?=$row['disablelogin']?"":"checked='checked'"?>/>
<input type="hidden" name="cert_<?=$row['id']?>" value="1"/>
</td>
+ <td class="DataTD"><textarea name="description[]" cols="80" rows="5"></textarea><?=$row['description']?></textarea></td>
+ <td class="DataTD">
+ <input type="submit" name="descriptionsave_<?=$row['id']?>" value="<?=_("Save comment")?>">
+ </td>
</tr>
-<? } ?>
+ <? } ?>
<tr>
- <td class="DataTD" colspan="8">
+ <td class="DataTD" colspan="9">
<a href="account.php?id=5&amp;viewall=<?=!$viewall?>"><b><?=$viewall?_("Hide old certificates"):_("View all certificates")?></b></a>
</td>
</tr>
<tr>
+ <td class="DataTD" colspan="9">
+ <?=_("* Comment optional with max length of 100 characters. The comment is NOT included in the certificate as it is inteded for your personal reference only.. Save each comment seperately.")?>
+ </td>
+ </tr>
+
+ <tr>
<td class="DataTD" colspan="5"><input type="submit" name="renew" value="<?=_("Renew")?>">&#160;&#160;&#160;&#160;
<input type="submit" name="revoke" value="<?=_("Revoke/Delete")?>"></td>