[freeside-commits] branch FREESIDE_4_BRANCH updated. 7b2b8052d52ede6900a1da79de670eacb966095a
Ivan Kohler
ivan at freeside.biz
Wed Oct 31 12:04:50 PDT 2018
The branch, FREESIDE_4_BRANCH has been updated
via 7b2b8052d52ede6900a1da79de670eacb966095a (commit)
from 54638c01852123edd816e1c6e50b3690f88fb7e3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7b2b8052d52ede6900a1da79de670eacb966095a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Oct 31 12:04:40 2018 -0700
textarea for SQL external statements, RT#78543
diff --git a/FS/FS/part_pkg/sql_external.pm b/FS/FS/part_pkg/sql_external.pm
index a3866f34e..3cdfe992e 100644
--- a/FS/FS/part_pkg/sql_external.pm
+++ b/FS/FS/part_pkg/sql_external.pm
@@ -44,6 +44,7 @@ our @detail_cols = ( qw(amount format duration phonenum accountcode
'default' => '',
},
'query' => { 'name' => 'SQL query',
+ 'type' => 'textarea',
'default' => '',
},
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 64a75252e..71ba46dcb 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -1000,6 +1000,14 @@ my $html_bottom = sub {
: $href->{$field}{'default'} ).
qq!">!;
+ } elsif ( $href->{$field}{'type'} eq 'textarea' ) {
+
+ $html .= qq!<TEXTAREA NAME="${layer}__$field">!.
+ ( exists($options{$field})
+ ? &$format($options{$field})
+ : $href->{$field}{'default'} ).
+ qq!</TEXTAREA>!;
+
} elsif ( $href->{$field}{'type'} eq 'checkbox' ) {
$html .= qq!<INPUT TYPE="checkbox" NAME="${layer}__$field" VALUE=1 !.
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/sql_external.pm | 1 +
httemplate/edit/part_pkg.cgi | 8 ++++++++
2 files changed, 9 insertions(+)
More information about the freeside-commits
mailing list