changed left menu.Don't use disabled buttons anymore

This commit is contained in:
katagia 2004-09-28 15:41:16 +00:00
parent 8ac15ce411
commit 565a5a2c9e
1 changed files with 12 additions and 34 deletions

View File

@ -459,8 +459,6 @@ class accountContainer {
if (!in_array($type, getAvailableScopes())) trigger_error(_('Account type not recognized.'), E_USER_ERROR); if (!in_array($type, getAvailableScopes())) trigger_error(_('Account type not recognized.'), E_USER_ERROR);
$this->type = $type; $this->type = $type;
$this->base = $base; $this->base = $base;
// Name of variables in session
$this->header2 = 'header';
// Set startpage // Set startpage
$this->current_page=0; $this->current_page=0;
$this->subpage='attributes'; $this->subpage='attributes';
@ -479,8 +477,6 @@ class accountContainer {
* of account. Current unix, group, host are supported * of account. Current unix, group, host are supported
*/ */
var $type; var $type;
// Localized part of HTML-Header
var $header2;
var $module; // This is an array with all module objects var $module; // This is an array with all module objects
// DN of the account // DN of the account
var $dn; var $dn;
@ -587,13 +583,13 @@ class accountContainer {
$this->subpage='attributes'; $this->subpage='attributes';
} }
else for ($i=1; $i<count($this->order); $i++ ) else for ($i=1; $i<count($this->order); $i++ )
if ($post['form_main_'.$this->order[$i]]) { if ($post['form_main_'.$this->order[$i]] && ($this->module[$this->order[$i]]->module_ready())) {
$this->current_page = $i; $this->current_page = $i;
$this->subpage='attributes'; $this->subpage='attributes';
} }
} }
// Write HTML-Code // Write HTML-Code
echo $_SESSION[$this->header2]; echo $_SESSION['header'];
echo "<title>"; echo "<title>";
if ($this->dn_orig!='') echo _("Modify Account"); if ($this->dn_orig!='') echo _("Modify Account");
else echo _("Create new Account"); else echo _("Create new Account");
@ -614,38 +610,20 @@ class accountContainer {
echo _('Please select page:'); echo _('Please select page:');
echo "</b></legend>\n"; echo "</b></legend>\n";
$x=0; $x=0;
if ($this->current_page==0) {
// print disabled button
echo "<input name=\"form_main_main\" type=\"submit\" value=\"";
echo _('Main');
echo "\" disabled tabindex=$x>\n<br>";
$x++;
}
else {
// print normal button // print normal button
echo "<input name=\"form_main_main\" type=\"submit\" value=\""; echo "<input name=\"form_main_main\" type=\"submit\" value=\"";
echo _('Main'); echo _('Main');
echo "\" tabindex=$x>\n<br>"; echo "\" tabindex=$x>\n<br>";
$x++; $x++;
}
// Loop for module // Loop for module
// $x is used to count up tabindex // $x is used to count up tabindex
for ($i=1; $i<count($this->order); $i++ ) { for ($i=1; $i<count($this->order); $i++ ) {
if ($this->order[$i]==$this->order[$this->current_page] || !$this->module[$this->order[$i]]->module_ready() ) {
// print disabled button
echo "<input name=\"form_main_".$this->order[$i]."\" type=\"submit\" value=\"";
echo $this->module[$this->order[$i]]->get_alias();
echo "\" disabled tabindex=$x>\n<br>";
$x++;
}
else {
// print normal button // print normal button
echo "<input name=\"form_main_".$this->order[$i]."\" type=\"submit\" value=\""; echo "<input name=\"form_main_".$this->order[$i]."\" type=\"submit\" value=\"";
echo $this->module[$this->order[$i]]->get_alias(); echo $this->module[$this->order[$i]]->get_alias();
echo "\" tabindex=$x>\n<br>"; echo "\" tabindex=$x>\n<br>";
$x++; $x++;
} }
}
if ($this->dn_orig!='') echo "<input name=\"form_main_reset\" type=\"submit\" value=\"" . _('Reset changes') . "\"><br>\n"; if ($this->dn_orig!='') echo "<input name=\"form_main_reset\" type=\"submit\" value=\"" . _('Reset changes') . "\"><br>\n";
echo "</fieldset></td></tr>\n"; echo "</fieldset></td></tr>\n";
echo "</table></td>\n<td>"; echo "</table></td>\n<td>";