[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm

banghart lon-capa-cvs@mail.lon-capa.org
Thu, 09 Sep 2004 17:53:59 -0000


banghart		Thu Sep  9 13:53:59 2004 EDT

  Modified files:              
    /loncom/interface	portfolio.pm 
  Log:
  
  	Added explanatory message if user clicks Upload with no file
  	selected.
  
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.39 loncom/interface/portfolio.pm:1.40
--- loncom/interface/portfolio.pm:1.39	Wed Sep  8 16:34:28 2004
+++ loncom/interface/portfolio.pm	Thu Sep  9 13:53:59 2004
@@ -356,6 +356,11 @@
 	     &Apache::lonnet::mkdiruserfile($ENV{'user.name'},
 	     $ENV{'user.domain'},'portfolio');
 	}
+	if (($ENV{'form.storeupl'} eq 'Upload') & (!$ENV{'form.uploaddoc.filename'})){
+   	    $r->print('<font color="red"> No file was selected to upload.'.
+   	            'To upload a file, click <strong>Browse...</strong>'.
+   	            ', select a file, then click <strong>Upload</strong>,</font>');
+	}
     if ($ENV{'form.uploaddoc.filename'}) {
 	&upload($r);
     } elsif ($ENV{'form.action'} eq 'delete' && $ENV{'form.confirmed'}) {