remove dependancy on private CGI function
This commit is contained in:
parent
74aace1e41
commit
759c93cbe3
1 changed files with 30 additions and 6 deletions
|
|
@ -15,7 +15,6 @@ package WebGUI::HTMLForm;
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use CGI::Util qw(rearrange);
|
|
||||||
use WebGUI::Form;
|
use WebGUI::Form;
|
||||||
use WebGUI::International;
|
use WebGUI::International;
|
||||||
use WebGUI::Pluggable;
|
use WebGUI::Pluggable;
|
||||||
|
|
@ -304,12 +303,37 @@ The UI level for this field. See the WebGUI developer's site for details. Defaul
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub raw {
|
sub _rearrange {
|
||||||
my ($self, @p) = @_;
|
my $keys = shift;
|
||||||
my ($value, $uiLevel) = rearrange([qw(value uiLevel)], @p);
|
my @keys = @$keys;
|
||||||
if ($self->_uiLevelChecksOut($uiLevel)) {
|
my @params = @_;
|
||||||
$self->{_data} .= $value;
|
|
||||||
|
for (@keys) {
|
||||||
|
s/^-//;
|
||||||
|
$_ = lc $_;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ref $params[0] ne 'HASH') {
|
||||||
|
return @params;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
my $params = shift;
|
||||||
|
my %params;
|
||||||
|
for my $key (%$params) {
|
||||||
|
(my $newkey = lc $key) =~ s/^-//;
|
||||||
|
$params{$newkey} = $params->{$key};
|
||||||
}
|
}
|
||||||
|
return @params{@keys};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub raw {
|
||||||
|
my $self = shift;
|
||||||
|
my ($value, $uiLevel) = _rearrange([qw(value uiLevel)], @_);
|
||||||
|
|
||||||
|
if ($self->_uiLevelChecksOut($uiLevel)) {
|
||||||
|
$self->{_data} .= $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue