\n";
echo "\n";
- // add/delete buttons
- echo (" type . "\" type=\"submit\" name=\"new\" value=\"" . $this->labels['newEntry'] . "\">\n");
- if (!$createOnly) {
- echo (" type . "\" type=\"submit\" name=\"del\" value=\"" . $this->labels['deleteEntry'] . "\">\n");
+ if (checkIfWriteAccessIsAllowed()) {
+ // add/delete buttons
+ echo (" type . "\" type=\"submit\" name=\"new\" value=\"" . $this->labels['newEntry'] . "\">\n");
+ if (!$createOnly) {
+ echo (" type . "\" type=\"submit\" name=\"del\" value=\"" . $this->labels['deleteEntry'] . "\">\n");
+ }
+ echo " ";
}
- echo " ";
$this->listShowOUSelection();
echo " \n";
echo "\n";
diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc
index 794fe6b3..1ef80329 100644
--- a/lam/lib/modules.inc
+++ b/lam/lib/modules.inc
@@ -961,6 +961,43 @@ class accountContainer {
return;
}
}
+ if (checkIfWriteAccessIsAllowed()) {
+ $this->printCommonControls();
+ }
+ echo " \n";
+ // create module menu
+ echo "type."list\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
+ echo "type."list\" valign=\"top\">";
+ // tab menu
+ $this->printModuleTabs();
+ echo " \n";
+ // content header
+ echo "type . "list\">\n";
+ echo "\n";
+ $this->printContentHeader();
+ echo " \n";
+ echo " \n";
+ echo "type . "list\">\n";
+ // content area
+ echo "";
+ // display html-code from modules
+ $return = array();
+
+ $return = call_user_func(array($this->module[$this->order[$this->current_page]], 'display_html_'.$this->subpage));
+
+ $y = 5000;
+ $z = 10000;
+ parseHtml($this->order[$this->current_page], $return, array(), false, $y, $z, $this->type);
+ // Display rest of html-page
+ echo " *" . _('required');
+ echo "
\n";
+ $this->printPageFooter();
+ }
+
+ /**
+ * Prints common controls like the save button and the ou selection.
+ */
+ private function printCommonControls() {
echo "type."list\" style=\"border-width:0px;\" width=\"100%\">";
echo "";
// save button
@@ -990,35 +1027,7 @@ class accountContainer {
echo "\n";
}
echo " ";
- echo "
";
- echo " \n";
- // create module menu
- echo "type."list\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
- echo "type."list\" valign=\"top\">";
- // tab menu
- $this->printModuleTabs();
- echo " \n";
- // content header
- echo "type . "list\">\n";
- echo "\n";
- $this->printContentHeader();
- echo " \n";
- echo " \n";
- echo "type . "list\">\n";
- // content area
- echo "";
- // display html-code from modules
- $return = array();
-
- $return = call_user_func(array($this->module[$this->order[$this->current_page]], 'display_html_'.$this->subpage));
-
- $y = 5000;
- $z = 10000;
- parseHtml($this->order[$this->current_page], $return, array(), false, $y, $z, $this->type);
- // Display rest of html-page
- echo " *" . _('required');
- echo "
\n";
- $this->printPageFooter();
+ echo "