[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm

banghart lon-capa-cvs@mail.lon-capa.org
Wed, 22 Nov 2006 20:16:18 -0000


banghart		Wed Nov 22 15:16:18 2006 EDT

  Modified files:              
    /loncom/publisher	lonpubdir.pm 
  Log:
  	Bug 5078. Populate field with oldname when renaming resource
  	in construction space.
  
  
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.95 loncom/publisher/lonpubdir.pm:1.96
--- loncom/publisher/lonpubdir.pm:1.95	Wed Sep 13 17:43:26 2006
+++ loncom/publisher/lonpubdir.pm	Wed Nov 22 15:16:16 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.95 2006/09/13 21:43:26 albertel Exp $
+# $Id: lonpubdir.pm,v 1.96 2006/11/22 20:16:16 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -309,7 +309,8 @@
       return
     }
     function changename(theform,activity) {
-        var newname=prompt('New Name');
+        var oldname=theform.dispfilename.value;
+        var newname=prompt('New Name',oldname);
         if (newname == "" || !newname)  {
             return
         }
@@ -712,7 +713,9 @@
 '<option value="print">'.&mt('Print').'</option>'.
 '</select>
 <input type="hidden" name="filename" value="/~'.
- &HTML::Entities::encode($uname.$thisdisfn.'/'.$filename,'<>&"').'" /></form>';
+ &HTML::Entities::encode($uname.$thisdisfn.'/'.$filename,'<>&"').'" />
+ <input type="hidden" name="dispfilename" value="'.
+ &HTML::Entities::encode($filename).'"</form>';
     $$numres ++;
 }