From e77059d98f4daa94ae493f4585fb13eaaed33598 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 24 Aug 2005 17:53:03 +0000 Subject: [PATCH] module buttons now have the same width --- lam/lib/modules.inc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 47fc4b58..25817f55 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -926,9 +926,15 @@ class accountContainer { echo "
type."edit\">"; echo _('Please select page:'); echo "\n"; + // calculate button width + $buttonWidth = round(0.8 * strlen(utf8_decode(_("Reset changes")))); + for ($b = 0; $b < sizeof($this->order); $b++) { + $tempWidth = round(0.8 * strlen(utf8_decode($this->order[$b]))); + if ($buttonWidth < $tempWidth) $buttonWidth = $tempWidth; + } $x=0; // print normal button - echo "subpage == 'finish') echo " disabled"; @@ -938,7 +944,7 @@ class accountContainer { // $x is used to count up tabindex for ($i=1; $iorder); $i++ ) { // print normal button - echo "order[$i]."\" type=\"submit\" value=\""; + echo "order[$i]."\" type=\"submit\" value=\""; echo $this->module[$this->order[$i]]->get_alias(); echo "\" tabindex=$x"; if ($this->subpage == 'finish') echo " disabled"; @@ -946,7 +952,7 @@ class accountContainer { $x++; } if ($this->dn_orig!='') { - echo "subpage == 'finish') echo " disabled"; echo ">
\n"; }