version 1.248.2.1, 2008/12/10 22:47:31
|
version 1.248.2.2, 2008/12/10 22:54:12
|
Line 427 sub end_hiddenline {
|
Line 427 sub end_hiddenline {
|
# $part -> partid |
# $part -> partid |
# $id -> responseid |
# $id -> responseid |
# $uploadefiletypes -> comma seperated list of extensions allowed or * for any |
# $uploadefiletypes -> comma seperated list of extensions allowed or * for any |
# $which -> 'uploadedonly' -> only newly uploaded files |
# $which -> 'uploadonly' -> only newly uploaded files |
# 'portfolioonly' -> only allow files from portfolio |
# 'portfolioonly' -> only allow files from portfolio |
# 'both' -> allow files from either location |
# 'both' -> allow files from either location |
# $extratext -> additional text to go between the link and the input box |
# $extratext -> additional text to go between the link and the input box |
|
# $maxfilesize -> maximum cumulative filesize for submitted files (in MB). |
# returns a table row <tr> |
# returns a table row <tr> |
sub file_selector { |
sub file_selector { |
my ($part,$id,$uploadedfiletypes,$which,$extratext)=@_; |
my ($part,$id,$uploadedfiletypes,$which,$extratext,$maxfilesize)=@_; |
if (!$uploadedfiletypes) { return ''; } |
if (!$uploadedfiletypes) { return ''; } |
|
|
my $jspart=$part; |
my $jspart=$part; |
Line 442 sub file_selector {
|
Line 443 sub file_selector {
|
my $result; |
my $result; |
|
|
$result.='<tr><td>'; |
$result.='<tr><td>'; |
if ($uploadedfiletypes ne '*') { |
if (($uploadedfiletypes ne '*') || ($maxfilesize)) { |
$result.= |
if ($uploadedfiletypes ne '*') { |
&mt('Allowed filetypes: <b>[_1]</b>',$uploadedfiletypes).'<br />'; |
$result.= |
|
&mt('Allowed filetypes: [_1]','<b>'.$uploadedfiletypes.'</b>').'<br />'; |
|
} |
|
if ($maxfilesize) { |
|
$result.=&mt('Combined size of files not to exceed: [_1] MB[_2].', |
|
'<b>'.$maxfilesize.'</b>').'<br />'; |
|
} |
|
$result .= '<br />'; |
} |
} |
if ($which eq 'uploadonly' || $which eq 'both') { |
if ($which eq 'uploadonly' || $which eq 'both') { |
$result.=&mt('Submit a file: (only one file can be uploaded)'). |
$result.=&mt('Submit a file: (only one file can be uploaded)'). |
Line 461 sub file_selector {
|
Line 469 sub file_selector {
|
'<input type="text" size="50" name="HWPORT'.$jspart.'_'.$id.'" value="" />'. |
'<input type="text" size="50" name="HWPORT'.$jspart.'_'.$id.'" value="" />'. |
'<br />'; |
'<br />'; |
$result .= &show_past_portfile_submission($part,$id); |
$result .= &show_past_portfile_submission($part,$id); |
|
|
} |
} |
$result.='</td></tr>'; |
$result.='</td></tr>'; |
return $result; |
return $result; |