From 14d6b3092a296ada5a0252752fd15a0087c63374 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 18 Mar 2002 15:52:12 +0000 Subject: added (incomplete) export foo --- httemplate/edit/part_export.cgi | 80 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 httemplate/edit/part_export.cgi (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi new file mode 100644 index 000000000..ffce0438f --- /dev/null +++ b/httemplate/edit/part_export.cgi @@ -0,0 +1,80 @@ + +<% + +#if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { +# $cgi->param('clone', $1); +#} else { +# $cgi->param('clone', ''); +#} +#if ( $cgi->param('svcpart') && $cgi->param('svcpart') =~ /^(\d+)$/ ) { +# $cgi->param('svcpart', $1); +#} else { +# $cgi->param('svcpart', ''); +#} + +my($query) = $cgi->keywords; +my $action = ''; +my $part_export = ''; +my $options = {}; +if ( $cgi->param('error') ) { + $part_export = new FS::part_export ( { + map { $_, scalar($cgi->param($_)) } fields('part_export') + } ); +} + +warn "***$query***"; +if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { + $action = 'Add'; + my $old_part_export = qsearchs('part_export', { 'exportnum' => $1 } ); + unless ( $part_export ) { + ($part_export, $options) = $old_part_export->clone; + } +} elsif ( $cgi->param('new_with_svcpart') + && $cgi->param('new_with_svcpart') =~ /^(\d+)$/ ) { + $part_export ||= new FS::part_export ( { 'svcpart' => $1 } ); +} elsif ( $query =~ /^(\d+)$/ ) { + $part_export ||= qsearchs('part_export', { 'exportnum' => $1 } ); +} +$action ||= $part_export->exportnum ? 'Edit' : 'Add'; + +my @types = qw(shell bsdshell textradius sqlradius cp); + +%> +<%= header("$action Export", menubar( + 'Main Menu' => popurl(2), +), ' onLoad="visualize()"') +%> + +<% if ( $cgi->param('error') ) { %> +Error: <%= $cgi->param('error') %> +<% } %> + +
+<% #print ''; %> + +<%= ntable("#cccccc",2) %> + + Service + + <%= $part_export->svcpart %> - <%= $part_export->part_svc->svc %> + + + + Export + + + + Export host + + + + + +
+ + + -- cgit v1.2.1 From f1038a648b3d53db925b23519e7cd2a30c6837ed Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 20 Mar 2002 21:31:49 +0000 Subject: new export! infostreet and sqlradius provisioning switched over (Bug #299 - doesn't close it, but all the groundwork is done) also removes non-transactional ICRADIUS export from svc_acct.export (closes: Bug#347) --- httemplate/edit/part_export.cgi | 130 +++++++++++++++++++++++++++++++++++----- 1 file changed, 115 insertions(+), 15 deletions(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index ffce0438f..a44bd39d5 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -22,7 +22,7 @@ if ( $cgi->param('error') ) { } ); } -warn "***$query***"; +#warn "***$query***"; if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { $action = 'Add'; my $old_part_export = qsearchs('part_export', { 'exportnum' => $1 } ); @@ -37,7 +37,112 @@ if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { } $action ||= $part_export->exportnum ? 'Edit' : 'Add'; -my @types = qw(shell bsdshell textradius sqlradius cp); +my %exports = ( + 'svc_acct' => { + 'sysvshell' => { + 'desc' => + 'Batch export of /etc/passwd and /etc/shadow files (Linux/SysV)', + 'options' => {}, + }, + 'bsdshell' => { + 'desc' => + 'Batch export of /etc/passwd and /etc/master.passwd files (BSD)', + 'options' => {}, + }, +# 'nis' => { +# 'desc' => +# 'Batch export of /etc/global/passwd and /etc/global/shadow for NIS ', +# 'options' => {}, +# }, + 'bsdshell' => { + 'desc' => + 'Batch export of /etc/passwd and /etc/master.passwd files (BSD)', + 'options' => {}, + }, + 'textradius' => { + 'desc' => 'Batch export of a text /etc/raddb/users file (Livingston, Cistron)', + }, + 'sqlradius' => { + 'desc' => 'Real-time export to SQL-backed RADIUS (ICRADIUS, FreeRADIUS)', + 'options' => { + 'datasrc' => { label=>'DBI data source' }, + 'username' => { label=>'Database username' }, + 'password' => { label=>'Database password' }, + }, + 'nodomain' => 'Y', + 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, etc., from Conf.pm && export.html etc.', + }, + 'cyrus' => { + 'desc' => 'Real-time export to Cyrus IMAP server', + }, + 'cp' => { + 'desc' => 'Real-time export to Critical Path Account Provisioning Protocol', + }, + 'infostreet' => { + 'desc' => 'Real-time export to InfoStreet streetSmartAPI', + 'options' => { + 'url' => { label=>'XML-RPC Access URL', }, + 'login' => { label=>'InfoStreet login', }, + 'password' => { label=>'InfoStreet password', }, + 'groupID' => { label=>'InfoStreet groupID', }, + }, + 'nodomain' => 'Y', + 'notes' => 'http://www.infostreet.com/ .... install Frontier::Client', + } + }, + + 'svc_domain' => {}, + + 'svc_acct_sm' => {}, + + 'svc_forward' => {}, + + 'svc_www' => {}, + +); + +my $svcdb = $part_export->part_svc->svcdb; +my %layers = map { $_ => "$_ - ". $exports{$svcdb}{$_}{desc} } + keys %{$exports{$svcdb}}; +$layers{''}=''; + +my $widget = new HTML::Widgets::SelectLayers( + 'selected_layer' => $part_export->exporttype, + 'selected_layer' => $part_export->exporttype, + 'options' => \%layers, + 'form_name' => 'dummy', + 'form_action' => 'process/part_export.cgi', + 'form_text' => [qw( exportnum svcpart machine )], +# 'form_checkbox' => [qw()], + 'html_between' => "\n", + 'layer_callback' => sub { + my $layer = shift; + my $html = qq!!. + ntable("#cccccc",2); + foreach my $option ( keys %{$exports{$svcdb}->{$layer}{options}} ) { +# foreach my $option ( qw(url login password groupID ) ) { + my $optinfo = $exports{$svcdb}->{$layer}{options}{$option}; + my $label = $optinfo->{label}; + my $value = $part_export->option($option); + $html .= qq!$label!. + qq!!. + ''; + } + $html .= ''; + + $html .= ''; + + $html .= ''; + + $html .= ''; + + $html; + }, +); %> <%= header("$action Export", menubar( @@ -46,35 +151,30 @@ my @types = qw(shell bsdshell textradius sqlradius cp); %> <% if ( $cgi->param('error') ) { %> -Error: <%= $cgi->param('error') %> + Error: <%= $cgi->param('error') %> +

<% } %> -
-<% #print ''; %> + + <%= ntable("#cccccc",2) %> Service <%= $part_export->svcpart %> - <%= $part_export->part_svc->svc %> + - - Export - - Export host - -
+ + Export + <%= $widget->html %> -- cgit v1.2.1 From 415150fe1997eb2688dfd492710f644574e29daf Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 21 Mar 2002 06:57:20 +0000 Subject: more for the new world of export... --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index a44bd39d5..7ba6fa12b 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -70,7 +70,7 @@ my %exports = ( 'password' => { label=>'Database password' }, }, 'nodomain' => 'Y', - 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, etc., from Conf.pm && export.html etc.', + 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, DBI::Proxy, etc., from Conf.pm && export.html etc.', }, 'cyrus' => { 'desc' => 'Real-time export to Cyrus IMAP server', -- cgit v1.2.1 From b159f42fa3f48cc2ca3b43773e7661e17d2fb072 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 22 Mar 2002 12:49:43 +0000 Subject: more new export... --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 7ba6fa12b..3d867f50a 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -27,7 +27,7 @@ if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { $action = 'Add'; my $old_part_export = qsearchs('part_export', { 'exportnum' => $1 } ); unless ( $part_export ) { - ($part_export, $options) = $old_part_export->clone; + ($part_export, $options) = $old_part_export->clone($cgi->param('svcpart')); } } elsif ( $cgi->param('new_with_svcpart') && $cgi->param('new_with_svcpart') =~ /^(\d+)$/ ) { -- cgit v1.2.1 From c6da895a2fb2c233716381b7e45ebbeb1c2f6aaa Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 26 Mar 2002 00:32:46 +0000 Subject: further export bugfixing add 10 kid limit to freeside-queued sqlradius_reset now works (closes: Bug#372) --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 3d867f50a..25e8f5be0 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -70,7 +70,7 @@ my %exports = ( 'password' => { label=>'Database password' }, }, 'nodomain' => 'Y', - 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, DBI::Proxy, etc., from Conf.pm && export.html etc.', + 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, DBI::Proxy, etc., from Conf.pm && export.html etc., reset with bin/sqlradius_reset', }, 'cyrus' => { 'desc' => 'Real-time export to Cyrus IMAP server', -- cgit v1.2.1 From 92badebcb286260d7861bd09a2450eea18c4259e Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 5 Apr 2002 00:42:21 +0000 Subject: Checkin of disparate changes from working on the road: - generic SQL query - move exports out to their own files - small cleanup of selfadmin server --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 25e8f5be0..0ca964e02 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -87,7 +87,7 @@ my %exports = ( 'groupID' => { label=>'InfoStreet groupID', }, }, 'nodomain' => 'Y', - 'notes' => 'http://www.infostreet.com/ .... install Frontier::Client', + 'notes' => 'Real-time export to InfoStreet streetSmartAPI. Requires installation of Frontier::Client from CPAN.', } }, -- cgit v1.2.1 From a7c1b602f88c177db34477ed4cdc1f72603f8995 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Apr 2002 22:05:31 +0000 Subject: (almost) everything for bug#375 - create export_svc table - part_svc to part_export is now properly many-to-many, not one-to-many still need to finish service editing (choosing exports) in httemplate/edit/part_svc.cgi and httemplate/edti/process/part_svc.cgi and do somethinga about that manual $svcdb = 'svc_acct' in httemplate/edit/part_export.cgi (do part_export records need a svcdb? probably not... should be able to just pass an svcdb on creation of new exports, move the big %exports hash into part_export.pm and allow httemplate/edit/part_svc.cgi to query it for exports that can apply to a given svcdb.... --- httemplate/edit/part_export.cgi | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 0ca964e02..f3127403e 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -6,34 +6,18 @@ #} else { # $cgi->param('clone', ''); #} -#if ( $cgi->param('svcpart') && $cgi->param('svcpart') =~ /^(\d+)$/ ) { -# $cgi->param('svcpart', $1); -#} else { -# $cgi->param('svcpart', ''); -#} my($query) = $cgi->keywords; my $action = ''; my $part_export = ''; -my $options = {}; if ( $cgi->param('error') ) { $part_export = new FS::part_export ( { map { $_, scalar($cgi->param($_)) } fields('part_export') } ); -} - -#warn "***$query***"; -if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { - $action = 'Add'; - my $old_part_export = qsearchs('part_export', { 'exportnum' => $1 } ); - unless ( $part_export ) { - ($part_export, $options) = $old_part_export->clone($cgi->param('svcpart')); - } -} elsif ( $cgi->param('new_with_svcpart') - && $cgi->param('new_with_svcpart') =~ /^(\d+)$/ ) { - $part_export ||= new FS::part_export ( { 'svcpart' => $1 } ); } elsif ( $query =~ /^(\d+)$/ ) { - $part_export ||= qsearchs('part_export', { 'exportnum' => $1 } ); + $part_export = qsearchs('part_export', { 'exportnum' => $1 } ); +} else { + $part_export = new FS::part_export; } $action ||= $part_export->exportnum ? 'Edit' : 'Add'; @@ -101,18 +85,20 @@ my %exports = ( ); -my $svcdb = $part_export->part_svc->svcdb; +#my $svcdb = $part_export->part_svc->svcdb; +#YUCK +my $svcdb = 'svc_acct'; + my %layers = map { $_ => "$_ - ". $exports{$svcdb}{$_}{desc} } keys %{$exports{$svcdb}}; $layers{''}=''; my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => $part_export->exporttype, 'selected_layer' => $part_export->exporttype, 'options' => \%layers, 'form_name' => 'dummy', 'form_action' => 'process/part_export.cgi', - 'form_text' => [qw( exportnum svcpart machine )], + 'form_text' => [qw( exportnum machine )], # 'form_checkbox' => [qw()], 'html_between' => "\n", 'layer_callback' => sub { @@ -123,7 +109,7 @@ my $widget = new HTML::Widgets::SelectLayers( # foreach my $option ( qw(url login password groupID ) ) { my $optinfo = $exports{$svcdb}->{$layer}{options}{$option}; my $label = $optinfo->{label}; - my $value = $part_export->option($option); + my $value = $cgi->param($option) || $part_export->option($option); $html .= qq!$label!. qq!!. ''; @@ -159,13 +145,6 @@ my $widget = new HTML::Widgets::SelectLayers( <%= ntable("#cccccc",2) %> - - Service - - <%= $part_export->svcpart %> - <%= $part_export->part_svc->svc %> - - - Export host -- cgit v1.2.1 From e6ea57971831f25d682d97a0ba508c39b66ecd8b Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 12 Apr 2002 13:22:03 +0000 Subject: - should finish off the part_svc -> part_export s/one-to-many/many-to-many/ transition (closes: Bug#375) - fixes a nasty export scoping bug with message catalogs, whew --- httemplate/edit/part_export.cgi | 80 ++++------------------------------------- 1 file changed, 7 insertions(+), 73 deletions(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index f3127403e..77b80d06f 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -21,76 +21,10 @@ if ( $cgi->param('error') ) { } $action ||= $part_export->exportnum ? 'Edit' : 'Add'; -my %exports = ( - 'svc_acct' => { - 'sysvshell' => { - 'desc' => - 'Batch export of /etc/passwd and /etc/shadow files (Linux/SysV)', - 'options' => {}, - }, - 'bsdshell' => { - 'desc' => - 'Batch export of /etc/passwd and /etc/master.passwd files (BSD)', - 'options' => {}, - }, -# 'nis' => { -# 'desc' => -# 'Batch export of /etc/global/passwd and /etc/global/shadow for NIS ', -# 'options' => {}, -# }, - 'bsdshell' => { - 'desc' => - 'Batch export of /etc/passwd and /etc/master.passwd files (BSD)', - 'options' => {}, - }, - 'textradius' => { - 'desc' => 'Batch export of a text /etc/raddb/users file (Livingston, Cistron)', - }, - 'sqlradius' => { - 'desc' => 'Real-time export to SQL-backed RADIUS (ICRADIUS, FreeRADIUS)', - 'options' => { - 'datasrc' => { label=>'DBI data source' }, - 'username' => { label=>'Database username' }, - 'password' => { label=>'Database password' }, - }, - 'nodomain' => 'Y', - 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, DBI::Proxy, etc., from Conf.pm && export.html etc., reset with bin/sqlradius_reset', - }, - 'cyrus' => { - 'desc' => 'Real-time export to Cyrus IMAP server', - }, - 'cp' => { - 'desc' => 'Real-time export to Critical Path Account Provisioning Protocol', - }, - 'infostreet' => { - 'desc' => 'Real-time export to InfoStreet streetSmartAPI', - 'options' => { - 'url' => { label=>'XML-RPC Access URL', }, - 'login' => { label=>'InfoStreet login', }, - 'password' => { label=>'InfoStreet password', }, - 'groupID' => { label=>'InfoStreet groupID', }, - }, - 'nodomain' => 'Y', - 'notes' => 'Real-time export to InfoStreet streetSmartAPI. Requires installation of Frontier::Client from CPAN.', - } - }, - - 'svc_domain' => {}, - - 'svc_acct_sm' => {}, - - 'svc_forward' => {}, - - 'svc_www' => {}, - -); - -#my $svcdb = $part_export->part_svc->svcdb; -#YUCK -my $svcdb = 'svc_acct'; +#my $exports = FS::part_export::export_info($svcdb); +my $exports = FS::part_export::export_info(); -my %layers = map { $_ => "$_ - ". $exports{$svcdb}{$_}{desc} } - keys %{$exports{$svcdb}}; +my %layers = map { $_ => "$_ - ". $exports->{$_}{desc} } keys %$exports; $layers{''}=''; my $widget = new HTML::Widgets::SelectLayers( @@ -105,9 +39,9 @@ my $widget = new HTML::Widgets::SelectLayers( my $layer = shift; my $html = qq!!. ntable("#cccccc",2); - foreach my $option ( keys %{$exports{$svcdb}->{$layer}{options}} ) { + foreach my $option ( keys %{$exports->{$layer}{options}} ) { # foreach my $option ( qw(url login password groupID ) ) { - my $optinfo = $exports{$svcdb}->{$layer}{options}{$option}; + my $optinfo = $exports->{$layer}{options}{$option}; my $label = $optinfo->{label}; my $value = $cgi->param($option) || $part_export->option($option); $html .= qq!$label!. @@ -117,10 +51,10 @@ my $widget = new HTML::Widgets::SelectLayers( $html .= ''; $html .= ''; + join(',', keys %{$exports->{$layer}{options}} ). '">'; $html .= ''; + $exports->{$layer}{nodomain}. '">'; $html .= ' Date: Sat, 13 Apr 2002 13:36:26 +0000 Subject: - documentation updates - move Critical Path export to new-style export - bin/sqlradius_reset gets a manpage and becomes FS/bin/freeside-sqlradius-reset --- httemplate/edit/part_export.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 77b80d06f..b72b277c9 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -39,12 +39,17 @@ my $widget = new HTML::Widgets::SelectLayers( my $layer = shift; my $html = qq!!. ntable("#cccccc",2); + + $html .= 'Description'. + $exports->{$layer}{notes}. '' + if $layer; + foreach my $option ( keys %{$exports->{$layer}{options}} ) { # foreach my $option ( qw(url login password groupID ) ) { my $optinfo = $exports->{$layer}{options}{$option}; my $label = $optinfo->{label}; my $value = $cgi->param($option) || $part_export->option($option); - $html .= qq!$label!. + $html .= qq!$label!. qq!!. ''; } -- cgit v1.2.1 From 1290c097176adcd62d48b1250233d53adb4b50a5 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 16 Apr 2002 08:52:38 +0000 Subject: move the last of the real-time exports out of svc_acct.pm and into part_export --- httemplate/edit/part_export.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index b72b277c9..4affeb48f 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -48,7 +48,9 @@ my $widget = new HTML::Widgets::SelectLayers( # foreach my $option ( qw(url login password groupID ) ) { my $optinfo = $exports->{$layer}{options}{$option}; my $label = $optinfo->{label}; - my $value = $cgi->param($option) || $part_export->option($option); + my $value = $cgi->param($option) + || $part_export->option($option) + || (exists $optinfo->{default} ? $optinfo->{default} : ''); $html .= qq!$label!. qq!!. ''; -- cgit v1.2.1 From ffe9f4473c5c9c7cb7caeaa5b39160d7b3e8d137 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 20 Apr 2002 12:37:23 +0000 Subject: bind export --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 4affeb48f..af89c4ead 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -52,7 +52,7 @@ my $widget = new HTML::Widgets::SelectLayers( || $part_export->option($option) || (exists $optinfo->{default} ? $optinfo->{default} : ''); $html .= qq!$label!. - qq!!. + qq!!. ''; } $html .= ''; -- cgit v1.2.1 From 0ff28424ec1178ba6369d643d3b5f43d51a17514 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 11 Jun 2002 08:29:09 +0000 Subject: add crypt option to (bsd|sysv)shell export --- httemplate/edit/part_export.cgi | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index af89c4ead..fbc698e8b 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -45,15 +45,30 @@ my $widget = new HTML::Widgets::SelectLayers( if $layer; foreach my $option ( keys %{$exports->{$layer}{options}} ) { -# foreach my $option ( qw(url login password groupID ) ) { my $optinfo = $exports->{$layer}{options}{$option}; my $label = $optinfo->{label}; + my $type = defined($optinfo->{type}) ? $optinfo->{type} : 'text'; my $value = $cgi->param($option) || $part_export->option($option) || (exists $optinfo->{default} ? $optinfo->{default} : ''); - $html .= qq!$label!. - qq!!. - ''; + $html .= qq!$label!; + if ( $type eq 'select' ) { + $html .= qq!'; + } elsif ( $type eq 'text' ) { + $html .= qq!!; + } else { + $html .= "unknown type $type"; + } + $html .= ''; } $html .= ''; -- cgit v1.2.1 From cf6020a0c273d549d33f3e9999bd8b68d9b6d133 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 20 Jun 2002 01:29:21 +0000 Subject: shellcommands w/passwords --- httemplate/edit/part_export.cgi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index fbc698e8b..486bd4300 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -63,6 +63,8 @@ my $widget = new HTML::Widgets::SelectLayers( #} } $html .= ''; + } elsif ( $type eq 'textarea' ) { + $html .= qq!!; } elsif ( $type eq 'text' ) { $html .= qq!!; } else { -- cgit v1.2.1 From 86dccb51c86156fcf06b981a48fd2a40d204cc53 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 24 Aug 2002 07:20:24 +0000 Subject: don't substitute defaults for empty options when editing exports --- httemplate/edit/part_export.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 486bd4300..bd427aa40 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -50,7 +50,10 @@ my $widget = new HTML::Widgets::SelectLayers( my $type = defined($optinfo->{type}) ? $optinfo->{type} : 'text'; my $value = $cgi->param($option) || $part_export->option($option) - || (exists $optinfo->{default} ? $optinfo->{default} : ''); + || ( (exists $optinfo->{default} && !$part_export->exportnum) + ? $optinfo->{default} + : '' + ); $html .= qq!$label!; if ( $type eq 'select' ) { $html .= qq!!; } elsif ( $type eq 'text' ) { $html .= qq!!; + } elsif ( $type eq 'checkbox' ) { + $html .= qq!!; } else { $html .= "unknown type $type"; } -- cgit v1.2.1 From 27ee26568a1a58b0fb65b7269a43cd3da6d66b35 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 13 Jan 2003 07:26:52 +0000 Subject: another Pg 7.3 fix --- httemplate/edit/part_export.cgi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index d64526dd4..bdf41e2b2 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -49,11 +49,11 @@ my $widget = new HTML::Widgets::SelectLayers( my $label = $optinfo->{label}; my $type = defined($optinfo->{type}) ? $optinfo->{type} : 'text'; my $value = $cgi->param($option) - || $part_export->option($option) - || ( (exists $optinfo->{default} && !$part_export->exportnum) - ? $optinfo->{default} - : '' - ); + || ( $part_export->exportnum && $part_export->option($option) ) + || ( (exists $optinfo->{default} && !$part_export->exportnum) + ? $optinfo->{default} + : '' + ); $html .= qq!$label!; if ( $type eq 'select' ) { $html .= qq!'; } elsif ( $type eq 'textarea' ) { - $html .= qq!!; + $html .= qq!!; } elsif ( $type eq 'text' ) { $html .= qq!!; } elsif ( $type eq 'checkbox' ) { -- cgit v1.2.1 From 7f938ee850989e3bb2405dffaff72ede945b9f08 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 20 Mar 2003 04:09:12 +0000 Subject: wrap this textbox hard --- httemplate/edit/part_export.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 8a829e57a..31d6134e2 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -67,7 +67,8 @@ my $widget = new HTML::Widgets::SelectLayers( } $html .= ''; } elsif ( $type eq 'textarea' ) { - $html .= qq!!; + $html .= qq!!; } elsif ( $type eq 'text' ) { $html .= qq!!; } elsif ( $type eq 'checkbox' ) { -- cgit v1.2.1 From 6b081fe282b98f7075b83c107bc598d4fa3b7b2f Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 20 Mar 2003 04:36:23 +0000 Subject: virtual wrap... --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 31d6134e2..839a114fb 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -67,7 +67,7 @@ my $widget = new HTML::Widgets::SelectLayers( } $html .= ''; } elsif ( $type eq 'textarea' ) { - $html .= qq!!; } elsif ( $type eq 'text' ) { $html .= qq!!; -- cgit v1.2.1 From f1324d535989205477e37d701c910b12c045687b Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 22 Apr 2003 17:55:09 +0000 Subject: mason is more strict about variables - patch from Richard Siddall, thanks --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 839a114fb..4defbc86f 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -60,7 +60,7 @@ my $widget = new HTML::Widgets::SelectLayers( foreach my $select_option ( @{$optinfo->{options}} ) { #if ( ref($select_option) ) { #} else { - $selected = $select_option eq $value ? ' SELECTED' : ''; + my $selected = $select_option eq $value ? ' SELECTED' : ''; $html .= qq!!; #} -- cgit v1.2.1 From 499b8660e2aa5632fc14e8fcfa6631800ade1e35 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 13 Jun 2003 08:44:52 +0000 Subject: correct stickiness for checkbox options on export edit --- httemplate/edit/part_export.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 4defbc86f..0590549f5 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -72,7 +72,9 @@ my $widget = new HTML::Widgets::SelectLayers( } elsif ( $type eq 'text' ) { $html .= qq!!; } elsif ( $type eq 'checkbox' ) { - $html .= qq!!; + $html .= qq! Date: Fri, 13 Jun 2003 08:46:19 +0000 Subject: missing semi --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 0590549f5..24d646b8b 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -72,7 +72,7 @@ my $widget = new HTML::Widgets::SelectLayers( } elsif ( $type eq 'text' ) { $html .= qq!!; } elsif ( $type eq 'checkbox' ) { - $html .= qq! Date: Tue, 1 Jul 2003 09:00:45 +0000 Subject: larger textareas in export options --- httemplate/edit/part_export.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 24d646b8b..cc60f1aeb 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -67,7 +67,7 @@ my $widget = new HTML::Widgets::SelectLayers( } $html .= ''; } elsif ( $type eq 'textarea' ) { - $html .= qq!!; } elsif ( $type eq 'text' ) { $html .= qq!!; -- cgit v1.2.1 From 24d7a586d33a5561b44ae0cfef07afb649b6fcbc Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 24 Nov 2003 14:29:01 +0000 Subject: fix html quoting problems --- httemplate/edit/part_export.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index cc60f1aeb..4d0c7391f 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -68,9 +68,10 @@ my $widget = new HTML::Widgets::SelectLayers( $html .= ''; } elsif ( $type eq 'textarea' ) { $html .= qq!!; + encode_entities($value). ''; } elsif ( $type eq 'text' ) { - $html .= qq!!; + $html .= qq!'; } elsif ( $type eq 'checkbox' ) { $html .= qq! Date: Wed, 24 Mar 2004 15:38:48 +0000 Subject: catch misconfigured exports --- httemplate/edit/part_export.cgi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/edit/part_export.cgi') diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi index 4d0c7391f..b3d42bd96 100644 --- a/httemplate/edit/part_export.cgi +++ b/httemplate/edit/part_export.cgi @@ -46,6 +46,8 @@ my $widget = new HTML::Widgets::SelectLayers( foreach my $option ( keys %{$exports->{$layer}{options}} ) { my $optinfo = $exports->{$layer}{options}{$option}; + die "Retreived non-ref export info option from $layer export: $optinfo" + unless ref($optinfo); my $label = $optinfo->{label}; my $type = defined($optinfo->{type}) ? $optinfo->{type} : 'text'; my $value = $cgi->param($option) -- cgit v1.2.1