X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_export.cgi;h=4dd253be8ceded0f3e8613c4775e496c2d929afd;hb=06fb1346ff8076a84f743fa07de31852942e144f;hp=d7219b74a403b7f6aeb60d161b70fba9ebb8a79a;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git
diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi
index d7219b74a..4dd253be8 100644
--- a/httemplate/edit/part_export.cgi
+++ b/httemplate/edit/part_export.cgi
@@ -13,12 +13,6 @@
- Export host
-
-
-
-
-
Export
<% $widget->html %>
@@ -63,17 +57,86 @@ my $widget = new HTML::Widgets::SelectLayers(
'options' => \%layers,
'form_name' => 'dummy',
'form_action' => 'process/part_export.cgi',
- 'form_text' => [qw( exportnum exportname machine )],
+ 'form_text' => [qw( exportnum exportname )],
# 'form_checkbox' => [qw()],
'html_between' => " \n",
'layer_callback' => sub {
my $layer = shift;
+ # create 'config_element' to generate the whole layer with a Mason component
+ if ( my $include = $exports->{$layer}{config_element} ) {
+ # might need to adjust the scope of this at some point
+ return $m->scomp($include,
+ part_export => $part_export,
+ layer => $layer,
+ export_info => $exports->{$layer}
+ );
+ }
my $html = qq! !.
ntable("#cccccc",2);
- $html .= 'Description '.
- $exports->{$layer}{notes}. ' '
- if $layer;
+ if ( $layer ) {
+ $html .= 'Description '.
+ $exports->{$layer}{notes}. ' ';
+
+ if ( $exports->{$layer}{no_machine} ) {
+ $html .= ' '.
+ ' ';
+ } else {
+ $html .= 'Hostname or IP ';
+ my $machine = $part_export->machine;
+ if ( $exports->{$layer}{svc_machine} ) {
+ my( $N_CHK, $Y_CHK) = ( 'CHECKED', '' );
+ my( $machine_DISABLED, $pem_DISABLED) = ( '', 'DISABLED' );
+ my $part_export_machine = '';
+ if ( $cgi->param('svc_machine') eq 'Y'
+ || $machine eq '_SVC_MACHINE'
+ )
+ {
+ $Y_CHK = 'CHECKED';
+ $N_CHK = 'CHECKED';
+ $machine_DISABLED = 'DISABLED';
+ $pem_DISABLED = '';
+ $machine = '';
+ $part_export_machine =
+ $cgi->param('part_export_machine')
+ || join "\n",
+ map $_->machine,
+ grep ! $_->disabled,
+ $part_export->part_export_machine;
+ }
+ my $oc = qq(onChange="${layer}_svc_machine_changed(this)");
+ $html .= qq[
+
+
+
+
+ Selected in each customer service from these choices
+
+
+
+ ];
+ } else {
+ $html .= qq( ).
+ ' ';
+ }
+ $html .= " ";
+ }
+
+ }
foreach my $option ( keys %{$exports->{$layer}{options}} ) {
my $optinfo = $exports->{$layer}{options}{$option};