diff options
Diffstat (limited to 'httemplate/edit')
| -rw-r--r-- | httemplate/edit/elements/edit.html | 10 | ||||
| -rw-r--r-- | httemplate/edit/elements/svc_Common.html | 10 | ||||
| -rwxr-xr-x | httemplate/edit/part_svc.cgi | 10 | ||||
| -rwxr-xr-x | httemplate/edit/svc_acct.cgi | 9 | ||||
| -rw-r--r-- | httemplate/edit/svc_phone.cgi | 5 | 
5 files changed, 40 insertions, 4 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index fd73e031e..711c8d709 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -40,8 +40,10 @@ Example:                      'disabled' => 0,                      'onchange' => 'javascript_function', -                    #m2 stuff only tested w/selectlayers so far -                    #might work w/select too, dunno others +                    'include_opt_callback' => sub { #my $ = @_; +                                                    ( 'option' => 'value', ); +                                                  }, +                      'm2name_table'   => 'table_name',                      'm2name_namecol' => 'name_column',                      #OR# @@ -293,6 +295,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 { diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index 20bc27780..d74e0f20d 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -289,6 +289,14 @@ that field.  %          } #endif  %          $html .= '</SELECT>';  % +%        } elsif ( $def->{type} eq 'select-svc_pbx.html' ) { +% +%          $html .= include('/elements/select-svc_pbx.html', +%                             'element_name' => "${layer}__${field}", +%                             'element_etc'  => $disabled, +%                             'multiple'     => ($flag eq 'S'), +%                          ); +%  %        } elsif ( $def->{type} eq 'radius_usergroup_selector' ) {  %  %          #XXX disable the RADIUS usergroup selector?  ugh it sure does need @@ -304,7 +312,7 @@ that field.  %  %        } else {  % -%          $html .= '<font color="#ff0000">unknown type'. $def->{type}; +%          $html .= '<font color="#ff0000">unknown type '. $def->{type};  %  %        }  % diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index afbd002c1..2845c8301 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -122,7 +122,14 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>      </TD>    </TR>  % }  -% + +<% include('/elements/tr-select-svc_pbx.html', +             'curr_value' => $svc_acct->pbxsvc, +             'part_svc'   => $part_svc, +             'cust_pkg'   => $cust_pkg, +          ) +%> +  %#pop  %my $popnum = $svc_acct->popnum || 0;  %if ( $part_svc->part_svc_column('popnum')->columnflag eq 'F' ) { diff --git a/httemplate/edit/svc_phone.cgi b/httemplate/edit/svc_phone.cgi index d7629ab6f..55ee890f4 100644 --- a/httemplate/edit/svc_phone.cgi +++ b/httemplate/edit/svc_phone.cgi @@ -6,6 +6,10 @@                                   type  => 'select-did',                                   label => 'Phone number',                                 }, +                               { field => 'pbxsvc', +                                 type  => 'select-svc_pbx', +                                 label => 'PBX', +                               },                                 'sip_password',                                 'pin',                                 'phone_name', @@ -16,6 +20,7 @@                                 'sip_password' => 'SIP password',                                 'pin'          => 'Voicemail PIN',                                 'phone_name'   => 'Name', +                               'pbxsvc'       => 'PBX',                               },             )  %>  | 
