From 46ef8524cf2e6db7b851967062ce92ffb0773d10 Mon Sep 17 00:00:00 2001 From: levinse Date: Thu, 25 Nov 2010 01:46:34 +0000 Subject: ikano.pm initial commit, svc_dsl UI initial commit, and svc_dsl on-going work, RT7111 --- httemplate/edit/elements/edit.html | 5 ++ httemplate/edit/elements/svc_Common.html | 7 ++ httemplate/edit/part_svc.cgi | 1 + httemplate/edit/process/svc_dsl.html | 10 +++ httemplate/edit/svc_dsl.cgi | 125 +++++++++++++++++++++++++++++++ httemplate/view/elements/svc_Common.html | 10 ++- httemplate/view/svc_dsl.cgi | 62 +++++++++++++++ 7 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 httemplate/edit/process/svc_dsl.html create mode 100644 httemplate/edit/svc_dsl.cgi create mode 100644 httemplate/view/svc_dsl.cgi (limited to 'httemplate') diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 3d828478f..142d0c3ae 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -311,6 +311,11 @@ Example: % foreach grep exists($f->{$_}), % qw( hashref agent_virt agent_null agent_null_right ); % +% # fixed +% $include_common{$_} = $f->{$_} +% foreach grep exists($f->{$_}), +% qw( formatted_value ); +% % #htmlarea % $include_common{$_} = $f->{$_} % foreach grep exists($f->{$_}), qw( width height ); diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html index e74f44276..2e27f851d 100644 --- a/httemplate/edit/elements/svc_Common.html +++ b/httemplate/edit/elements/svc_Common.html @@ -29,6 +29,13 @@ die "No part_svc entry!" unless $part_svc; label_fixup($part_svc, $opt); + + if ( my $cb = $opt{'svc_edit_callback'} ) { + my $cust_pkg = $pkgnum + ? qsearchs('cust_pkg', {pkgnum=>$pkgnum}) + : ''; #? + &{ $cb }( $cgi,$svc_x, $part_svc,$cust_pkg, $fields,$opt); + } }, 'new_hashref_callback' => sub { diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index 50bc79c02..d156ccd0a 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -16,6 +16,7 @@ Service definitions are the templates for items you offer to your customers.