]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add missing SAMBA web interface templates.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 2 Feb 2006 18:25:38 +0000 (18:25 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 2 Feb 2006 18:25:38 +0000 (18:25 +0000)
Fix reference to the "exported" template.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@5055 7a7537e8-13f0-0310-91df-b6672ffda945

cgi-bin/admin.c
templates/Makefile
templates/samba-export.tmpl [new file with mode: 0644]
templates/samba-exported.tmpl [new file with mode: 0644]

index 070c9615617b9b144b3e0c909e7e113951c836ad..07a3b932208ea5d668f1c3733c9d2d0a79ee9f04 100644 (file)
@@ -2621,7 +2621,7 @@ do_export(http_t *http)                   /* I - HTTP connection */
       }
       else
       {
-        cgiCopyTemplateLang("samba-exported");
+        cgiCopyTemplateLang("samba-exported.tmpl");
        cgiEndHTML();
        return;
       }
index d35e1e6fd5469bf5bfd59115a08003c0814ef2d5..8ba0735daf3ab184e85ead0118b995f54f69ef29 100644 (file)
@@ -81,6 +81,8 @@ FILES =       \
                printers.tmpl \
                printers-header.tmpl \
                restart.tmpl \
+               samba-export.tmpl \
+               samba-exported.tmpl \
                search.tmpl \
                set-printer-options-header.tmpl \
                set-printer-options-trailer.tmpl \
diff --git a/templates/samba-export.tmpl b/templates/samba-export.tmpl
new file mode 100644 (file)
index 0000000..0510f55
--- /dev/null
@@ -0,0 +1,55 @@
+<SCRIPT TYPE="text/javascript"><!--
+function select_printers() {
+  var list = document.export_samba.EXPORT_NAME;
+  var sel = document.export_samba.EXPORT_ALL.checked;
+
+  for (i = 0; i < list.length; i ++) {
+    list.options[i].selected = sel;
+  }
+}
+--></SCRIPT>
+
+<FORM METHOD="POST" ACTION="/admin/" NAME="export_samba">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="export-samba">
+
+<H2 CLASS="title">Export Printers to Samba</H2>
+
+{error?<P>Unable to export printers to Samba\:</P>
+<BLOCKQUOTE>{error}</BLOCKQUOTE>
+<P>Consult the <A HREF="/admin/log/error_log"
+TARGET="_blank">error_log</A> file for more information.</P>:
+<P>This page allows you to export printers to Samba so that
+Windows clients can access them through the <VAR>Network
+Neighborhood</VAR> or <VAR>Network Places</VAR> icons on their
+desktop. You must previously install the Windows PostScript
+printer drivers as described in the <A
+HREF="/help/man-cupsaddsmb.html"
+TARGET="_blank">cupsaddsmb(8)</A> man page.</P>}
+
+<TABLE>
+<TR>
+<TH CLASS="label">Printers:</TH>
+<TD>
+<SELECT NAME="EXPORT_NAME" SIZE="10" MULTIPLE>
+{[printer_name]<OPTION VALUE="{printer_name}"{export_all? SELECTED:{printer_export? SELECTED:}}>{printer_name}}
+</SELECT><BR>
+<INPUT TYPE="CHECKBOX" NAME="EXPORT_ALL"{export_all? CHECKED:}
+onChange="select_printers()"> Export All Printers
+</TD>
+</TR>
+<TR>
+<TH CLASS="label">Samba Username:</TH>
+<TD><INPUT TYPE="TEXT" NAME="USERNAME" VALUE="{?USERNAME}"> (required)</TD>
+</TR>
+<TR>
+<TH CLASS="label">Samba Password:</TH>
+<TD><INPUT TYPE="PASSWORD" NAME="PASSWORD" VALUE=""> (required)</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/export-samba.gif"
+ALT="Export Printers to Samba"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/samba-exported.tmpl b/templates/samba-exported.tmpl
new file mode 100644 (file)
index 0000000..6fa8eb4
--- /dev/null
@@ -0,0 +1 @@
+<P>Printers exported to samba successfully.</P>