[freeside-commits] freeside/httemplate/edit/elements svc_Common.html, 1.6, 1.7

Ivan,,, ivan at wavetail.420.am
Mon Sep 8 14:02:13 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv32581

Modified Files:
	svc_Common.html 
Log Message:
completely hide fixed+blank fields, RT#3829

Index: svc_Common.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/svc_Common.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- svc_Common.html	28 Jun 2008 23:03:09 -0000	1.6
+++ svc_Common.html	8 Sep 2008 21:02:09 -0000	1.7
@@ -1,21 +1,3 @@
-%
-%  my %opt = @_;
-%
-%  #my( $svcnum, $pkgnum, $svcpart, $part_svc );
-%  my( $pkgnum, $svcpart, $part_svc );
-%
-%  #get & untaint pkgnum & svcpart
-%  if ( ! $cgi->param('error')
-%       && $cgi->param('pkgnum') && $cgi->param('svcpart')
-%     )
-%  {
-%    $cgi->param('pkgnum') =~ /^(\d+)$/ or die 'unparsable pkgnum';
-%    $pkgnum = $1;
-%    $cgi->param('svcpart') =~ /^(\d+)$/ or die 'unparsable svcpart';
-%    $svcpart = $1;
-%    #$cgi->delete_all(); #so edit.html treats this correctly as new??
-%  }
-%
 <% include( 'edit.html',
 
                  'menubar' => [],
@@ -69,7 +51,9 @@
                    my $columndef = $part_svc->part_svc_column($f->{'field'});
                    my $flag = $columndef->columnflag;
                    if ( $flag eq 'F' ) {
-                     $f->{'type'} = 'fixed';
+                     $f->{'type'} = length($columndef->columnvalue)
+                                      ? 'fixed'
+                                      : 'hidden';
                      $f->{'value'} = $columndef->columnvalue;
                    }
                  },
@@ -116,3 +100,23 @@
                  %opt #pass through/override params
              )
 %>
+<%init>
+
+my %opt = @_;
+
+#my( $svcnum, $pkgnum, $svcpart, $part_svc );
+my( $pkgnum, $svcpart, $part_svc );
+
+#get & untaint pkgnum & svcpart
+if ( ! $cgi->param('error')
+     && $cgi->param('pkgnum') && $cgi->param('svcpart')
+   )
+{
+  $cgi->param('pkgnum') =~ /^(\d+)$/ or die 'unparsable pkgnum';
+  $pkgnum = $1;
+  $cgi->param('svcpart') =~ /^(\d+)$/ or die 'unparsable svcpart';
+  $svcpart = $1;
+  #$cgi->delete_all(); #so edit.html treats this correctly as new??
+}
+
+</%init>



More information about the freeside-commits mailing list