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

amueller amueller@source.lon-capa.org
Thu, 07 May 2009 16:20:37 -0000


amueller		Thu May  7 16:20:37 2009 EDT

  Modified files:              
    /loncom/interface	lonsimplepage.pm 
  Log:
  The delete Button for your picture only appears if you uploaded a picture before.
  
  
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.78 loncom/interface/lonsimplepage.pm:1.79
--- loncom/interface/lonsimplepage.pm:1.78	Wed Apr 15 10:49:30 2009
+++ loncom/interface/lonsimplepage.pm	Thu May  7 16:20:37 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.78 2009/04/15 10:49:30 bisitz Exp $
+# $Id: lonsimplepage.pm,v 1.79 2009/05/07 16:20:37 amueller Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -311,8 +311,10 @@
 		      '<input type="file" name="uploaddoc" size="50" />'.
 		      '<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'.
 		      '</form><form method="post">'.
-                      '<input type="hidden" name="forceedit" value="edit" />'.
-		      '<form method="post"><input type="submit" name="delupl" value="'.&mt('Delete Photo').'" />' );
+                      '<input type="hidden" name="forceedit" value="edit" />');
+        if($syllabus{'uploaded.photourl'}) {
+		      $r->print('<form method="post"><input type="submit" name="delupl" value="'.&mt('Delete Photo').'" />' );
+        }
 	}
 	if($allowed){
                $r->print($image.'<div class="clear">&nbsp;</div>');