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

amueller amueller@source.lon-capa.org
Sat, 12 Dec 2009 14:45:42 -0000


amueller		Sat Dec 12 14:45:42 2009 EDT

  Modified files:              
    /loncom/interface	lonsimplepage.pm 
  Log:
  -Upload a Photo wrapped in a template Box.
  
  
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.88 loncom/interface/lonsimplepage.pm:1.89
--- loncom/interface/lonsimplepage.pm:1.88	Tue Dec  8 12:20:49 2009
+++ loncom/interface/lonsimplepage.pm	Sat Dec 12 14:45:42 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.88 2009/12/08 12:20:49 amueller Exp $
+# $Id: lonsimplepage.pm,v 1.89 2009/12/12 14:45:42 amueller Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -337,12 +337,17 @@
         }
 
         if ($allowed) {
-            $r->print(
-                  '<input type="hidden" name="forceedit" value="edit" />'.
-                  '<h3>'.&mt('Upload a Photo').'</h3>'.
-                  '<input type="file" name="uploaddoc" size="50" />'.
-                  '<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'.
-                  '<input type="hidden" name="forceedit" value="edit" />');
+            $r->print('<input type="hidden" name="forceedit" value="edit" />');
+            my $upload_photo_label = &mt('Upload a Photo');
+            my $upload_button_label = &mt('Upload');
+
+            my $content_for_upload_photo=<<"UPLOAD_PHOTO";
+                  <input type="file" name="uploaddoc" size="50" />
+                  <input type="submit" name="storeupl" value="$upload_button_label" />
+                  <input type="hidden" name="forceedit" value="edit" />
+UPLOAD_PHOTO
+            &Apache::lontemplate::print_template($r, $upload_photo_label,$content_for_upload_photo,$allowed, 'LC_Box');
+
 #            if ($syllabus{'uploaded.photourl'}) {
 #                $r->print('<input type="submit" name="delupl"'
 #                         .' value="'.&mt('Delete Photo').'" />');