From 2f0bc80374f29f858cd39af862a7e848c3fb9f3b Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Wed, 15 Dec 2021 23:23:40 +0300 Subject: [PATCH] Fix Custom Commands module in accordance with Webmin --- commands/config.info | 1 - commands/config.info.ca | 1 - commands/config.info.nl | 1 - commands/index.cgi | 16 ++++++---------- commands/uconfig.info.no | 1 - 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/commands/config.info b/commands/config.info index 317fbbc6..b507eb9e 100644 --- a/commands/config.info +++ b/commands/config.info @@ -3,7 +3,6 @@ display_mode=Main page shows,1,0-All commands and parameters,1-Links to commands width=Width of file editor window,3,Default (80 chars) height=Height of file editor window,3,Default (20 chars) wrap=File editor wrap mode,1,-Default (Soft),hard-Hard,off-Off -columns=Columns to display commands in,1,2-2,1-1 sort=Sort commands by,1,desc-Command name,html-Description,-Command ordering access=Command access control list, formatted like
username: id1 id2
@groupname: id3 id4,9,0,0,\t line2=System configuration,11 diff --git a/commands/config.info.ca b/commands/config.info.ca index 6748c21f..e619098a 100755 --- a/commands/config.info.ca +++ b/commands/config.info.ca @@ -3,7 +3,6 @@ display_mode=La pàgina principal mostra,1,0-Totes les ordres i els seus paràme width=Amplada de la finestra de l'editor de fitxers,3,Per defecte (80 caràcters) height=Alçada de la finestra de l'editor de fitxers,3,Per defecte (20 caràcters) wrap=Mode de tall de l'editor de fitxers,1,-Per defecte (Soft),hard-Hard,off-Desactivat -columns=Columnes per mostrar-hi les ordres,1,2-2,1-1 sort=Ordena les ordres per,1,desc-Nom d'ordre,html-Descripció,-Ordenació d'ordres access=Llista de control d'accés a les ordres, formatada com
usuari: id1 id2i
@grup: id3 id4,9,0,0,\t line2=Configuració del sistema,11 diff --git a/commands/config.info.nl b/commands/config.info.nl index ede67856..fe64d33e 100755 --- a/commands/config.info.nl +++ b/commands/config.info.nl @@ -3,7 +3,6 @@ display_mode=Hoofd pagina laat zien,1,0-Alle opdrachten en parameters,1-Links na width=Breedte van de file bewerkings window,3,Standaard (80 karakters) height=Hoogte van de file bewerkings window,3,Standaard (20 karakters) wrap=File bewerking wrap mode,1,-Standaard (Zacht),hard-Hard,off-Uit -columns=Kolommen om de opdrachten in te laten zien,1,2-2,1-1 access=Opdrachten toegangs controle lijst,
in gebruikersnaam: id1 id2 formaat.,9,0,0,\t line2=Systeem configuratie,11 webmin_config=Webmin handmatige opdrachten config directory,0 diff --git a/commands/index.cgi b/commands/index.cgi index 64cbc8f4..769a462e 100755 --- a/commands/index.cgi +++ b/commands/index.cgi @@ -50,23 +50,19 @@ elsif ($config{'display_mode'} == 0) { } } $html .= &ui_hidden("id", $c->{'id'}); - $w = $config{'columns'} == 2 ? 2 : 4; - $html .= &ui_table_start(undef, undef, $w, + $html .= &ui_table_start(undef, undef, 2, $config{'columns'} == 1 ? [ "width=20%", "width=30%" ] : [ "width=30%" ]); - $html .= &ui_table_row(undef, &ui_submit($c->{'desc'}), $w, []); + $html .= &ui_table_row(undef, &ui_submit($c->{'desc'}), 2, []); if ($c->{'html'}) { $html .= &ui_table_row(undef, - &filter_javascript($c->{'html'}), $w, []); + &filter_javascript($c->{'html'}), 2, []); } foreach $a (@a) { $html .= &ui_table_row(&html_escape($a->{'desc'}), &show_parameter_input($a, $formno)); } - if (scalar(@a)%2 && $w == 4) { - # Hack to make spacing nicer - $html .= &ui_table_row(" ", " "); - } + $links = ''; if ($access{'edit'}) { if ($c->{'edit'}) { $link = "$text{'index_fedit'}"; @@ -77,9 +73,9 @@ elsif ($config{'display_mode'} == 0) { else { $link = "$text{'index_edit'}"; } - $html .= &ui_table_row(undef, - &ui_links_row([ $link ]), $w); + $links = &ui_links_row([ $link ]); } + $html .= &ui_table_row(undef, $links, 2); $html .= &ui_table_end(); $html .= &ui_form_end(); push(@grid, $html); diff --git a/commands/uconfig.info.no b/commands/uconfig.info.no index 064013d5..f3694382 100644 --- a/commands/uconfig.info.no +++ b/commands/uconfig.info.no @@ -3,7 +3,6 @@ display_mode=Hovedsiden viser,1,0-Alle kommandoer og parametere,1-Lenker til kom width=Bredde på fileditor vindu,3,Standard (80 tegn) height=Høyde på fileditor vindu,3,Standard (20 tegn) wrap=Fileditor delingsmodus,1,-Standard (Myk),hard-Hard,off-Av -columns=Kolonner kommandoer skal vises i,1,2-2,1-1 sort=Sorter kommandoer etter,1,desc-Kommandonavn,html-Beskrivelse,-Kommandosortering access=Kommando tilgangskontrolliste, formattert som
brukernavn: id1 id2
@gruppenavn: id3 id4,9,0,0,\t line2=Systemkonfigurasjon,11