diff --git a/samba/edit_fmisc.cgi b/samba/edit_fmisc.cgi index e8b719605..b95b7ab7a 100755 --- a/samba/edit_fmisc.cgi +++ b/samba/edit_fmisc.cgi @@ -22,7 +22,7 @@ else { print &ui_form_start("save_fmisc.cgi", "post"); print &ui_hidden("old_name", $s); -print &ui_table_start($text{'misc_title'}, undef, 4); +print &ui_table_start($text{'misc_title'}, undef, 2); print &ui_table_row($text{'fmisc_lockfile'}, &yesno_input("locking")); diff --git a/samba/edit_fname.cgi b/samba/edit_fname.cgi index 93a4e037e..ac84e16af 100755 --- a/samba/edit_fname.cgi +++ b/samba/edit_fname.cgi @@ -22,7 +22,7 @@ else { print &ui_form_start("save_fname.cgi", "post"); print &ui_hidden("old_name", $s); -print &ui_table_start($text{'fname_option'}, undef, 4); +print &ui_table_start($text{'fname_option'}, undef, 2); print &ui_table_row($text{'fname_manglecase'}, &yesno_input("mangle case")); diff --git a/samba/edit_popts.cgi b/samba/edit_popts.cgi index 31c8fe938..a59dfc66a 100755 --- a/samba/edit_popts.cgi +++ b/samba/edit_popts.cgi @@ -19,79 +19,47 @@ else { } &get_share($s); -print "
\n"; -print "\n"; +print &ui_form_start("save_popts.cgi", "post"); +print &ui_hidden("old_name", $s); +print &ui_table_start($text{'print_option'}, undef, 2); -# Printer options -print "\n"; -print "\n"; -print "
$text{'print_option'}
\n"; +print &ui_table_row($text{'print_minspace'}, + &ui_textbox("min_print_space", &getval("min print space"), 6)." kB"); -print "\n"; -printf "\n", - &getval("min print space"); +print &ui_table_row($text{'print_postscript'}, + &yesno_input("postscript")); -print "\n"; -print "\n"; +print &ui_table_row($text{'print_command'}, + &ui_opt_textbox("print_command", &getval("print command"), 40, + $text{'default'})); -print "\n"; -printf "\n", - &getval("print command"); +print &ui_table_row($text{'print_queue'}, + &ui_opt_textbox("lpq_command", &getval("lpq command"), 40, + $text{'default'})); -print "\n"; -printf "\n", - &getval("lpq command"); +print &ui_table_row($text{'print_delete'}, + &ui_opt_textbox("lprm_command", &getval("lprm command"), 40, + $text{'default'})); -print "\n"; -printf "\n", - &getval("lprm command"); +print &ui_table_row($text{'print_pause'}, + &ui_opt_textbox("lppause_command", &getval("lppause command"), 40, + $text{'default'})); -print "\n"; -printf "\n", - &getval("lppause command"); +print &ui_table_row($text{'print_unresume'}, + &ui_opt_textbox("lpresume_command", &getval("lpresume command"), 40, + $text{'default'})); -print "\n"; -printf "\n", - &getval("lpresume command"); +print &ui_table_row($text{'print_driver'}, + &ui_opt_textbox("printer_driver", &getval("printer driver"), 40, + $text{'config_none'})); -print "\n"; -print "\n", - &getval("printer driver"); - -print "
$text{'print_minspace'}$text{'print_postscript'}",&yesno_input("postscript"),"
$text{'print_command'}\n"; -printf " $text{'default'}\n", - &getval("print command") eq "" ? "checked" : ""; -printf "  \n", - &getval("print command") ne "" ? "checked" : ""; -printf "
$text{'print_queue'}\n"; -printf " $text{'default'}\n", - &getval("lpq command") eq "" ? "checked" : ""; -printf "  \n", - &getval("lpq command") ne "" ? "checked" : ""; -printf "
$text{'print_delete'}\n"; -printf " $text{'default'}\n", - &getval("lprm command") eq "" ? "checked" : ""; -printf "  \n", - &getval("lprm command") ne "" ? "checked" : ""; -printf "
$text{'print_pause'}\n"; -printf " $text{'config_none'}\n", - &getval("lppause command") eq "" ? "checked" : ""; -printf "  \n", - &getval("lppause command") ne "" ? "checked" : ""; -printf "
$text{'print_unresume'}\n"; -printf " $text{'config_none'}\n", - &getval("lpresume command") eq "" ? "checked" : ""; -printf "  \n", - &getval("lpresume command") ne "" ? "checked" : ""; -printf "
$text{'print_driver'}\n"; -printf " $text{'config_none'}\n", - &getval("printer driver") eq "" ? "checked" : ""; -printf "  \n", - &getval("printer driver") ne "" ? "checked" : ""; -printf "

\n"; -print "" - if &can('wO', \%access, $in{'share'}); -print "

\n"; +print &ui_table_end(); +if (&can('wO', \%access, $in{'share'})) { + print &ui_form_end([ [ undef, $text{'save'} ] ]); + } +else { + print &ui_form_end(); + } &ui_print_footer("edit_pshare.cgi?share=".&urlize($s), $text{'index_printershare'}, "", $text{'index_sharelist'}); diff --git a/samba/edit_pshare.cgi.bak b/samba/edit_pshare.cgi.bak deleted file mode 100755 index 53a2c3790..000000000 --- a/samba/edit_pshare.cgi.bak +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/local/bin/perl -# edit_pshare.cgi -# Display a form for editing or creating a new printer share - -require './samba-lib.pl'; -&ReadParse(); -$s = $in{'share'}; -# check acls -%access = &get_module_acl(); -&error_setup("$text{'eacl_aviol'}"); -if(!$s) { - &error("$text{'eacl_np'} $text{'eacl_pcps'}") - unless $access{'c_ps'}; - } -else { - &error("$text{'eacl_np'} $text{'eacl_paps'}") - unless &can('r', \%access, $in{'share'}); - } -# display -if ($s) { - &header($s eq 'global' ? $text{'pshare_title1'} : $text{'pshare_title2'}, ""); - &get_share($s); - } -else { - &header($text{'pshare_title3'}, ""); - } -print "


\n"; - -print "
\n"; -if ($s) { print "\n"; } - -# Vital share options.. -print "\n"; -print "\n"; -print "
$text{'pshare_info'}
\n"; -if ($s ne "global") { - if ($copy = &getval("copy")) { - print "\n"; - } - print "\n"; - printf "\n"; - } - -print "\n"; -if (&foreign_check("lpadmin")) { - &foreign_require("lpadmin", "lpadmin-lib.pl"); - @plist = &foreign_call("lpadmin", "list_printers"); - } -elsif ($config{'list_printers_command'}) { - @plist = split(/\s+/ , `$config{'list_printers_command'}`); - } -if (@plist) { - print "\n"; - } -else { - print "\n"; - } - -print "\n"; -printf "\n"; - -print "\n"; -print "\n"; - -print "\n"; -print "\n"; - -print "\n"; -printf "\n", - &getval("comment"); - -print "\n" - if ($s eq "global"); - -print "
", &text('share_copy',$copy),"
$text{'pshare_name'}\n", - $s eq "printers" ? "" : "checked"; - printf "   \n", - $s eq "printers" ? "" : $s; - printf " $text{'pshare_all'}\n", - $s eq "printers" ? "checked" : ""; - print "
$text{'pshare_unixprn'}$text{'pshare_spool'}\n", - &getval("path"); -print &file_chooser_button("path", 1); -print "
$text{'share_available'}",&yesno_input("available"),"$text{'share_browseable'}",&yesno_input("browseable"),"
$text{'share_comment'}\n"; -printf "
$text{'share_samedesc1'}

\n"; - -if ($s eq "global") { - print "

\n"; - } -elsif ($s) { - print "\n"; - print "\n" - if &can('rw', \%access, $s); - print "\n"; - print "\n"; - print "\n"; - print "\n" - if &can('rv', \%access, $s); - print "\n"; - print "\n"; - print "\n"; - print "\n" - if &can('rw', \%access, $s); - print "

\n"; - } -else { - print "

\n"; - } - -if ($s) { - # Icons for other share options - $us = "share=".&urlize($s)."&printer=1"; - local (@url, @text, @icon, $disp); - if (&can('rs',\%access, $s)) { - push(@url, "edit_sec.cgi?$us"); - push(@text, $text{'share_security'}); - push(@icon, "images/icon_2.gif"); - $disp++; - } - if (&can('ro',\%access, $s)) { - push(@url, "edit_popts.cgi?$us"); - push(@text, $text{'print_option'}); - push(@icon, "images/icon_3.gif"); - $disp++; - } - if ($disp) { - print "


\n"; - print "

$text{'share_option'}

\n"; - &icons_table(\@url, \@text, \@icon); - } - } - -print "
\n"; -&footer("", $text{'index_sharelist'}); diff --git a/samba/lang/en b/samba/lang/en index f54b7c29f..730d70ef5 100644 --- a/samba/lang/en +++ b/samba/lang/en @@ -282,7 +282,7 @@ print_queue=Display queue command print_delete=Delete job command print_pause=Pause job command print_unresume=Unresume job command -print_driver=Printer Driver +print_driver=Printer driver pshare_title1=Printer Share Defaults pshare_title2=Edit Printer Share