From 9c7dee35f91a386fcce14cb6c3e9d23ba3eee8af Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 28 Jun 2008 23:03:10 +0000 Subject: get DIDs from globalpops --- httemplate/edit/cust_main/select-state.html | 24 ++---------------------- httemplate/edit/elements/svc_Common.html | 4 +++- httemplate/edit/svc_phone.cgi | 8 +++++++- 3 files changed, 12 insertions(+), 24 deletions(-) (limited to 'httemplate/edit') 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 @@ - - +<% 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"; - 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', -- cgit v1.2.1