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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 30 Jun 2003 17:17:30 -0000


albertel		Mon Jun 30 13:17:30 2003 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  - use dropdowns in metadata defaults editor. (Mark Lucas) BUG#1897
  
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.31 loncom/interface/lonmeta.pm:1.32
--- loncom/interface/lonmeta.pm:1.31	Mon Apr 14 20:53:04 2003
+++ loncom/interface/lonmeta.pm	Mon Jun 30 13:17:30 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.31 2003/04/15 00:53:04 www Exp $
+# $Id: lonmeta.pm,v 1.32 2003/06/30 17:17:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -434,9 +434,20 @@
        if ($ENV{'form.new_'.$_}) {
 	   $Apache::lonpublisher::metadatafields{$_}=$ENV{'form.new_'.$_};
        }
-       $r->print(
-         &Apache::lonpublisher::textfield($_,'new_'.$_,
-                                 $Apache::lonpublisher::metadatafields{$_}));
+       if (m/copyright/) {
+	   $r->print(&Apache::lonpublisher::selectbox($_,'new_'.$_,
+			       $Apache::lonpublisher::metadatafields{$_},
+			       \&Apache::loncommon::copyrightdescription,
+			       (&Apache::loncommon::copyrightids)));
+       } elsif (m/language/) {
+	   $r->print(&Apache::lonpublisher::selectbox($_,'new_'.$_,
+			      $Apache::lonpublisher::metadatafields{$_},
+			      \&Apache::loncommon::languagedescription,
+			      (&Apache::loncommon::languageids)));
+       } else {
+	   $r->print(&Apache::lonpublisher::textfield($_,'new_'.$_,
+			     $Apache::lonpublisher::metadatafields{$_}));
+       }
    }
    if ($ENV{'form.store'}) {
       my $mfh;