Diff for /loncom/interface/loncommon.pm between versions 1.1452 and 1.1458

version 1.1452, 2025/02/14 05:15:59 version 1.1458, 2025/02/20 01:09:33
Line 3075  sub select_level_form { Line 3075  sub select_level_form {
   
 =pod  =pod
   
 =item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled)  =item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled,$id)
   
 Returns a string containing a <select name='$name' size='1'> form to   Returns a string containing a <select name='$name' size='1'> form to 
 allow a user to select the domain to preform an operation in.    allow a user to select the domain to preform an operation in.  
Line 3094  The optional $excdoms is a reference to Line 3094  The optional $excdoms is a reference to
   
 The optional $disabled argument, if true, adds the disabled attribute to the select tag.  The optional $disabled argument, if true, adds the disabled attribute to the select tag.
   
   The option $id argument is the value (if any) to set as the (unique) id attribute for the select tag.
   
 =cut  =cut
   
 #-------------------------------------------  #-------------------------------------------
 sub select_dom_form {  sub select_dom_form {
     my ($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled) = @_;      my ($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms,$excdoms,$disabled,$id) = @_;
     if ($onchange) {      if ($onchange) {
         $onchange = ' onchange="'.$onchange.'"';          $onchange = ' onchange="'.$onchange.'"';
     }      }
     if ($disabled) {      if ($disabled) {
         $disabled = ' disabled="disabled"';          $disabled = ' disabled="disabled"';
     }      }
       if ($id ne '') {
           $id = ' id="'.$id.'"';
       }
     my (@domains,%exclude);      my (@domains,%exclude);
     if (ref($incdoms) eq 'ARRAY') {      if (ref($incdoms) eq 'ARRAY') {
         @domains = sort {lc($a) cmp lc($b)} (@{$incdoms});          @domains = sort {lc($a) cmp lc($b)} (@{$incdoms});
Line 3115  sub select_dom_form { Line 3120  sub select_dom_form {
     if (ref($excdoms) eq 'ARRAY') {      if (ref($excdoms) eq 'ARRAY') {
         map { $exclude{$_} = 1; } @{$excdoms};           map { $exclude{$_} = 1; } @{$excdoms}; 
     }      }
     my $selectdomain = "<select name=\"$name\" size=\"1\"$onchange$disabled>\n";      my $selectdomain = "<select name=\"$name\" size=\"1\"$onchange$disabled$id>\n";
     foreach my $dom (@domains) {      foreach my $dom (@domains) {
         next if ($exclude{$dom});          next if ($exclude{$dom});
         $selectdomain.="<option value=\"$dom\" ".          $selectdomain.="<option value=\"$dom\" ".
Line 6942  sub bodytag { Line 6947  sub bodytag {
         $role = &Apache::lonnet::plaintext($role);          $role = &Apache::lonnet::plaintext($role);
     }      }
   
     if (!$realm) { $realm='&nbsp;'; }  
   
     my $extra_body_attr = &make_attr_string($forcereg,\%design);      my $extra_body_attr = &make_attr_string($forcereg,\%design);
   
 # construct main body tag  # construct main body tag
Line 6967  sub bodytag { Line 6970  sub bodytag {
                 undef($role);                  undef($role);
             }              }
             unless ($ltimenu->{'coursetitle'}) {              unless ($ltimenu->{'coursetitle'}) {
                 $realm='&nbsp;';  
                 $showcrstitle = 0;                  $showcrstitle = 0;
             }              }
         }          }
Line 6977  sub bodytag { Line 6979  sub bodytag {
                 undef($role);                  undef($role);
             }              }
             unless ($menuref->{'crs'}) {              unless ($menuref->{'crs'}) {
                 $realm='&nbsp;';  
                 $showcrstitle = 0;                  $showcrstitle = 0;
             }              }
         }          }
Line 7045  END Line 7046  END
                                                               $args->{'links_disabled'},                                                                $args->{'links_disabled'},
                                                               $args->{'links_target'},                                                                $args->{'links_target'},
                                                               $collapsible);                                                                $collapsible);
               my $labeltext = &HTML::Entities::encode(&mt('Primary links'));
             if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {              if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
                 if ($dc_info) {                  if ($dc_info) {
                     $dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|;                      $dc_info = qq|<span class="LC_cusr_subheading">$dc_info</span>|;
                 }                  }
                 $bodytag .= qq|<div id="LC_nav_bar">$left $role<br />                  $bodytag .= qq|<div id="LC_nav_bar" role="navigation" aria-label="$labeltext">$left $role</div>|;
                                <em>$realm</em> $dc_info</div>|;                  unless (($realm eq '') && ($dc_info eq '')) {
                       $bodytag .= qq|<div id="LC_realm" role="complementary"><em>$realm</em> $dc_info</div>|;
                   }
                 if ($need_endlcint) {                  if ($need_endlcint) {
                     $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');                      $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
                 }                  }
                 return $bodytag;                  return $bodytag;
             }              }
   
               $bodytag .= '<div class="LC_landmark" style="margin: 3px 0 0 0;" role="navigation" aria-label="'.$labeltext.'">';
             unless ($env{'request.symb'} =~ m/\.page___\d+___/) {              unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
                 $bodytag .= qq|<div id="LC_nav_bar">$left $role</div>|;                  $bodytag .= qq|<div id="LC_nav_bar">$left $role</div>|;
             }              }
   
             $bodytag .= $right;              $bodytag .= $right.'</div>';
   
             if ($dc_info) {              if ($dc_info) {
                 $dc_info = &dc_courseid_toggle($dc_info);                  $dc_info = &dc_courseid_toggle($dc_info);
             }              }
             $bodytag .= qq|<div id="LC_realm">$realm $dc_info</div>|;              unless (($realm eq '') && ($dc_info eq '')) {
                   $bodytag .= qq|<div id="LC_realm" role="complementary">$realm $dc_info</div>|;
               }
               $bodytag .= qq|<div style="clear: both; margin: 5px 0 0 0;"></div>|;
         }          }
   
         #if directed to not display the secondary menu, don't.            #if directed to not display the secondary menu, don't.  
