diff options
Diffstat (limited to 'httemplate/edit/elements')
-rw-r--r-- | httemplate/edit/elements/edit.html | 8 | ||||
-rw-r--r-- | httemplate/edit/elements/svc_Common.html | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 43b7afe11..4fe32c15d 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -40,6 +40,10 @@ Example: 'disabled' => 0, 'onchange' => 'javascript_function', + 'include_opt_callback' => sub { #my $ = @_; + ( 'option' => 'value', ); + }, + 'm2name_table' => 'table_name', 'm2name_namecol' => 'name_column', #OR# @@ -294,6 +298,10 @@ Example: % $include_common{'colspan'} = $f->{colspan} if $f->{colspan}; % } % +% if ( $f->{include_opt_callback} ) { +% %include_common = ( %include_common, &{ $f->{include_opt_callback} } ); +% } +% % my $layer_prefix_on = ''; % % my $include_sub = sub { diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html index ef04bd04a..31d4739bf 100644 --- a/httemplate/edit/elements/svc_Common.html +++ b/httemplate/edit/elements/svc_Common.html @@ -54,6 +54,7 @@ 'field_callback' => sub { my ($cgi, $object, $f) = @_; + my $columndef = $part_svc->part_svc_column($f->{'field'}); my $flag = $columndef->columnflag; if ( $flag eq 'F' ) { @@ -62,6 +63,15 @@ : 'hidden'; $f->{'value'} = $columndef->columnvalue; } + + if ( $f->{'type'} eq 'select-svc_pbx' ) { + $f->{'include_opt_callback'} = + sub { ( 'pkgnum' => $pkgnum, + 'svcpart' => $svcpart, + ); + }; + } + }, 'html_init' => sub { |