From d06e48f175f9b3e58c16ccdb5253dcb975ed9b39 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 25 Jan 2018 20:20:35 -0800 Subject: [PATCH] Use standard API to create HTML that is compatible with the new theme https://github.com/webmin/webmin/issues/784 --- cluster-software/edit_pack.cgi | 47 ++++++++++++++-------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/cluster-software/edit_pack.cgi b/cluster-software/edit_pack.cgi index f005c6eba..303c614de 100755 --- a/cluster-software/edit_pack.cgi +++ b/cluster-software/edit_pack.cgi @@ -52,43 +52,34 @@ print " $text{'edit_arch'} $pinfo[3]\n"; print "$text{'edit_inst'} $pinfo[6] \n"; print "

\n"; -print "\n"; +print &ui_buttons_start(); # Show button to list files, if possible +@opts = map { [ $_->{'id'}, + ($_->{'desc'} || $_->{'realhost'} || $_->{'host'}) ] } @got; if (!$pinfo[8]) { - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + $ssel = &ui_select("server", undef, \@opts); + print &ui_buttons_row("list_pack.cgi", + $text{'edit_list'}, + $text{'edit_listdesc'}, + &ui_hidden("package", $pinfo[0]). + &ui_hidden("search", $in{'search'}), + $ssel); } # Show button to un-install, if possible if (!$pinfo[7]) { - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + $ssel = &ui_select("server", undef, + [ [ -1, $text{'edit_all'} ], @opts ]); + print &ui_buttons_row("delete_pack.cgi", + $text{'edit_uninst'}, + $text{'edit_uninstdesc'}, + &ui_hidden("package", $pinfo[0]). + &ui_hidden("search", $in{'search'}), + $ssel); } -print "
\n"; - print "
\n"; - print "\n"; - print "

\n"; +print &ui_buttons_end(); # Show hosts with the package print &ui_hr();