diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2018-10-31 12:04:43 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-10-31 12:04:43 -0700 |
| commit | d2ea891f4e914f17f5c094ffc3adc9d6ae2bbaed (patch) | |
| tree | a1a86740e3dd1b60d29f13b415862fce4d9c991d | |
| parent | 09e6ae36f7ba0f3571dc5f890959365e16de110a (diff) | |
textarea for SQL external statements, RT#78543
| -rw-r--r-- | FS/FS/part_pkg/sql_external.pm | 1 | ||||
| -rwxr-xr-x | httemplate/edit/part_pkg.cgi | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/FS/FS/part_pkg/sql_external.pm b/FS/FS/part_pkg/sql_external.pm index 575a08902..1ead113d0 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 7c4a5e665..f9cfee807 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -864,6 +864,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 !. |
