Vendor Qualification ID is now editable if empty, RT#18405, RT#18313
authorIvan Kohler <ivan@freeside.biz>
Wed, 11 Jul 2012 09:09:16 +0000 (02:09 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 11 Jul 2012 09:09:16 +0000 (02:09 -0700)
httemplate/edit/svc_dsl.cgi

index 1aeadb3..36345b9 100644 (file)
@@ -52,12 +52,24 @@ my $edit_cb = sub {
         elsif($export->exporttype eq 'ikano') {
             @fields = ( 'password', 'monitored', );
 
-            foreach my $hf ( keys %$ti_fields ) {
-                push @fields, {
-                    field => $hf,
-                    type => 'hidden',
-                    value => $svc_x->$hf,
-                } unless ( $hf eq 'password' || $hf eq 'monitored' );
+            if ( $svc_x->vendor_qual_id ) {
+              push @fields, { field => 'vendor_qual_id',
+                              type  => 'hidden',
+                              value => $svc_x->vendor_qual_id,
+                            };
+            } else {
+              push @fields, 'vendor_qual_id';
+            }
+
+            foreach my $hf (
+              grep { $_ !~ /^(password|monitored|vendor_qual_id)$/ }
+                keys %$ti_fields
+            ) {
+              push @fields, {
+                field => $hf,
+                type  => 'hidden',
+                value => $svc_x->$hf,
+              };
             }
         }
         # else add any other export-specific stuff here