diff options
author | ivan <ivan> | 2008-06-28 23:03:10 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-06-28 23:03:10 +0000 |
commit | 9c7dee35f91a386fcce14cb6c3e9d23ba3eee8af (patch) | |
tree | b21b3ca250947289caaecdeba659bc37257bf464 /httemplate/edit | |
parent | a1871d3d13c1dafa93b956762c0d23728d261da7 (diff) |
get DIDs from globalpops
Diffstat (limited to 'httemplate/edit')
-rw-r--r-- | httemplate/edit/cust_main/select-state.html | 24 | ||||
-rw-r--r-- | httemplate/edit/elements/svc_Common.html | 4 | ||||
-rw-r--r-- | httemplate/edit/svc_phone.cgi | 8 |
3 files changed, 12 insertions, 24 deletions
diff --git a/httemplate/edit/cust_main/select-state.html b/httemplate/edit/cust_main/select-state.html index 4f1c056b5..ce08443e4 100644 --- a/httemplate/edit/cust_main/select-state.html +++ b/httemplate/edit/cust_main/select-state.html @@ -1,24 +1,4 @@ -<SELECT NAME="<% $opt{'prefix'} %>state" onChange="<% $opt{'prefix'} %>state_changed(this); <% $opt{'onchange'} %>" <% $opt{'disabled'} %>> - -% if ($opt{empty}) { - <OPTION VALUE=""<% $opt{state} eq '' ? ' SELECTED' : '' %>><% $opt{empty} %> -% } - -% foreach my $state ( keys %states ) { - - <OPTION VALUE="<% $state %>"<% $state eq $opt{'state'} ? ' SELECTED' : '' %>><% $states{$state} || '(n/a)' %> - -% } - - -</SELECT> - +<% include('/elements/select-state.html', @_) %> <%init> -my %opt = @_; -foreach my $opt (qw( county state country prefix onchange disabled empty )) { - $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_}); -} - -tie my %states, 'Tie::IxHash', states_hash( $opt{'country'} ); +warn "cust_main/select-state.html depreated; use /elements/select-state.html instead"; </%init> - diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html index b6737c14a..4355cb4cd 100644 --- a/httemplate/edit/elements/svc_Common.html +++ b/httemplate/edit/elements/svc_Common.html @@ -28,6 +28,8 @@ $part_svc = qsearchs( 'part_svc', { svcpart=>$svcpart }); die "No part_svc entry!" unless $part_svc; + + $svc_x->setfield('svcpart', $svcpart); }, 'edit_callback' => sub { @@ -43,7 +45,7 @@ die "No part_svc entry!" unless $part_svc; }, - 'new_hash_callback' => sub { + 'new_hashref_callback' => sub { #my( $cgi, $svc_x ) = @_; { svcpart => $svcpart }; diff --git a/httemplate/edit/svc_phone.cgi b/httemplate/edit/svc_phone.cgi index 958558b46..109fba228 100644 --- a/httemplate/edit/svc_phone.cgi +++ b/httemplate/edit/svc_phone.cgi @@ -1,7 +1,13 @@ <% include( 'elements/svc_Common.html', 'name' => 'Phone number', 'table' => 'svc_phone', - 'fields' => [qw( countrycode phonenum pin )], + 'fields' => [ 'countrycode', + { field => 'phonenum', + type => 'select-did', + label => 'Phone number', + }, + 'pin', + ], 'labels' => { 'countrycode' => 'Country code', 'phonenum' => 'Phone number', |