freeside/httemplate/view cust_main.cgi,1.42.4.26,1.42.4.27
ivan
ivan at pouncequick.420.am
Fri Aug 6 19:50:06 PDT 2004
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv20883
Modified Files:
Tag: FREESIDE_1_4_BRANCH
cust_main.cgi
Log Message:
disable order package button until a package has been selected
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main.cgi,v
retrieving revision 1.42.4.26
retrieving revision 1.42.4.27
diff -u -d -r1.42.4.26 -r1.42.4.27
--- cust_main.cgi 4 Apr 2004 22:15:02 -0000 1.42.4.26
+++ cust_main.cgi 7 Aug 2004 02:49:56 -0000 1.42.4.27
@@ -301,13 +301,25 @@
'</PRE></TD></TR></TABLE></TABLE>';
}
-print '</TD></TR></TABLE>';
+%>
-print '<BR>'.
- '<FORM ACTION="'.popurl(2).'edit/process/quick-cust_pkg.cgi" METHOD="POST">'.
- qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
- '<SELECT NAME="pkgpart"><OPTION> ';
+</TD></TR></TABLE>
+
+<BR>
+<SCRIPT TYPE="text/javascript">
+function enable_order_pkg () {
+ if ( document.OrderPkgForm.pkgpart.selectedIndex > 0 ) {
+ document.OrderPkgForm.submit.disabled = false;
+ } else {
+ document.OrderPkgForm.submit.disabled = true;
+ }
+}
+</SCRIPT>
+<FORM NAME="OrderPkgForm" ACTION="<%= $p %>edit/process/quick-cust_pkg.cgi" METHOD="POST">
+<INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $custnum %>">
+<SELECT NAME="pkgpart" onChange="enable_order_pkg()"><OPTION>Order additional package
+<%
foreach my $part_pkg (
qsearch( 'part_pkg', { 'disabled' => '' }, '',
' AND 0 < ( SELECT COUNT(*) FROM type_pkgs '.
@@ -315,11 +327,13 @@
' AND type_pkgs.pkgpart = part_pkg.pkgpart )'
)
) {
- print '<OPTION VALUE="'. $part_pkg->pkgpart. '">'. $part_pkg->pkg. ' - '.
- $part_pkg->comment;
-}
+%>
+<OPTION VALUE="<%= $part_pkg->pkgpart %>"><%= $part_pkg->pkg %> - <%= $part_pkg->comment %>
+<% } %>
-print '</SELECT><INPUT TYPE="submit" VALUE="Order Package"></FORM><BR>';
+</SELECT><INPUT NAME="submit" TYPE="submit" VALUE="Order Package" disabled></FORM><BR>
+
+<%
if ( $conf->config('payby-default') ne 'HIDE' ) {
More information about the freeside-commits
mailing list