summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/browse/part_pkg.cgi1
-rwxr-xr-xhttemplate/browse/part_svc.cgi2
-rwxr-xr-xhttemplate/edit/part_pkg.cgi23
-rw-r--r--httemplate/elements/email-link.html3
-rw-r--r--httemplate/elements/form-create_ticket.html2
-rwxr-xr-xhttemplate/search/cust_bill.html4
6 files changed, 22 insertions, 13 deletions
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index c2f1430d7..07f104e55 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -591,6 +591,7 @@ push @fields,
},
];
}
+ sort
grep { $options{$_} =~ /\S/ }
grep { $_ !~ /^(setup|recur)_fee$/
and $_ !~ /^report_option_\d+$/ }
diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi
index ec5f321dd..88f8d8d19 100755
--- a/httemplate/browse/part_svc.cgi
+++ b/httemplate/browse/part_svc.cgi
@@ -161,7 +161,7 @@ function part_export_areyousure(href) {
% }
%
% my($n1)='';
-% foreach my $field ( @fields ) {
+% foreach my $field ( sort @fields ) {
%
% #a few lines of false laziness w/edit/part_svc.cgi
% my $def = FS::part_svc->svc_table_fields($svcdb)->{$field};
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 9f5510d65..570c5ac75 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -989,9 +989,13 @@ my $html_bottom = sub {
#$html .= '</SELECT></TD></TR>';
my $href = $plans{$layer}->{'fields'};
- my @fields = exists($plans{$layer}->{'fieldorder'})
- ? @{$plans{$layer}->{'fieldorder'}}
- : keys %{ $href };
+ my @fields;
+ if ( $plans{$layer}->{'fieldorder'} ) {
+ @fields = @{ $plans{$layer}->{'fieldorder'} };
+ } else {
+ warn "FS::part_pkg::$layer has no fieldorder.\n";
+ @fields = keys %$href;
+ }
# hash of dependencies for each of the Pricing Plan fields.
# make sure NOT to use double-quotes inside the 'msg' value.
@@ -1015,7 +1019,7 @@ my $html_bottom = sub {
}
}
};
-
+
foreach my $field ( grep $_ !~ /^(setup|recur)_fee$/, @fields ) {
if(!exists($href->{$field})) {
@@ -1029,7 +1033,8 @@ my $html_bottom = sub {
next if !$display;
}
- $html .= '<TR><TD ALIGN="right">'. $href->{$field}{'name'}. '</TD><TD>';
+ $html .= '<TR><TD ALIGN="right">'. $href->{$field}{'name'}. '</TD><TD>
+ ';
my $format = sub { shift };
$format = $href->{$field}{'format'} if exists($href->{$field}{'format'});
@@ -1128,9 +1133,11 @@ my $html_bottom = sub {
$html .= '</TD></TR>';
}
$html .= '</TABLE>';
-
- $html .= qq(<INPUT TYPE="hidden" NAME="${layer}__OPTIONS" VALUE=").
- join(',', keys %{ $href } ). '">';
+
+ $html .= include('/elements/hidden.html',
+ field => $layer.'__OPTIONS',
+ value => join(',', @fields)
+ );
$html;
diff --git a/httemplate/elements/email-link.html b/httemplate/elements/email-link.html
index 2612faabb..16935cf98 100644
--- a/httemplate/elements/email-link.html
+++ b/httemplate/elements/email-link.html
@@ -10,7 +10,8 @@ die "'table' required" if !$table;
die "'search_hash' required" if !$search_hash;
my $uri = new URI;
-$uri->query_form($search_hash);
+my @params = map { $_, $search_hash->{$_} } sort keys %$search_hash;
+$uri->query_form(@params);
my $query = $uri->query;
my $label = ($opt{'label'} || 'Email a notice to these customers');
</%init>
diff --git a/httemplate/elements/form-create_ticket.html b/httemplate/elements/form-create_ticket.html
index 362e82397..d76c0d83e 100644
--- a/httemplate/elements/form-create_ticket.html
+++ b/httemplate/elements/form-create_ticket.html
@@ -6,7 +6,7 @@ function updateTicketLink() {
link.href = "<% $new_base.'?'.
join(';', map(
{ ($_ eq 'Queue') ? () : "$_=$new_param{$_}"}
- keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value;
+ sort keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value;
}
</SCRIPT>
<A NAME="tickets"><FONT CLASS="fsinnerbox-title">Tickets</FONT></A>
diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html
index 017e8298f..6e3617b28 100755
--- a/httemplate/search/cust_bill.html
+++ b/httemplate/search/cust_bill.html
@@ -196,7 +196,7 @@ my $html_init = join("\n", map {
( my $action = $_ ) =~ s/_$//;
include('/elements/progress-init.html',
$_.'form',
- [ keys %search ],
+ [ sort keys %search ],
"../misc/${_}invoices.cgi",
{ 'message' => "Invoices re-${action}ed" }, #would be nice to show the number of them, but...
$_, #key
@@ -206,7 +206,7 @@ my $html_init = join("\n", map {
my @values = ref($search{$f}) ? @{ $search{$f} } : $search{$f};
map qq!<INPUT TYPE="hidden" NAME="$f" VALUE="$_">!, @values;
}
- keys %search
+ sort keys %search
),
qq!</FORM>!
} qw( print_ email_ fax_ ftp_ spool_ ) ).