Line 7310  form, .inline { Line 7317  form, .inline {
   display: inline;    display: inline;
 }  }
   
   .LC_landmark {
     margin: 0;
     padding: 0;
     border: none;
   }
   
 .LC_visually_hidden:not(:focus):not(:active) {  .LC_visually_hidden:not(:focus):not(:active) {
     clip-path: inset(50%);      clip-path: inset(50%);
     height: 1px;      height: 1px;
Line 7320  form, .inline { Line 7333  form, .inline {
     display: inline;      display: inline;
 }  }
   
   .LC_heading_2 {
     font-size: 1.17em;
   }
   
   .LC_heading_3 {
     font-size: 1.0em;
   }
   
 .LC_menus_content.shown{  .LC_menus_content.shown{
   display: block;    display: block;
 }  }
Line 7988  table#LC_helpmenu fieldset legend { Line 8009  table#LC_helpmenu fieldset legend {
   font-size: larger;    font-size: larger;
 }  }
   
 table#LC_helpmenu_links {  .LC_helpdesk_headbox {
   width: 100%;    border: 2px groove threedface;
   border: 1px solid black;    padding: 1em;
   }
   
   h1.LC_helpdesk_legend {
     float: left;
     margin: -1.7em 0 0;
     padding: 0 .5em;
   background: $pgbg;    background: $pgbg;
     font-size: 1em;
     font-weight: bold;
   }
   
   h1.LC_helpdesk_title {
     display: inline;
     font-size: 1em;
     line-height: 2.5em;
     margin: 0;
   padding: 0;    padding: 0;
   border-spacing: 1px;    vertical-align: bottom;
 }  }
   
 table#LC_helpmenu_links tr td {  .LC_helpdesk_links {
   padding: 1px;    border: 1px solid black;
     padding: 3px;
   background: $tabbg;    background: $tabbg;
   text-align: center;    text-align: center;
   font-weight: bold;    font-weight: bold;
     display: inline;
     margin-right: -6px;
   }
   
   .LC_helpdesk_img,
   .LC_helpdesk_text {
     padding: 0;
     margin: 0;
     border: 0;
     display: inline;
 }  }
   
 table#LC_helpmenu_links a:link,  .LC_helpdesk_img a:link,
 table#LC_helpmenu_links a:visited,  .LC_helpdesk_img a:visited,
 table#LC_helpmenu_links a:active {  .LC_helpdesk_img a:active,
   .LC_helpdesk_text a:link,
   .LC_helpdesk_text a:visited,
   .LC_helpdesk_text a:active {
   text-decoration: none;    text-decoration: none;
   color: $font;    color: $font;
 }  }
   
 table#LC_helpmenu_links a:hover {  div.LC_helpdesk_text a:hover {
   text-decoration: underline;    text-decoration: underline;
   color: $vlink;    color: $vlink;
 }  }
Line 8037  table.LC_pick_box { Line 8087  table.LC_pick_box {
   border-spacing: 1px;    border-spacing: 1px;
 }  }
   
 table.LC_pick_box td.LC_pick_box_title {  table.LC_pick_box th.LC_pick_box_title {
   background: $sidebg;    background: $sidebg;
   font-weight: bold;    font-weight: bold;
   text-align: left;    text-align: left;
Line 9722  OFFLOAD Line 9772  OFFLOAD
 <meta name="viewport" content="width=device-width, initial-scale=1.0">  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <meta name="apple-mobile-web-app-capable" content="yes" />';  <meta name="apple-mobile-web-app-capable" content="yes" />';
     }      }
     $result .= '<meta name="google" content="notranslate" />'."\n";      $result .= '<meta name="google" content="notranslate"';
       if (!$args->{'frameset'}) {
           $result .= ' /';
       }
       $result .= '>'."\n";
     return $result.'</head>';      return $result.'</head>';
 }  }
   
Line 19064  sub needs_coursereinit { Line 19118  sub needs_coursereinit {
                 }                  }
             }              }
         }          }
         return ($update);           return ($update);
     }      }
     return ();      return ();
 }  }
Line 19595  sub create_captcha { Line 19649  sub create_captcha {
         if (-e $Apache::lonnet::perlvar{'lonCaptchaDir'}.'/'.$md5sum.'.png') {          if (-e $Apache::lonnet::perlvar{'lonCaptchaDir'}.'/'.$md5sum.'.png') {
             $output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n".              $output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n".
                       '<span class="LC_nobreak">'.                        '<span class="LC_nobreak">'.
                       &mt('Type in the letters/numbers shown below').'&nbsp;'.                        '<label>'.&mt('Type in the letters/numbers shown below').'&nbsp;'.
                       '<input type="text" size="5" name="code" value="" autocomplete="new-password" />'.                        '<input type="text" size="5" name="code" value="" autocomplete="new-password" />'.
                       '</span><br />'.                        '</label></span><br />'.
                       '<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" alt="captcha" />';                        '<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" alt="captcha" />';
             last;              last;
         }          }

Removed from v.1.1452  
changed lines
  Added in v.1.1458


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>