index 5ad7640e26107bb01e30b24ef877e4fd408d8ec0..729d9d5c15e4b348d9e1f87f87770dced9a624db 100644 (file)
}
/* Enter edit mode? */
- if (isset($_POST['edit'])){
+ if ((isset($_POST['edit'])) && (!isset( $_SESSION['edit']))){
/* Check locking */
if (($username= get_lock($ui->dn)) != ""){
}
$info = "";
+
/* Show page footer depending on the mode */
if (!$user->cert_dialog && !$user->picture_dialog && $user->is_account){
$display.= "<p class=\"plugbottom\">";
$info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/openlock.png').
"\"> ".$ui->dn." ";
}
- if ($fn == "edit"){
- $info.= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png')."\"> ".
- _("Click the 'Edit' button below to change informations in this dialog");
- $display.= "<input type=submit name=\"$fn\" value=\"$str\">\n";
+
+ /* Only display edit button if there is at least one attribute editable */
+ if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/user"))){
+ if ($fn == "edit"){
+ $info.= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png')."\"> ".
+ _("Click the 'Edit' button below to change informations in this dialog");
+ $display.= "<input type=submit name=\"$fn\" value=\"$str\">\n";
+ }
}
+
$display.= "<input type=\"hidden\" name=\"ignore\">\n";
}
$display.= "</p>\n";