\n";
+
+print &ui_form_start("change_ui.cgi", "post");
+print &ui_table_start($text{'ui_header'}, undef, 2, [ "width=30%" ]);
+
for($i=0; $i<@webmin::cs_names; $i++) {
$cd = $webmin::cs_codes[$i];
- print " | $webmin::cs_names[$i] | \n";
- printf " %s\n",
- defined($uconfig{$cd}) ? "" : "checked",
- $webmin::text{'ui_default'};
- printf " %s\n",
- defined($gconfig{$cd}) ? "checked" : "",
- $webmin::text{'ui_rgb'};
- print "\n";
- print " | \n";
+ print &ui_table_row($webmin::cs_names[$i],
+ &ui_opt_textbox($cd, $uconfig{$cd}, 8, $webmin::text{'ui_default'},
+ $webmin::text{'ui_rgb'}));
}
-print " | $text{'ui_texttitles'} | \n";
-printf " %s\n",
- $uconfig{'texttitles'} ? 'checked' : '', $text{'yes'};
-printf " %s | \n",
- $uconfig{'texttitles'} ? '' : 'checked', $text{'no'};
+print &ui_table_row($webmin::text{'ui_texttitles'},
+ &ui_yesno_radio("texttitles", int($uconfig{'texttitles'})));
-print " | $text{'ui_sysinfo'} | \n";
-print " | \n";
+print &ui_table_row($webmin::text{'ui_sysinfo'},
+ &ui_select("sysinfo", int($uconfig{'sysinfo'}),
+ [ map { [ $_, $webmin::text{'ui_sysinfo'.$_} ] } (0, 1, 4, 2, 3) ]));
-print " | $text{'ui_nohost'} | \n";
-printf " %s\n",
- $uconfig{'nohostname'} ? '' : 'checked', $text{'yes'};
-printf " %s | \n",
- $uconfig{'nohostname'} ? 'checked' : '', $text{'no'};
+print &ui_table_row($text{'ui_hostnamemode'},
+ &ui_select("hostnamemode", int($uconfig{'hostnamemode'}),
+ [ map { [ $_, $text{'ui_hnm'.$_} ] } (0 .. 3) ]).
+ " ".&ui_textbox("hostnamedisplay", $uconfig{'hostnamedisplay'}, 20));
-print " | $text{'ui_hostnamemode'} | \n";
-print "\n";
-printf "\n",
- $uconfig{'hostnamedisplay'};
-print " | \n";
+print &ui_table_row($webmin::text{'ui_showlogin'},
+ &ui_yesno_radio("showlogin", int($uconfig{'showlogin'})));
-print " | $webmin::text{'ui_showlogin'} | \n";
-printf " %s\n",
- $uconfig{'showlogin'} ? 'checked' : '', $text{'yes'};
-printf " %s | \n",
- $uconfig{'showlogin'} ? '' : 'checked', $text{'no'};
+print &ui_table_row($webmin::text{'startpage_gotoone'},
+ &ui_yesno_radio("gotoone", int($uconfig{'gotoone'})));
-print " | $webmin::text{'startpage_gotoone'} | \n";
-printf " %s\n",
- $uconfig{'gotoone'} ? 'checked' : '', $text{'yes'};
-printf " %s | \n",
- $uconfig{'gotoone'} ? '' : 'checked', $text{'no'};
+@modules = &list_modules();
+print &ui_table_row($webmin::text{'startpage_gotomodule'},
+ &ui_select("gotomodule", $uconfig{'gotomodule'},
+ [ [ "", $webmin::text{'startpage_gotonone'} ],
+ map { [ $_->{'dir'}, $_->{'desc'} ] }
+ sort { $a->{'desc'} cmp $b->{'desc'} } @modules ]));
-print " | $webmin::text{'startpage_gotomodule'} | \n";
-print " | \n";
+print &ui_table_row($text{'ui_feedbackmode'},
+ &ui_radio('feedback_def',
+ $uconfig{'feedback'} ? 0 : 1,
+ [ [ 0, $text{'ui_feedbackyes'} . ' '
+ . &ui_textbox('feedback', $uconfig{'feedback'}) ]
+ , [ 1, $text{'no'} ] ]));
-print " | $text{'ui_feedbackmode'} | \n";
-printf " %s\n",
- $uconfig{'feedback'} ? "" : "checked", $text{'no'};
-printf " %s\n",
- $uconfig{'feedback'} ? "checked" : "", $text{'ui_feedbackyes'};
-printf " | \n",
- $uconfig{'feedback'};
-
-print " | $text{'ui_feedbackmail'} | \n";
-printf " %s\n",
- $uconfig{'feedbackmail'} ? "" : "checked",
- $text{'ui_feedbackmail1'};
-printf " %s\n",
- $uconfig{'feedbackmail'} ? "checked" : "",
- $text{'ui_feedbackmail0'};
-printf " | \n",
- $uconfig{'feedbackmail'};
+print &ui_table_row($text{'ui_feedbackmail'},
+ &ui_radio('feedbackmail_def',
+ $uconfig{'feedbackmail'} ? 0 : 1,
+ [ [ 1, $text{'ui_feedbackmail1'} ]
+ , [ 0, $text{'ui_feedbackmail0'} . ' '
+ . &ui_textbox('feedbackmail', $uconfig{'feedbackmail'}) ] ]));
print " | $text{'ui_feedbackhost'} | \n";
printf " %s\n",
@@ -110,20 +68,17 @@ printf "\n",
printf " | \n",
$uconfig{'feedbackhost'};
-print " | $text{'ui_tabs'} | \n";
-printf " %s\n",
- $uconfig{'notabs'} ? '' : 'checked', $text{'yes'};
-printf " %s | \n",
- $uconfig{'notabs'} ? 'checked' : '', $text{'no'};
+print &ui_table_row($text{'ui_tabs'},
+ &ui_radio("notabs", $uconfig{'notabs'} ? 1 : 0,
+ [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]));
-print " | $webmin::text{'ui_dateformat'} | \n";
-print &ui_select("dateformat", $uconfig{'dateformat'} || "dd/mon/yyyy",
- [ map { [ $_, $webmin::text{'ui_dateformat_'.$_} ] }
- @webmin::webmin_date_formats ]);
-print " | \n";
+print &ui_table_row($webmin::text{'ui_dateformat'},
+ &ui_select("dateformat", $uconfig{'dateformat'} || "dd/mon/yyyy",
+ [ map { [ $_, $text{'ui_dateformat_'.$_} ] }
+ @webmin::webmin_date_formats ]));
-print " |