module buttons now have the same width
This commit is contained in:
parent
0fa52a8dd7
commit
e77059d98f
|
@ -926,9 +926,15 @@ class accountContainer {
|
||||||
echo "<td><fieldset class=\"".$this->type."edit\"><legend><b>";
|
echo "<td><fieldset class=\"".$this->type."edit\"><legend><b>";
|
||||||
echo _('Please select page:');
|
echo _('Please select page:');
|
||||||
echo "</b></legend>\n";
|
echo "</b></legend>\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;
|
$x=0;
|
||||||
// print normal button
|
// print normal button
|
||||||
echo "<input name=\"form_main_main\" type=\"submit\" value=\"";
|
echo "<input style=\"width:" . $buttonWidth ."em;\" name=\"form_main_main\" type=\"submit\" value=\"";
|
||||||
echo _('Main');
|
echo _('Main');
|
||||||
echo "\" tabindex=$x";
|
echo "\" tabindex=$x";
|
||||||
if ($this->subpage == 'finish') echo " disabled";
|
if ($this->subpage == 'finish') echo " disabled";
|
||||||
|
@ -938,7 +944,7 @@ class accountContainer {
|
||||||
// $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++ ) {
|
||||||
// print normal button
|
// print normal button
|
||||||
echo "<input name=\"form_main_".$this->order[$i]."\" type=\"submit\" value=\"";
|
echo "<input style=\"width:" . $buttonWidth ."em;\" 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";
|
echo "\" tabindex=$x";
|
||||||
if ($this->subpage == 'finish') echo " disabled";
|
if ($this->subpage == 'finish') echo " disabled";
|
||||||
|
@ -946,7 +952,7 @@ class accountContainer {
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
if ($this->dn_orig!='') {
|
if ($this->dn_orig!='') {
|
||||||
echo "<input name=\"form_main_reset\" type=\"submit\" value=\"" . _('Reset changes') . "\"";
|
echo "<input style=\"width:" . $buttonWidth ."em;\" name=\"form_main_reset\" type=\"submit\" value=\"" . _('Reset changes') . "\"";
|
||||||
if ($this->subpage == 'finish') echo " disabled";
|
if ($this->subpage == 'finish') echo " disabled";
|
||||||
echo "><br>\n";
|
echo "><br>\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue