--- loncom/interface/lonmanagekeys.pm	2009/02/19 22:11:53	1.23
+++ loncom/interface/lonmanagekeys.pm	2014/12/11 01:48:54	1.27
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to manage course access keys 
 #
-# $Id: lonmanagekeys.pm,v 1.23 2009/02/19 22:11:53 schafran Exp $
+# $Id: lonmanagekeys.pm,v 1.27 2014/12/11 01:48:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -41,7 +41,13 @@ use Apache::lonlocal;
 ###############################################################
 ###############################################################
 sub header {
-    my $start_page=&Apache::loncommon::start_page('Access Key Management');
+    # Breadcrumbs
+    my $brcrum = [{'href' => '/adm/managekeys',
+                   'text' => 'Access Key Management'}];
+
+    my $start_page=&Apache::loncommon::start_page('Access Key Management',
+                                                  undef,
+                                                  {'bread_crumbs' => $brcrum,});
     return(<<ENDHEAD);
 $start_page
 <form method="post" enctype="multipart/form-data"  
@@ -72,11 +78,11 @@ sub show_key_list {
 <th>Comments/Remarks/Notes</th>
 <th>Enter Additional Comments/Remarks/Notes<br />
 <input type="text" size="40" name="copyall" />
-<input type="button" value="Copy to All" onClick="copyallcom(this.form);" />
+<input type="button" value="Copy to All" onclick="copyallcom(this.form);" />
 </th></tr>
 ENDTABLEHEADER
     }
-    foreach (keys %accesskeys) {
+    foreach (keys(%accesskeys)) {
         if ($_=~/^error\:/) {
 	    $r->print('<tr><td>No keys have been generated yet.</td></tr>');
         } elsif ($accesskeys{$_}=~/$comment/) {
@@ -153,7 +159,7 @@ sub addcom {
     my %cenv=@_;
     my %newcomment=();
     undef %newcomment;
-    foreach (keys %env) {
+    foreach (keys(%env)) {
 	if ($_=~/^form\.com\_(.+)$/) {
             my $key=$1;
 	    my $comment=$env{$_};
@@ -272,16 +278,23 @@ ENDKEYMENU
 	&Apache::loncommon::content_type($r,'text/html');
 	$r->send_http_header;
 	$r->print(&header().&Apache::loncommon::coursebrowser_javascript());
-        $r->print('<table><tr><td>'
-   .&mt('Course ID of Key Authority').':</td><td> <input input type="text" size="25" name="course" value="" />');
-        $r->print(&Apache::loncommon::selectcourse_link(
-					        'keyform','course','domain',
-                                                undef,undef,undef,'Course'));
-        $r->print('</td></tr>');
-        $r->print('<tr><td>'.&mt('Domain').':</td><td> '.&Apache::loncommon::select_dom_form(
-               $env{'request.role.domain'},'domain'));
-        $r->print('</td></tr></table><input type="submit" value="'.&mt('Next').'" />');
-	$r->print('</form>'.&Apache::loncommon::end_page());
+        $r->print('<br />');
+        $r->print(&Apache::lonhtmlcommon::start_pick_box()
+                 .&Apache::lonhtmlcommon::row_title(&mt('Course ID of Key Authority'))
+                 .'<input input type="text" size="25" name="course" value="" />'
+                 .' '.&Apache::loncommon::selectcourse_link(
+                          'keyform','course','domain',
+                          undef,undef,undef,'Course')
+                 .&Apache::lonhtmlcommon::row_closure()
+                 .&Apache::lonhtmlcommon::row_title(&mt('Domain'))
+                 .&Apache::loncommon::select_dom_form($env{'request.role.domain'},'domain')
+                 .&Apache::lonhtmlcommon::row_closure(1)
+                 .&Apache::lonhtmlcommon::end_pick_box()
+        );
+        $r->print('<input type="submit" value="'.&mt('Next').'" />'
+                .'</form>'
+                .&Apache::loncommon::end_page()
+        );
     }
     return OK;
 }