Skip to content
This repository
tag: REL_4_9_2
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 35 lines (32 sloc) 0.975 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
CodeDef uploadhelper Widget 1
CodeDef uploadhelper Routine <<EOR
sub {
# $column, $value, $record->{outboard}, $record->{width}
    my ($opt) = @_;
my $name = $opt->{name};
my $val = $opt->{value};
my $path = $opt->{path} || $opt->{outboard};
my $size = $opt->{cols} || $opt->{width};

$path =~ s:^/+::;
my $view_url;
$size = qq{ SIZE="$size"} if $size > 0;
my $out = '';
    if ($val) {
if($path) {
my $base = $::Variable->{UI_BASE} || 'admin';
my $view_url = Vend::Interpolate::tag_area("$base/do_view", "$path/$val");
$out .= qq{<A HREF="$view_url">};
}
$out .= $val;
$out .= "</A>" if $path;
$out .= qq{&nbsp;<INPUT TYPE=file NAME="$name" VALUE="$val">
<INPUT TYPE=hidden NAME="ui_upload_file_path:$name" VALUE="$path">
<INPUT TYPE=hidden NAME="$name" VALUE="$val">};
    }
else {
        $out = qq{<INPUT TYPE=hidden NAME="ui_upload_file_path:$name" VALUE="$path">
<INPUT TYPE=file NAME="$name"$size>};
    }
return $out;
}
EOR

Something went wrong with that request. Please try again.