summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/config/config-download.cgi18
-rw-r--r--httemplate/config/config-process.cgi12
-rw-r--r--httemplate/config/config-view.cgi8
-rw-r--r--httemplate/config/config.cgi6
-rw-r--r--httemplate/docs/man/FS/part_export/.cvs_is_on_crack0
-rwxr-xr-xhttemplate/edit/part_pkg.cgi44
-rwxr-xr-xhttemplate/edit/process/part_pkg.cgi2
7 files changed, 27 insertions, 63 deletions
diff --git a/httemplate/config/config-download.cgi b/httemplate/config/config-download.cgi
deleted file mode 100644
index 95a172a51..000000000
--- a/httemplate/config/config-download.cgi
+++ /dev/null
@@ -1,18 +0,0 @@
-%
-%
-%my $conf=new FS::Conf;
-%
-%http_header('Content-Type' => 'application/x-unknown' );
-%
-%die "No configuration variable specified (bad URL)!" # umm
-% unless $cgi->keywords;
-%my($query) = $cgi->keywords;
-%$query =~ /^([\w -\)+-\/@;:?=[\]]+)$/;
-%my $name = $1;
-%
-%http_header('Content-Disposition' => "attachment; filename=$name" );
-% print $conf->config_binary($name);
-<%init>
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-</%init>
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi
index 3e49b4f99..d8f0d8e93 100644
--- a/httemplate/config/config-process.cgi
+++ b/httemplate/config/config-process.cgi
@@ -1,4 +1,5 @@
<%init>
+
die "access denied\n"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
@@ -27,16 +28,6 @@ foreach my $i ( @config_items ) {
} else {
$conf->delete($i->key);
}
- } elsif ( $type eq 'binary' ) {
- if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) {
- my $fh = $cgi->upload($i->key. $n);
- if (defined($fh)) {
- local $/;
- $conf->set_binary($i->key, <$fh>);
- }
- }else{
- warn "Condition failed for " . $i->key;
- }
} elsif ( $type eq 'checkbox' ) {
# if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) {
if ( defined $cgi->param($i->key. $n) ) {
@@ -66,5 +57,6 @@ foreach my $i ( @config_items ) {
$conf->touch($_) foreach @touch;
$conf->delete($_) foreach @delete;
}
+
</%init>
<% $cgi->redirect("config-view.cgi") %>
diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi
index 7f2a1b293..91ba33769 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -42,14 +42,6 @@
<tr>
<td><font color="#ff0000">no type</font></td>
</tr>
-% } elsif ( $type eq 'binary' ) {
-
- <tr>
- <% $conf->exists($i->key)
- ? qq!<a href="config-download.cgi?!. $i->key. qq!">download</a>!
- : 'empty'
- %>
- </tr>
% } elsif ( $type eq 'textarea'
% || $type eq 'editlist'
% || $type eq 'selectmultiple' ) {
diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi
index df9af47a6..6c3a51aca 100644
--- a/httemplate/config/config.cgi
+++ b/httemplate/config/config.cgi
@@ -21,7 +21,7 @@ function SafeOnsubmit() {
% my $conf = new FS::Conf; my @config_items = $conf->config_items;
-<form name="OneTrueForm" action="config-process.cgi" METHOD="POST" enctype="multipart/form-data" onSubmit="SafeOnsubmit()">
+<form name="OneTrueForm" action="config-process.cgi" METHOD="POST" onSubmit="SafeOnsubmit()">
% foreach my $section ( qw(required billing username password UI session
% shell BIND
% ),
@@ -61,10 +61,6 @@ function SafeOnsubmit() {
<font color="#ff0000">no type</font>
-% } elsif ( $type eq 'binary' ) {
-
-
- Filename <input type="file" name="<% $i->key. $n %>">
% } elsif ( $type eq 'textarea' ) {
diff --git a/httemplate/docs/man/FS/part_export/.cvs_is_on_crack b/httemplate/docs/man/FS/part_export/.cvs_is_on_crack
deleted file mode 100644
index e69de29bb..000000000
--- a/httemplate/docs/man/FS/part_export/.cvs_is_on_crack
+++ /dev/null
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index ce3e8547f..77822d7e0 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -159,23 +159,23 @@ Line-item revenue recognition
</TD><TD VALIGN="top">
-Reseller information
-<% ntable("#cccccc", 2) %>
- <TR>
- <TD ALIGN="right"><% 'Agent Types' %></TD>
- <TD>
- <% include( '/elements/select-table.html',
- 'element_name' => 'agent_type',
- 'table' => 'agent_type',
- 'name_col' => 'atype',
- 'value' => \@agent_type,
- 'empty_label' => '(none)',
- 'element_etc' => 'multiple size="10"',
- )
- %>
- </TD>
- </TR>
-</TABLE>
+%#Reseller information # after 1.7.2
+%#<% ntable("#cccccc", 2) %>
+%# <TR>
+%# <TD ALIGN="right"><% 'Agent Types' %></TD>
+%# <TD>
+%# <% include( '/elements/select-table.html',
+%# 'element_name' => 'agent_type',
+%# 'table' => 'agent_type',
+%# 'name_col' => 'atype',
+%# 'value' => \@agent_type,
+%# 'empty_label' => '(none)',
+%# 'element_etc' => 'multiple size="10"',
+%# )
+%# %>
+%# </TD>
+%# </TR>
+%#</TABLE>
</TD></TR></TABLE>
%
%
@@ -271,7 +271,9 @@ Reseller information
%#} else {
%# push @fixups, 'taxclass'; #hidden
%#}
-%my @form_elements = ( 'classnum', 'taxclass', 'agent_type' );
+%my @form_elements = ( 'classnum', 'taxclass' );
+%# copying non-existant elements is probably harmless, but after 1.7.2
+%#my @form_elements = ( 'classnum', 'taxclass', 'agent_type' );
%
%my @form_radio = ();
%if ( dbdef->table('pkg_svc')->column('primary_svc') ) {
@@ -328,7 +330,7 @@ Reseller information
% ( exists($plandata{$field})
% ? $plandata{$field}
% : $href->{$field}{'default'} ).
-% qq!">!;
+% qq!" onChange="fchanged(this)">!; #after 1.7.2
% } elsif ( $href->{$field}{'type'} eq 'checkbox' ) {
% $html .= qq!<INPUT TYPE="checkbox" NAME="$field" VALUE=1 !.
% ( exists($plandata{$field}) && $plandata{$field}
@@ -339,7 +341,7 @@ Reseller information
% $html .= '<SELECT';
% $html .= ' MULTIPLE'
% if $href->{$field}{'type'} eq 'select_multiple';
-% $html .= qq! NAME="$field">!;
+% $html .= qq! NAME="$field" onChange="fchanged(this)">!; # after 1.7.2
%
% if ( $href->{$field}{'select_table'} ) {
% foreach my $record (
@@ -383,7 +385,7 @@ Reseller information
%
% $html .= '<INPUT TYPE="submit" VALUE="'.
% ( $hashref->{pkgpart} ? "Apply changes" : "Add package" ).
-% '">';
+% '" onClick="fchanged(this)">'; #after 1.7.2
%
% $html;
%
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi
index 1158222b6..55e7e05ae 100755
--- a/httemplate/edit/process/part_pkg.cgi
+++ b/httemplate/edit/process/part_pkg.cgi
@@ -55,7 +55,7 @@
% $pkgpart = $new->pkgpart;
%}
%
-%unless ($error) {
+%unless (1 || $error) { # after 1.7.2
% my $error = $new->process_m2m(
% 'link_table' => 'type_pkgs',
% 'target_table' => 'agent_type',